Skip to content

feat(replay): Adds click to search on component name - #68190

Merged
c298lee merged 5 commits into
masterfrom
cl/click-to-search-breadcrumb
Apr 3, 2024
Merged

c298lee merged 5 commits into
masterfrom
cl/click-to-search-breadcrumb

Conversation

@c298lee

@c298lee c298lee commented Apr 3, 2024 •

Copy link
Copy Markdown
Contributor

If the component that was clicked on is of type React Component Name, then you can click on it to search for replays that also have those clicks.
We only have data on whether or not the clicked component has a component name, the parents in the tree come in as a string so there's no type data, so only the clicked component will have the ability to click to search. Since the entire HTML tree comes in as one string, some string manipulation was required.

image image

Relates to: #64673

@c298lee
c298lee requested a review from a team April 3, 2024 16:56
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 3, 2024
description.lastIndexOf('>') === -1 ? 0 : description.lastIndexOf('>') + 2;

return (
<Description title={description} showOnlyOnOverflow isHoverable>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what happens if the there's a react component name & the description here overflows? will there be two layers of tooltips :o

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

if it overflows, there's only the tooltip to see all the text, no click to search in the tooltip :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it so that there's 2 layers of tooltips :D

@michellewzhang

Copy link
Copy Markdown
Contributor

looks good! 2/3 items crushed already?!

@michellewzhang michellewzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for making the changes!

@c298lee
c298lee merged commit a67f1eb into master Apr 3, 2024
@c298lee
c298lee deleted the cl/click-to-search-breadcrumb branch April 3, 2024 19:31
<Fragment>
{componentName ? (
<Fragment>
<div style={{display: 'inline'}}>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this can be a span, no need for inline styles

shellmayr pushed a commit that referenced this pull request Apr 10, 2024
If the component that was clicked on is of type React Component Name,
then you can click on it to search for replays that also have those
clicks.
We only have data on whether or not the clicked component has a
component name, the parents in the tree come in as a string so there's
no type data, so only the clicked component will have the ability to
click to search. Since the entire HTML tree comes in as one string, some
string manipulation was required.

<img width="716" alt="image"
src="https://github.com/getsentry/sentry/assets/55311782/84297982-5c52-498c-9bdc-afa31cae51ca">
<img width="596" alt="image"
src="https://github.com/getsentry/sentry/assets/55311782/2da53340-77e5-453c-b15b-be04b6d34682">

Relates to: #64673
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 2024

This branch was successfully deployed

1 active deployment
Preview — a0226a81 Deployed Apr 3, 2024 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants