openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

user_blocks pages lacks proper navigation

Open jidanni opened this issue 6 years ago • 11 comments

At the bottom of https://www.openstreetmap.org/user_blocks there is

« Previous Page 1 Next »
  • No way to know how many pages there are.
  • No way to jump to the last page.

There may be five more pages.

There may be five hundred.

The only way for the user to find out is to click from one to the next to the next.

jidanni avatar Oct 12 '19 02:10 jidanni

No way to search to see if certain user is in list.

No way to order by name to see if certain user is in list.

No record of date block started. (OK, can click "Show")

jidanni avatar Oct 12 '19 02:10 jidanni

Hacking the URL, https://www.openstreetmap.org/user_blocks?page=5555 works, but the result is the same as https://www.openstreetmap.org/user_blocks?page=1 .

jidanni avatar Oct 12 '19 02:10 jidanni

Actually one can put the username here: https://www.openstreetmap.org/user/Nurdsburg and then there is a link to all the blocks visible. So perhaps add a tip to the page.

jidanni avatar Oct 12 '19 02:10 jidanni

We have a few more navigation options in the meantime:

image

mmd-osm avatar Jun 22 '24 18:06 mmd-osm

Regarding the navigation limitations on the user blocks page, expanding on @mmd-osm answer, I think the current view could use some enhancements. Displaying the total number of pages or blocks would be a nice touch. For example, showing something like "Displaying 20 of ${totalNumberOfBlocks}" or "Page ${currentPage} of ${totalNumberOfPages}" could provide more context and improve the user experience.

Additionally, adding a search input to query blocks by blocked user or creator could significantly boost usability. This would help users efficiently order and find specific entries.

What are you thoughts on this? Would you be willing to merge changes mentioned if I opened a PRs addressing mentioned issues? @tomhughes @gravitystorm @AntonKhorev

kcne avatar Jul 18 '24 19:07 kcne

Displaying the total number of pages or blocks would be a nice touch. For example, showing something like "Displaying 20 of ${totalNumberOfBlocks}" or "Page ${currentPage} of ${totalNumberOfPages}" could provide more context and improve the user experience.

Some of these things are not done to avoid using OFFSET/COUNT in db queries.

Additionally, adding a search input to query blocks by blocked user or creator could significantly boost usability.

They are linked from profile pages. Profile pages also have active blocks and created blocks counters.

Also see #4734 for this from the original post:

No way to jump to the last page.

AntonKhorev avatar Jul 19 '24 12:07 AntonKhorev

If you want to be compatible with https://github.com/openstreetmap/openstreetmap-website/pull/4734 or similar and have some idea about ${totalNumberOfBlocks} while browsing blocks by pages, maybe adding a counter inside the blocks by tab would help.

AntonKhorev avatar Jul 19 '24 13:07 AntonKhorev

Regarding the navigation limitations on the user blocks page, one possible solution would be displaying the count of blocks inside the open tab in braces. This would give users a clear context of how many blocks are available, which can be particularly helpful for moderators and others managing the list.

I've already implemented this locally. Please let me know if this approach aligns with what you're looking for, and if so, I can open a PR with these changes.

Screenshots: Screenshot 2024-07-24 at 20 23 52

blocks-by-me blocks-on

Thank you!

kcne avatar Jul 24 '24 18:07 kcne

Why in braces? I'm trying to convert such counters to badges, see https://github.com/openstreetmap/openstreetmap-website/pull/4872

AntonKhorev avatar Jul 24 '24 18:07 AntonKhorev

I agree that in terms of UI it would look a lot cleaner so I will be happy to refactor according to that and leave screenshots when I do

Thanks for a quick response!

kcne avatar Jul 24 '24 23:07 kcne

@AntonKhorev Quick update, refactored this using badges -> 97e7991 It would be nice to ping on #4872 for review so I can open a new PR for this.

Screenshot: Screenshot 2024-07-25 at 13 57 36

kcne avatar Jul 25 '24 12:07 kcne