-
Notifications
You must be signed in to change notification settings - Fork 115
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
Restrict tags for HiddenTextExpander
and Truncate
#581
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/primer/view-components/3Eh2oncxFVRvb9fAudeMUynMnKAG |
8f39182
to
9deec64
Compare
@manuelpuyol you wrote |
Looking at dotcom usage for |
9deec64
to
9103df7
Compare
5b4b3fe
to
2160e30
Compare
2160e30
to
8f3b4a2
Compare
8f3b4a2
to
12264e0
Compare
12264e0
to
9718b9e
Compare
CHANGELOG.md
Outdated
### Breaking changes | ||
|
||
* Restrict allowed tags for `Truncate`, `Markdown`, and `HiddenTextExpander`. | ||
|
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.
mind updating this changelog to be after # main
?
9718b9e
to
b6f8fc2
Compare
What
This PR restricts tags for
HiddenTextExpander
to:span
, and also restricts tags forTruncate
to[:div, :span, :p]
. I chose these tags based on current usage in dotcom and what seemed reasonable.This PR also makes explicit the tag argument for
Markdown
so consumers know they can set thetag
argument. I was unsure what the allowed tags for this component should be based on current usage ofarticle,
tdin dotcom.
test_renders_different_tags` also seemed to imply that this component can be relatively flexible so I did not add restrictions. Open to thoughts if you have any.Why
Part of #491