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

Keep records in store while fetching #1893

Closed
seancolsen opened this issue Nov 3, 2022 · 3 comments · Fixed by #3037
Closed

Keep records in store while fetching #1893

seancolsen opened this issue Nov 3, 2022 · 3 comments · Fixed by #3037
Labels
ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Milestone

Comments

@seancolsen
Copy link
Contributor

Current behavior

  • Before fetching records, we clear all the existing records replacing them with dummy records just so that each cell displays a loading skeleton.
  • In the Record Selector, we're auto-sizing the column widths based on the content of the cells.
  • The combination of the above two strategies produces some funky loading behavior in the Record Selector. While searching, the table gets too narrow because the cells no longer have content. Then when the search is complete, the table gets wide again. This causes the UI to jump around which can be disorienting to users.

Desired behavior

  • Don't wipe the records out until we have already fetched them. Maintain a separation of concerns between the records data and the records fetch status.
  • We can still display loading skeletons on the cells by reacting to the fetch status.
@seancolsen seancolsen added ready Ready for implementation type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory restricted: maintainers Only maintainers can resolve this issue labels Nov 3, 2022
@seancolsen
Copy link
Contributor Author

Here's another reason why we shouldn't clear the records while fetching... If something goes wrong during the fetch, you might end up with this:

image

Here, I had this tab open on the staging site, but my session expired. I pressed the "Refresh" button within the UI. Now I lost my view of that data just because the refresh failed.

@seancolsen seancolsen mentioned this issue Jan 5, 2023
7 tasks
@seancolsen
Copy link
Contributor Author

This issue came up again as a UX problem during a discussion on how to handle filtering on partially-entered dates.

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

This issue has not been updated in 90 days and is being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation restricted: maintainers Only maintainers can resolve this issue type: enhancement New feature or request work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants