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

fix: don't add project flag table state config to browser history #6824

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Apr 10, 2024

This change specifies the update type as replace for the
useQueryParams hook used to set table state.

Primarily, this prevents the column selection from being added to the browser
history and more importantly prevents you from changing your config by
navigating through browser history.

However, this also affects other table state, such as changing sorting order etc. These will also no longer be added to the browser history.


Bug description:

In the project flag table, you can select which env columns to show. However, adding and removing these envs get added as steps in your browser history. This means that if you add 3 envs, you:

  1. have to go back three times to get back to the previous page
  2. In doing so, you also inadvertently revert the choices you mean, which can be confusing.

Steps to reproduce:

  1. Navigate to the project screen
  2. Use the column selector to add/remove projects. Notice that the URL changes for each selection you make.
  3. After making one or more changes, use the browser's back-functionality. Notice that you stay on the same page but that the selected envs (and the URL) change.

This change specifies the update type as `replace` for the
`useQueryParams` hook used to select table columns.

This prevents the column selection from being added to the browser
history and more importantly prevents you from changing your config by
navigating through browser history.
Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 0:17am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Apr 10, 2024 0:17am

@thomasheartman thomasheartman changed the title fix: don't add project flag column selection config to browser history fix: don't add project flag table state config to browser history Apr 10, 2024
@thomasheartman thomasheartman merged commit 442327e into main Apr 12, 2024
13 checks passed
@thomasheartman thomasheartman deleted the fix/don't-add-column-config-to-history branch April 12, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants