fix(Tipseen): resolve invalid HTML structure and ref/id prop issues #2799
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.
User description
✨ Summary
This PR fixes two issues in the
Tipseencomponent:<Text>element’selement="p"withelement="div"to resolve invalid HTML structure when rendering nested<div>s inside<p>.idandrefprops onReact.Fragmentby conditionally rendering a<div>wrapper when necessary.✅ Changes
elementprop inTextchanged from"p"to"div"to comply with HTML standards.<div>instead ofReact.Fragmentwhenidorrefis passed, avoiding React warnings.🧪 How I tested it
yarn storybookand verified no console warnings in the Tipseen stories.yarn testandyarn lintwith no issues related to my changes.Error Messages Before Fix
PR Type
Bug fix
Description
Fix invalid HTML structure by changing Text element from "p" to "div"
Resolve React Fragment ref/id prop warnings with conditional wrapper
Add ellipsis={false} prop to Text component for consistency
Diagram Walkthrough
File Walkthrough
Tipseen.tsx
Fix HTML structure and Fragment prop handlingpackages/core/src/components/Tipseen/Tipseen.tsx
Textelement prop from "p" to "div" for valid HTMLellipsis={false}prop to Text component