Skip to content
Snippets Groups Projects

Issue #3183766 by guilhermevp, alecsmrekar, paulocs, djsagar, Abhijith S,...

Open Issue #3183766 by guilhermevp, alecsmrekar, paulocs, djsagar, Abhijith S,...
6 unresolved threads
Open Binoli Lalani requested to merge issue/drupal-3183766:3183766-views-pager-- into 11.x
6 unresolved threads

Issue #3183766 by guilhermevp, alecsmrekar, paulocs, djsagar, Abhijith S, jshimota01, ilgnerfagundes: Views Pager - 0 Items is confusing

Closes #3183766

Merge request reports

Members who can merge are allowed to add commits.
Approval is optional
Code Quality is loading
Test summary results are being parsed
Metrics reports are loading
Ready to merge by members who can write to the target branch.
  • The source branch is 219 commits behind the target branch.
  • 1 commit will be added to 11.x.
  • Source branch will not be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
37 37 * {@inheritdoc}
38 38 */
39 39 public function summaryTitle() {
40 if (!empty($this->options['offset'])) {
41 return $this->formatPlural($this->options['items_per_page'], 'Mini pager, @count item, skip @skip', 'Mini pager, @count items, skip @skip', ['@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']]);
40 $summary_text = '';
  • quietone
    quietone @quietone started a thread on the diff
  • 37 37 * {@inheritdoc}
    38 38 */
    39 39 public function summaryTitle() {
    40 if (!empty($this->options['offset'])) {
    41 return $this->formatPlural($this->options['items_per_page'], 'Mini pager, @count item, skip @skip', 'Mini pager, @count items, skip @skip', ['@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']]);
    40 $summary_text = '';
    41 if ($this->options['items_per_page'] == 0) {
    42 if (!empty($this->options['offset'])) {
    • This is testing the not empty case first and just below the empty case is first. It is mildly jarring to have that difference and made me read the code twice to see if there was a reason. Since there is not it would be better to be consistent.

    • Please register or sign in to reply
  • quietone
    quietone @quietone started a thread on the diff
  • 20 20 class Some extends PagerPluginBase {
    21 21
    22 22 public function summaryTitle() {
    23 if (!empty($this->options['offset'])) {
    24 return $this->formatPlural($this->options['items_per_page'], '@count item, skip @skip', '@count items, skip @skip', ['@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']]);
    23 $summary_text = '';
    24 if ($this->options['items_per_page'] == 0) {
    25 if (!empty($this->options['offset'])) {
  • 69 69 * {@inheritdoc}
    70 70 */
    71 71 public function summaryTitle() {
    72 if (!empty($this->options['offset'])) {
    73 return $this->formatPlural($this->options['items_per_page'], '@count item, skip @skip', 'Paged, @count items, skip @skip', ['@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']]);
    72 $summary_text = '';
  • 20 20 class Some extends PagerPluginBase {
    21 21
    22 22 public function summaryTitle() {
    23 if (!empty($this->options['offset'])) {
    24 return $this->formatPlural($this->options['items_per_page'], '@count item, skip @skip', '@count items, skip @skip', ['@count' => $this->options['items_per_page'], '@skip' => $this->options['offset']]);
    23 $summary_text = '';
  • 81 81 $this->assertSame('number', $offset->getAttribute('type'));
    82 82 $this->assertEquals(0, $offset->getAttribute('min'));
    83 83
    84 $edit = [
  • David Cameron added 1496 commits

    added 1496 commits

    Compare with previous version

  • David Cameron added 1 commit
  • Please register or sign in to reply
    Loading