New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish filtering option misses the count of entries #2129

Closed
michael-e opened this Issue Jul 20, 2014 · 35 comments

Comments

Projects
None yet
6 participants
@michael-e
Member

michael-e commented Jul 20, 2014

The new publish filtering is cool, but it doesn't display the count of entries. It would be useful to know

  • how many entries are there if no filters are active
  • how many entries have been found with the current filter(s)

@brendo brendo added the Filtering UI label Jul 21, 2014

@brendo

This comment has been minimized.

Show comment
Hide comment
@brendo

brendo Jul 28, 2014

Member

how many entries are there if no filters are active

If we did a EntryManager::fetchCount() call without any of the filters, we can get this information.

how many entries have been found with the current filter(s)

We have the total number of entries available to us from this point so we could add them to the sub heading... if that's where we wanted this information, Blog (2 entries)

Member

brendo commented Jul 28, 2014

how many entries are there if no filters are active

If we did a EntryManager::fetchCount() call without any of the filters, we can get this information.

how many entries have been found with the current filter(s)

We have the total number of entries available to us from this point so we could add them to the sub heading... if that's where we wanted this information, Blog (2 entries)

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jul 28, 2014

Member

Yes, I would really like those numbers added to the section's name (subheading), like you proposed.

Member

michael-e commented Jul 28, 2014

Yes, I would really like those numbers added to the section's name (subheading), like you proposed.

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jul 28, 2014

Member

I think Publish Filtering already added this count – seems to have been lost during the transition.

Member

nilshoerrmann commented Jul 28, 2014

I think Publish Filtering already added this count – seems to have been lost during the transition.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jul 28, 2014

Member

That is why I am asking for it: I just miss it.

Member

michael-e commented Jul 28, 2014

That is why I am asking for it: I just miss it.

@nilshoerrmann nilshoerrmann self-assigned this Nov 5, 2014

nilshoerrmann added a commit that referenced this issue Nov 5, 2014

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 15, 2015

Member

This issue is not solved (at least not in Symphony 2.6.0-beta.2).

Member

michael-e commented Jan 15, 2015

This issue is not solved (at least not in Symphony 2.6.0-beta.2).

@michael-e michael-e reopened this Jan 15, 2015

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 15, 2015

Member

Ah, I see now: Filtered results get a count, but there is no count for an unfiltered list of entries. :-(

Member

michael-e commented Jan 15, 2015

Ah, I see now: Filtered results get a count, but there is no count for an unfiltered list of entries. :-(

@nitriques

This comment has been minimized.

Show comment
Hide comment
@nitriques

nitriques Jan 15, 2015

Member

I'll try to have a look at this

Member

nitriques commented Jan 15, 2015

I'll try to have a look at this

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 15, 2015

Member

Great, thanks!

Member

michael-e commented Jan 15, 2015

Great, thanks!

@nitriques

This comment has been minimized.

Show comment
Hide comment
@nitriques

nitriques Jan 15, 2015

Member

@michael-e It's simply implemented that way

See https://github.com/symphonycms/symphony-2/blob/integration/symphony/content/content.publish.php#L497-L500

Would the solution be to create an else statement with Total entries: x ?

Member

nitriques commented Jan 15, 2015

@michael-e It's simply implemented that way

See https://github.com/symphonycms/symphony-2/blob/integration/symphony/content/content.publish.php#L497-L500

Would the solution be to create an else statement with Total entries: x ?

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 15, 2015

Member

Will test tomorrow, I am on my way to bed.

Member

michael-e commented Jan 15, 2015

Will test tomorrow, I am on my way to bed.

@nitriques

This comment has been minimized.

Show comment
Hide comment
@nitriques

nitriques Jan 15, 2015

Member

@michael-e Nite nite.

Member

nitriques commented Jan 15, 2015

@michael-e Nite nite.

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 16, 2015

Member

Ah, I see now: Filtered results get a count, but there is no count for an unfiltered list of entries. :-(

Michael, would you like to always see a count or only if the filtering drawer is open?

Member

nilshoerrmann commented Jan 16, 2015

Ah, I see now: Filtered results get a count, but there is no count for an unfiltered list of entries. :-(

Michael, would you like to always see a count or only if the filtering drawer is open?

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 16, 2015

Member

I would prefer to always see a count. It's very useful, IMHO.

Member

michael-e commented Jan 16, 2015

I would prefer to always see a count. It's very useful, IMHO.

@andrewminton

This comment has been minimized.

Show comment
Hide comment
@andrewminton

andrewminton Jan 16, 2015

Contributor

+1

Contributor

andrewminton commented Jan 16, 2015

+1

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 16, 2015

Member

For a quick test I hacked:

else {
    $filter_stats = new XMLElement('p', '<span>' . __('(%d)', array(EntryManager::fetchCount($section_id))) . '</span>', array('class' => 'inactive'));
    $this->Breadcrumbs->appendChild($filter_stats);
}

right after the lines mentioned by @nitriques, and it works fine for me.

To be consistent it only generates a number in brackets, so I am not sure if we should pass this to translation.

Member

michael-e commented Jan 16, 2015

For a quick test I hacked:

else {
    $filter_stats = new XMLElement('p', '<span>' . __('(%d)', array(EntryManager::fetchCount($section_id))) . '</span>', array('class' => 'inactive'));
    $this->Breadcrumbs->appendChild($filter_stats);
}

right after the lines mentioned by @nitriques, and it works fine for me.

To be consistent it only generates a number in brackets, so I am not sure if we should pass this to translation.

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 16, 2015

Member

If we will always display a count, I'd suggest to just add the count without brackets:

  • 123 entries
  • 12 of 123 entries
Member

nilshoerrmann commented Jan 16, 2015

If we will always display a count, I'd suggest to just add the count without brackets:

  • 123 entries
  • 12 of 123 entries
@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 16, 2015

Member

Currently the filtered count is like this:

  • – filtered (12 of 123)

I added:

  • (123)

So we have to change the filtered count as well to get:

  • (12 of 123 entries)
  • (123)

Or would you prefer a dash instead of brackets?

Member

michael-e commented Jan 16, 2015

Currently the filtered count is like this:

  • – filtered (12 of 123)

I added:

  • (123)

So we have to change the filtered count as well to get:

  • (12 of 123 entries)
  • (123)

Or would you prefer a dash instead of brackets?

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 16, 2015

Member

The dash is used in other places when we append something to the title (section index etc.).

Member

nilshoerrmann commented Jan 16, 2015

The dash is used in other places when we append something to the title (section index etc.).

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 16, 2015

Member

One way or another we must remove the word "filtered" to provide a consistent experience, right? So we'd have:

  • – 12 of 123 entries
  • – 123 entries

Or the word "filtered" gets moved to the end:

  • – 12 of 123 entries (filtered)
  • – 123 entries

Which dash is it, btw?

Member

michael-e commented Jan 16, 2015

One way or another we must remove the word "filtered" to provide a consistent experience, right? So we'd have:

  • – 12 of 123 entries
  • – 123 entries

Or the word "filtered" gets moved to the end:

  • – 12 of 123 entries (filtered)
  • – 123 entries

Which dash is it, btw?

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 16, 2015

Member

Which dash is it, btw?

It should be an m-dash but we could just decide to use something else. There are currently two kinds of additional information appended to headlines:

  • "filtered (x of y)" and
  • "drag to reorder" (added by the JavaScript, I think)

We should just make sure that the typesetting is identical.

Member

nilshoerrmann commented Jan 16, 2015

Which dash is it, btw?

It should be an m-dash but we could just decide to use something else. There are currently two kinds of additional information appended to headlines:

  • "filtered (x of y)" and
  • "drag to reorder" (added by the JavaScript, I think)

We should just make sure that the typesetting is identical.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 16, 2015

Member

So what do you suggest?

  • – filtered (12 of 123 entries)
  • – 123 entries

Looks rather inconsistent, doesn't it? I would prefer

  • – 12 of 123 entries
  • – 123 entries
Member

michael-e commented Jan 16, 2015

So what do you suggest?

  • – filtered (12 of 123 entries)
  • – 123 entries

Looks rather inconsistent, doesn't it? I would prefer

  • – 12 of 123 entries
  • – 123 entries
@bernardodiasc

This comment has been minimized.

Show comment
Hide comment
@bernardodiasc

bernardodiasc Jan 18, 2015

Member

The count of entries is useful with and without filtering IMHO. Suggestion:

  • – 12 of 123 entries (filtered)
  • – 12 of 123 entries
Member

bernardodiasc commented Jan 18, 2015

The count of entries is useful with and without filtering IMHO. Suggestion:

  • – 12 of 123 entries (filtered)
  • – 12 of 123 entries
@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 18, 2015

Member

Without filtering, why should it be 12 of 123 entries? It's simply 123 entries then.

Member

michael-e commented Jan 18, 2015

Without filtering, why should it be 12 of 123 entries? It's simply 123 entries then.

@bernardodiasc

This comment has been minimized.

Show comment
Hide comment
@bernardodiasc

bernardodiasc Jan 18, 2015

Member

There is only 2 ways to know the count of entries in a page not filtered: knowing by the config.php or counting manually... I think its common to have the number of rows informed somewhere.

Member

bernardodiasc commented Jan 18, 2015

There is only 2 ways to know the count of entries in a page not filtered: knowing by the config.php or counting manually... I think its common to have the number of rows informed somewhere.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 18, 2015

Member

You are mixing up things then. Symphony displays the overall number of filtered entries, not the number of visible rows. The issue discussed here is not about the number of visible rows.

Member

michael-e commented Jan 18, 2015

You are mixing up things then. Symphony displays the overall number of filtered entries, not the number of visible rows. The issue discussed here is not about the number of visible rows.

@bernardodiasc

This comment has been minimized.

Show comment
Hide comment
@bernardodiasc

bernardodiasc Jan 18, 2015

Member

alright. I imagined that you are talking about the label, not only for filters. without filter doesn't show the total entries nor rows anywhere.

Member

bernardodiasc commented Jan 18, 2015

alright. I imagined that you are talking about the label, not only for filters. without filter doesn't show the total entries nor rows anywhere.

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 18, 2015

Member

without filter doesn't show the total entries nor rows anywhere.

The request was to change this.

Member

nilshoerrmann commented Jan 18, 2015

without filter doesn't show the total entries nor rows anywhere.

The request was to change this.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 23, 2015

Member

@nilshoerrmann, once we can agree on the text to be displayed, we could prepare a pull request for this. My suggestion is:

  • 123 entries (without filtering)
  • 12 of 123 entries (filtered) (if filtering is applied)
Member

michael-e commented Jan 23, 2015

@nilshoerrmann, once we can agree on the text to be displayed, we could prepare a pull request for this. My suggestion is:

  • 123 entries (without filtering)
  • 12 of 123 entries (filtered) (if filtering is applied)
@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 23, 2015

Member

I'm fine with that.

Member

nilshoerrmann commented Jan 23, 2015

I'm fine with that.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 23, 2015

Member

So I will try my best.

Member

michael-e commented Jan 23, 2015

So I will try my best.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 23, 2015

Member

Ah, I see that translations would have to change as well. How is the right way to deal with that?

Member

michael-e commented Jan 23, 2015

Ah, I see that translations would have to change as well. How is the right way to deal with that?

@nilshoerrmann

This comment has been minimized.

Show comment
Hide comment
@nilshoerrmann

nilshoerrmann Jan 23, 2015

Member

Just change the text in Symphony and make use of the __() function.
Using Localisation Manager, the translations can be easily updated.

Member

nilshoerrmann commented Jan 23, 2015

Just change the text in Symphony and make use of the __() function.
Using Localisation Manager, the translations can be easily updated.

@michael-e

This comment has been minimized.

Show comment
Hide comment
@michael-e

michael-e Jan 23, 2015

Member

OK, will do.

Member

michael-e commented Jan 23, 2015

OK, will do.

michael-e added a commit to michael-e/symphony-2 that referenced this issue Jan 23, 2015

nilshoerrmann pushed a commit that referenced this issue Jan 23, 2015

Nils Hörrmann
Merge pull request #2333 from michael-e/fix-2129
Add count of entries (unfiltered). Fixes #2129.
@nitriques

This comment has been minimized.

Show comment
Hide comment
@nitriques

nitriques Jan 23, 2015

Member

Can be closed since #2333 has been merged ?

Member

nitriques commented Jan 23, 2015

Can be closed since #2333 has been merged ?

@michael-e michael-e closed this Jan 23, 2015

nitriques added a commit to DeuxHuitHuit/symphonycms that referenced this issue Feb 19, 2015

nitriques added a commit to DeuxHuitHuit/symphonycms that referenced this issue Feb 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment