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

Preserve full sub-path when switching projects #509

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

lorumic
Copy link
Contributor

@lorumic lorumic commented Oct 25, 2023

Done

  • Improved the function to keep the context when switching project. Now the full sub-path is kept, allowing to preserve also the tab context of the "Storage" page.

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Visit "Storage" page, change tab, e.g. to "Volumes"
    • Switch project using the project selector in the side nav, and check that the tab context is preserved
    • Ensure that switching project from any page works as expected

@webteam-app
Copy link

Demo starting at https://lxd-ui-509.demos.haus

src/util/projects.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

It works now as expected. Some ideas to simplify below.

src/util/projects.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

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

very good

@edlerd edlerd merged commit 749f385 into canonical:main Oct 26, 2023
5 checks passed
@lorumic lorumic deleted the preserve-sub-path branch October 26, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants