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
feat: Add serializeAttribute option to breadcrumbs / dom. - #3620
Added serializeAttribute option to Breadcrumbs / dom integration, to allow users to define an element attribute to be serialized in breadcrumbs instead of ids or class names.
@onurtemizkan before we merge, can we make sure we go through all linked comments/issues of the referenced Issues to make sure we don't miss something.
Also, lets figure out if we potentially close those as well then.
@HazAT, there are also requests to be able to add extra attributes to allowedAttrs, allowing to keep class names or ids while having custom attributes to show. But since we are enforcing a maximum length to generated tree strings and having both class/id and an attribute doesn't add much information IMO, that might not be very usable at the end. What do you think?
Would anyone be open to the possibility of serializeAttribute being an array instead? This would allow for recognizing multiple attributes that are possibly not available on all elements.
For example,
{serializeAttribute: ['data-testid',// all our good devs using react-testing library'aria-label',// attempt to fallback on something recognizable],}...
Thanks very much, not sure why I couldn't find that, maybe I had a d as in serializedAttribute when I searched.
This file contains hidden or 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
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.
Resolves: #3604
Added
serializeAttributeoption toBreadcrumbs/domintegration, to allow users to define an element attribute to be serialized in breadcrumbs instead ofids orclassnames.