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(plugins): persist query params on tab change [khcp-11068] #1236

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

kaiarrowood
Copy link
Contributor

@kaiarrowood kaiarrowood commented Mar 13, 2024

Summary

Make sure query params are peristed when changing tabs.
Fixes KHCP-11068.

konnect-ui-apps PR and Preview:
https://pr-2661--gateway-manager.cloud-preview.konghq.tech/gateway-manager

Verification steps:

  1. Create a custom plugin
  2. Go to Routes -> view a specific route's details -> Plugins -> Click + New Plugin
  3. Notice the entity_type/entity_id query params in the URL
  4. Click the Custom Plugins tab
  5. Ensure the entity_type/entity_id query params are still in the URL
  6. Click a custom plugin to create an instance of it

Expected:
The scope selection in the plugin form should be hidden and it should be scoped automatically to the current route upon creation.

Resources

@kaiarrowood kaiarrowood self-assigned this Mar 13, 2024
@kaiarrowood kaiarrowood marked this pull request as ready for review March 13, 2024 18:59
@kaiarrowood kaiarrowood requested review from a team as code owners March 13, 2024 18:59
@@ -392,7 +392,7 @@ const fetchEntityPluginsUrl = computed((): string => {
})

const onTabsChange = (hash: string) => {
router.replace({ hash })
router.replace({ hash, query: route.query })
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch!

Copy link
Contributor

@mptap mptap left a comment

Choose a reason for hiding this comment

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

Functionally verified 🚀

Screenshot 2024-03-13 at 12 05 15 PM

@kaiarrowood kaiarrowood merged commit 8a0597d into main Mar 13, 2024
7 checks passed
@kaiarrowood kaiarrowood deleted the fix/khcp-11068-query-params branch March 13, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants