Skip to content

ref(tags/flags): change issue tags route to /distributions/ #88062

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

Merged
merged 8 commits into from
Mar 27, 2025

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Mar 27, 2025

Now that feature flags are included in the tags drawer of streamlined UI, we're deciding to change the route path to /distributions/. Since the new/old views share routes, this will have to be done for the old UI too (tags tab). Also adds redirects from the previous /tags/ and /tags/:tagKey route.

Implementation: renames the Tab.TAGS enum to Tab.DISTRIBUTIONS and updates the TabPaths entry. I've added a comment explaining this tab is renamed from tags. "tags" is not in the name because all the other paths = enum name, and "tags-and-flags-distributions/", for example, seems too long for a URL.

@aliu39 aliu39 requested a review from a team as a code owner March 27, 2025 05:51
@aliu39 aliu39 requested a review from a team March 27, 2025 05:52
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 27, 2025
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #88062      +/-   ##
==========================================
+ Coverage   87.72%   87.75%   +0.03%     
==========================================
  Files        9977     9963      -14     
  Lines      564685   563747     -938     
  Branches    22236    22125     -111     
==========================================
- Hits       495352   494720     -632     
+ Misses      68917    68601     -316     
- Partials      416      426      +10     

Comment on lines 2107 to 2120
{/* Redirects for legacy tags route. */}
<Redirect from=":groupId/tags/" to={`/issues/:groupId/distributions/`} />
<Redirect
from=":groupId/tags/:tagKey/"
to={`/issues/:groupId/distributions/:tagKey/`}
/>
<Redirect
from={`:groupId/${TabPaths[Tab.EVENTS]}:eventId/tags/`}
to={`/issues/:groupId/${TabPaths[Tab.EVENTS]}:eventId/distributions/`}
/>
<Redirect
from={`:groupId/${TabPaths[Tab.EVENTS]}:eventId/tags/:tagKey/`}
to={`/issues/:groupId/${TabPaths[Tab.EVENTS]}:eventId/distributions/:tagKey/`}
/>
Copy link
Member

Choose a reason for hiding this comment

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

@scttcper FYI this was a pain to sort out.

Over in groupDetails we're returning <GroupEventDetails /> without passing children in, so if we try to put any routes inside the <Route path=":groupId/" ...> then they get lost and don't take effect. But only when the conditions are right and line ~702 executes.

IMO we should always always be including children from top level views like this. If there's a rule to distinguish views/ from components/ that might be it. Digging through such a huge view file to sort out what was happening took too many eng-hours :(

{isDisplayingEventDetails ? (
// The router displays a loading indicator when switching to any of these tabs
// Avoid lazy loading spinner by force rendering the GroupEventDetails component
<GroupEventDetails />
) : (
children
)}

Copy link
Member

Choose a reason for hiding this comment

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

this is to support the old ui and the new ui at the same time. Can't support both easily from the router. In the new experience we want them to be on the /tags route and display the group details in the background. In the old experience we want the tags to be the only thing displayed

@aliu39 aliu39 requested a review from scttcper March 27, 2025 16:52
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 27, 2025
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@scttcper
Copy link
Member

image
there's more links in the old ui

@scttcper
Copy link
Member

more links in here
image

@aliu39
Copy link
Member Author

aliu39 commented Mar 27, 2025

The backend changes are fixing 2 selenium acceptance tests, both are essentially frontend tests for the tag values page (/distributions/:tagKey/). Downside is we'd break CI for a bit after FE is deployed but BE hasn't. I don't see a way to pass CI without batching these changes though

@aliu39 aliu39 changed the title ref(tags/flags): change tags tab/drawer route to /distributions/ ref(tags/flags): change issue tags route to /distributions/ Mar 27, 2025
Copy link
Member

@scttcper scttcper left a comment

Choose a reason for hiding this comment

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

i don't love distributions

@aliu39
Copy link
Member Author

aliu39 commented Mar 27, 2025

i don't love distributions

Yeah personally agree 😬 but haven't came up with anything better. I tried using TabPaths[Tab.DISTRIBUTIONS] in as many spots as possible so future renaming can be done with a "rename symbol" on Tab.DISTRIBUTIONS

@aliu39 aliu39 merged commit abe4de1 into master Mar 27, 2025
51 checks passed
@aliu39 aliu39 deleted the aliu/distributions-route branch March 27, 2025 22:01
andrewshie-sentry pushed a commit that referenced this pull request Mar 31, 2025
Now that feature flags are included in the tags drawer of streamlined
UI, we're deciding to change the route path to /distributions/. Since
the new/old views share routes, this will have to be done for the old UI
too (tags tab). Also adds redirects from the previous /tags/ and
/tags/:tagKey route.

Implementation: renames the `Tab.TAGS` enum to `Tab.DISTRIBUTIONS` and
updates the `TabPaths` entry. I've added a comment explaining this tab
is renamed from tags. "tags" is not in the name because all the other
paths = enum name, and "tags-and-flags-distributions/", for example,
seems too long for a URL.
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants