-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat(ui): Add project id to URL when visiting Issue Details directly #13875
Merged
billyvg
merged 2 commits into
master
from
feat/ui/change-global-selection-header-loading-state-issue-details
Jul 3, 2019
Merged
feat(ui): Add project id to URL when visiting Issue Details directly #13875
billyvg
merged 2 commits into
master
from
feat/ui/change-global-selection-header-loading-state-issue-details
Jul 3, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is still a problem when visiting an issue details page with a direct URL and when a user does not have access to multiple projects. When this happens the global selection header tries to select a seemingly random project. This PR makes a few changes -- if there is no existing `project` URL param and you visit an issue details page, it will add the issues project id to the URL. This way when you go back to the issues stream it will have the proper project in context (instead of selecting a random project). This also fixes the project selector on issue details: there is an async loading state that we are not handling well. The project selector flashes from "All Projects" (and unlocked) to a locked state with project slug. This will make the project selector aware of its "loading" state and show an empty string until we have the project slug.
markstory
reviewed
Jul 2, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Is there a reasonable way to capture this behavior either with jest or with an acceptance test?
markstory
approved these changes
Jul 3, 2019
billyvg
deleted the
feat/ui/change-global-selection-header-loading-state-issue-details
branch
July 3, 2019 16:43
billyvg
added a commit
that referenced
this pull request
Apr 22, 2020
This basically re-implements #13689 in a more simple way. This is possible due to other changes that we have done to issue details (#13875, #14731). This also (semi) fixes an issue with loading Issue Details with an environment in the URL. Previously, it would fetch details API serially: 1) without env and 2) with env. There would be a slight flicker between loading -> finished req #1 -> loading -> finished req #2. Now this seems to fire both at near the same time and cancels the initial request almost immediately. This is still not ideal but is an interim-fix as the ideal solution is a bit more involved, but will be on its way.
billyvg
added a commit
that referenced
this pull request
Apr 23, 2020
This basically re-implements #13689 in a more simple way. This is possible due to other changes that we have done to issue details (#13875, #14731). This also (semi) fixes an issue with loading Issue Details with an environment in the URL. Previously, it would fetch details API serially: 1) without env and 2) with env. There would be a slight flicker between loading -> finished req #1 -> loading -> finished req #2. Now this seems to fire both at near the same time and cancels the initial request almost immediately. This is still not ideal but is an interim-fix as the ideal solution is a bit more involved, but will be on its way.
billyvg
added a commit
that referenced
this pull request
Apr 26, 2020
This basically re-implements #13689 in a more simple way. This is possible due to other changes that we have done to issue details (#13875, #14731). This also (semi) fixes an issue with loading Issue Details with an environment in the URL. Previously, it would fetch details API serially: 1) without env and 2) with env. There would be a slight flicker between loading -> finished req #1 -> loading -> finished req #2. Now this seems to fire both at near the same time and cancels the initial request almost immediately. This is still not ideal but is an interim-fix as the ideal solution is a bit more involved, but will be on its way.
billyvg
added a commit
that referenced
this pull request
Apr 27, 2020
This basically re-implements #13689 in a more simple way. This is possible due to other changes that we have done to issue details (#13875, #14731). This also (semi) fixes an issue with loading Issue Details with an environment in the URL. Previously, it would fetch details API serially: 1) without env and 2) with env. There would be a slight flicker between loading -> finished req #1 -> loading -> finished req #2. Now this seems to fire both at near the same time and cancels the initial request almost immediately. This is still not ideal but is an interim-fix as the ideal solution is a bit more involved, but will be on its way. The tests introduced in #18452 should cover the changes in this PR.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is still a problem when visiting an issue details page with a direct URL and when a user does not have access to multiple projects. When this happens the global selection header tries to select a seemingly random project.
This PR makes a few changes -- if there is no existing
project
URL param and you visit an issue details page, it will add the issues project id to the URL. This way when you go back to the issues stream it will have the proper project in context (instead of selecting a random project).This also fixes the project selector on issue details: there is an async loading state that we are not handling well. The project selector flashes from "All Projects" (and unlocked) to a locked state with project slug. This will make the project selector aware of its "loading" state and show an empty string until we have the project slug.
Header change: https://cl.ly/44b3bfd218fb