-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Use data sentry element as fallback for the component name #11383
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
Conversation
size-limit report 📦
|
|
We would need to index
The plugin applies a @0Calories please correct me if anything I mentioned is wrong or if I'm missing any info! |
@c298lee I'd recommend against sending it as @billyvg Regarding the topic of what specifically See the article here for more |
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.
LGTM! Just have one nit, but feel free to ignore it if too troublesome
OK, did some reading, the I took a look at what this look like on Sentry ( If we have a component
|
…ame (getsentry#11383) Adds element name as fallback. If component name exists, use that, else if element name exists use that, else use selector name. The element name and component name mirrors that of [React components vs elements](https://legacy.reactjs.org/blog/2015/12/18/react-components-elements-and-instances.html) Example with Replay Play/Pause Button: | Name Type | HTML Tree| -------------|------------| | Component Name | none > none > ReplayControls > ButtonBar > none | | Element Name | FullViewport > none > ButtonGrid > ButtonGrid > ReplayPlayPauseButton | | Element + Component fallback | FullViewPort > none > ButtonGrid > ButtonGrid > ReplayPlayPauseButton | | Component + Element fallback | FullViewPort > none > ReplayControls > ButtonBar > ReplayPlayPauseButton | More elements have an `data-sentry-element` attribute than `data-sentry-component` attribute, so adding in the element name means more elements in the tree will have a descriptive name. Furthermore, the component name usually provides more context (eg. ReplayControls vs ButtonGrid) so it should take precedence over the element name Relates to getsentry/sentry#64673
Adds element name as fallback. If component name exists, use that, else if element name exists use that, else use selector name. The element name and component name mirrors that of React components vs elements
Example with Replay Play/Pause Button:
More elements have an
data-sentry-element
attribute thandata-sentry-component
attribute, so adding in the element name means more elements in the tree will have a descriptive name. Furthermore, the component name usually provides more context (eg. ReplayControls vs ButtonGrid) so it should take precedence over the element nameRelates to getsentry/sentry#64673