Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): display not found page when pagination page is invalid#12611

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 5 commits intomainfrombq/fix-wrong-page-number
Mar 18, 2024

Conversation

BrunoQuaresma
Copy link
Collaborator

Screenshot 2024-03-15 at 11 29 51

Closes#11795

@BrunoQuaresmaBrunoQuaresma requested a review froma teamMarch 15, 2024 14:30
@BrunoQuaresmaBrunoQuaresma self-assigned thisMar 15, 2024
@BrunoQuaresmaBrunoQuaresma requested review fromaslilac and removed request fora teamMarch 15, 2024 14:30
@mtojekmtojek self-requested a reviewMarch 15, 2024 16:02
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@BrunoQuaresma Can you implement this accordingly to what we agreed with@mafredri or is it impossible now?

In my fantasy, we'd show a tooltip/banner that this page doesn't exist, but we'd still show the page 85 button as selected, with the ability to select a previous page (that exists).

(post)

@BrunoQuaresma
Copy link
CollaboratorAuthor

@mtojek can you be more specific? In this case, what is missing is the pagination widget right?

@mtojek
Copy link
Member

mtojek commentedMar 15, 2024
edited
Loading

Yes, I can. The reason why we implemented thecount on the backend side was so the frontend DOES NOT show the 404, but rather renders or goes to the last page.

What I can see here is just "Go to the first page", but the idea is to render the last available page.

@BrunoQuaresma
Copy link
CollaboratorAuthor

Go to the last page would add one redirect and maybe unexpected IMO. What I see other apps doing is a not found error message, wdyt@mafredri ?

Copy link
Member

@aslilacaslilac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

one small suggestion for code readability, but I like the look of this! thanks for the change!

@mafredri
Copy link
Member

mafredri commentedMar 15, 2024
edited
Loading

Here's how I think about it@BrunoQuaresma.

Imagine the following situation:

  1. Pagination is 10 workspaces / page
  2. There are 31 workspaces (4 pages)
  3. User is on page 4
  4. Someone deletes 11 workspaces
  5. There are now only 20 workspaces (2 pages)
  6. What happens to the user viewing page 4? Keep in mind we refresh workspaces list on such events

As a user, I would like for the pagination to contain[1] [2] [4] where 4 can be highlighted to signify it's selected (and maybe somehow indicate it doesn't exist). The workspace list would also show "no workspaces", similar to a search producing no results.

This way, I can easily recover and choose whether or not I want to go to the first or the last page (1 or 2). Given more pages it could look like[1] ... [10] [11] [12] ... [14] or something like that.

I think encountering a 404 in my described scenario would feel pretty weird and unexpected (since it used to he a page).

mtojek reacted with thumbs up emoji

@BrunoQuaresma
Copy link
CollaboratorAuthor

@mafredri I see that, I just think redirecting the user to the last page is not usual, at least in other apps, but I'm ok with showing the pagination.

@BrunoQuaresma
Copy link
CollaboratorAuthor

Updated:

Screenshot 2024-03-15 at 15 38 45
aslilac, mafredri, and matifali reacted with thumbs up emoji

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

@BrunoQuaresmaBrunoQuaresma merged commitc84d96b intomainMar 18, 2024
@BrunoQuaresmaBrunoQuaresma deleted the bq/fix-wrong-page-number branchMarch 18, 2024 13:36
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 18, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

@mtojekmtojekmtojek approved these changes

@mafredrimafredriAwaiting requested review from mafredri

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Workspace list shows nothing if page number is too big
4 participants
@BrunoQuaresma@mtojek@mafredri@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp