You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Apply React Component Names to Replay Surface Areas #64673
changed the title [-]Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/-][+][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/+]on Feb 6, 2024
changed the title [-][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/-][+][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page && [Replay Details] Breadcrumbs When Set Up [/+]on Feb 6, 2024
@Jesse-Box we talked to @0Calories who is going to help Replay leverage the React Component names feature he added.
We need some help with designs, on where to put the component names in the UI when available.
He's take was:
I can make some preliminary UI changes, but I think for showing the component name in a Replay breadcrumb, I need design specs. I don’t think we should outright replace the whole HTML block with the component name, since a lot of valuable data is available in the HTML itself. We should show the component name as supplementary data
changed the title [-][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page && [Replay Details] Breadcrumbs When Set Up [/-][+][Replay Index] Apply React Component Names to Replay Surface Areas[/+]on Mar 4, 2024
changed the title [-][Replay Index] Apply React Component Names to Replay Surface Areas[/-][+]Apply React Component Names to Replay Surface Areas[/+]on Mar 13, 2024
The selector info currently comes directly from the raw breadcrumb frame. Luckily, the raw breadcrumb frames also contain the data-sentry-component which is exactly what we need to show the component name! There are a couple frontend files to edit here, as well as potential type changes to surface the component name, but we already have this data already so it shouldn't be too difficult.
One thing to note is that the data-sentry-component attribute appears ONLY if it exists. So if it's a click on something without a component name, this attribute won't show up
The more complicated next step is figuring out how to show the entire component "tree". We'll need to trace the selector all the way back up to the root, remembering that not every element has a component name. We should get the most useful thing to display (whether it's the component name, or the id, class, etc.)
From Figma:
Another question we'll need to consider is how far down we want to show the tree -- e.g. do we want to show things that are further down the tree as well? If so --> small SDK change needed to propagate component down
In this case, would also need to disambiguate which one is our current component
Implementing search should not be difficult since we already have the search capabilities
2. Rage Click Issues
Design input needed
GOAL: add the React component name to the issue details
Good source of more information on this topic: @JoshFerge
Overall estimation of effort: low
Steps:
We'd need to update this file to pass in the component name:
"We'd just have to group by the component name and add it to the select statement in the query" -- Colton (seems like not a huge effort)
From there, can directly translate selector name to component name in the frontend. Probably need to change a good amount of files, but nothing too difficult
Overall considerations
Everywhere we're making these changes, we should update wording to say "components" instead of "selector" (e.g. docs, in Sentry, etc.)
We should also consider what to show when there’s no component name available! [design input]
Proposed Timeline
[0.5 weeks] Get design input for Rage Click Issues & Selector Widgets, as well as what to render when no component name is available - @Jesse-Box
[0.5 weeks] Sync w/ appropriate team members on necessary prep work that needs to be done (ex. endpoint changes)
[1.5 weeks + 0.5 week + 1.5 weeks = 3.5 weeks] The changes needed for the 3 surfaces appear to be pretty unrelated, so they could be done in parallel or in any order
[0.5 weeks] Consider whether we need to update docs, strings/other wording throughout Sentry to say "component" instead of "selector"
Activity
[-]Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/-][+][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/+]getsantry commentedon Feb 6, 2024
Routing to @getsentry/product-owners-replays for triage ⏲️
jas-kas commentedon Feb 6, 2024
cc/ @0Calories
bruno-garcia commentedon Feb 6, 2024
Click and other DOM-related crumbs could also show the React Component name instead of the raw HTML blocks:
[-][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page When Set Up[/-][+][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page && [Replay Details] Breadcrumbs When Set Up [/+]bruno-garcia commentedon Feb 6, 2024
@Jesse-Box we talked to @0Calories who is going to help Replay leverage the React Component names feature he added.
We need some help with designs, on where to put the component names in the UI when available.
He's take was:
jas-kas commentedon Feb 20, 2024
Design Update for Breadcrumbs: #65093 (comment)
[-][Replay Index] Apply React Component Names to Selector Widgets and Selector Index Page && [Replay Details] Breadcrumbs When Set Up [/-][+][Replay Index] Apply React Component Names to Replay Surface Areas[/+][-][Replay Index] Apply React Component Names to Replay Surface Areas[/-][+]Apply React Component Names to Replay Surface Areas[/+]michellewzhang commentedon Mar 13, 2024
Did a bit of research into what needs to be done for each of the 3 surfaces:
Effort / changes required
1. Replay Breadcrumbs:
Steps:
sentry/static/app/components/replays/breadcrumbs/breadcrumbItem.tsx
Line 103 in 188d41f
data-sentry-componentwhich is exactly what we need to show the component name! There are a couple frontend files to edit here, as well as potential type changes to surface the component name, but we already have this data already so it shouldn't be too difficult.sentry/static/app/utils/replays/hydrateBreadcrumbs.tsx
Line 27 in 188d41f
data-sentry-componentattribute appears ONLY if it exists. So if it's a click on something without a component name, this attribute won't show upFrom Figma:

2. Rage Click Issues
Steps:
sentry/src/sentry/replays/usecases/ingest/issue_creation.py
Line 18 in 188d41f
sentry/tests/sentry/replays/unit/test_ingest_dom_index.py
Line 31 in 188d41f
3. Selector Widgets and Selector Index Page
Steps
Overall considerations
Proposed Timeline
feat(replay): add component name to rage click issue data if it exists (
1 remaining item
feat(replay): Adds click to search on component name (#68190)
feat(replay): Use data sentry element as fallback for the component n…
feat(replays): Add component name to selector endpoint (#68370)
feat(replay): Adds click to search on component name (#68190)
ref(replays): Add component name to selector (#68631)
feat(replays): Display component name in selector when available (#68840
c298lee commentedon Apr 18, 2024
All three areas and the docs have been updated with component names!
feat(replay): Use data sentry element as fallback for the component n…
feat(replays): Component Names in Rage & Dead Breadcrumbs (#69508)
feat(replays): Component Names in Rage & Dead Breadcrumbs (#69508)
feat(replays): Component Names in Rage & Dead Breadcrumbs (#69508)