Skip to content
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

Implement <ScrollRestoration /> #4357

Closed
FelixMalfait opened this issue Mar 7, 2024 · 6 comments · Fixed by #5086
Closed

Implement <ScrollRestoration /> #4357

FelixMalfait opened this issue Mar 7, 2024 · 6 comments · Fixed by #5086
Assignees
Labels
good first issue Good for newcomers good for experienced contributor scope: front Issues that are affecting the frontend side only T

Comments

@FelixMalfait
Copy link
Member

FelixMalfait commented Mar 7, 2024

Current behavior

As of today, when you hit the "back" button, you are always redirected to the top of the page.
This is annoying when working with lots of records (e.g. Kanban board).

Screen.Recording.2024-03-07.at.12.31.03.mov

Desired behavior

Other websites like Github just record the scroll position.
This seems to be doable with https://reactrouter.com/en/main/components/scroll-restoration#scrollrestoration-

Edit: also check https://reactrouter.com/en/main/components/link#preventscrollreset not sure if needed

@FelixMalfait FelixMalfait added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only good for experienced contributor labels Mar 7, 2024
@Jonathanlemon
Copy link
Contributor

@FelixMalfait Could I be assigned this? Thanks

@FelixMalfait
Copy link
Member Author

@Jonathanlemon of course, that'd be very helpful if you can solve this. Got this feedback twice from users. Thanks!

@FelixMalfait
Copy link
Member Author

@Jonathanlemon did you have time to look yet? Thanks!

@FelixMalfait FelixMalfait added the T label Apr 15, 2024
@Jonathanlemon
Copy link
Contributor

@FelixMalfait Something came up where I will not be able to look into this, sorry. Please unassign me

@FelixMalfait
Copy link
Member Author

OK no problem @Jonathanlemon thanks for trying!

Copy link
Contributor

gitstart-app bot commented Apr 17, 2024

Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-4357

lucasbordeau added a commit that referenced this issue May 17, 2024
### Description

Implement &lt;ScrollRestoration /&gt;

### Refs


[#4357

### Demo


https://github.com/twentyhq/twenty/assets/140154534/321242e1-4751-4204-8c86-e9b921c1733e

Fixes #4357

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers good for experienced contributor scope: front Issues that are affecting the frontend side only T
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants