Skip to content
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 allowed tags for heading for Subhead and improve docs #519

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

khiga8
Copy link
Contributor

@khiga8 khiga8 commented Apr 30, 2021

What

  • Restricts allowed tags for :heading slot to :div and <h1>~ <h6> elements.
  • Updates documentation with best practices and additional usage information based on primer css
  • Create method to link to best heading practices since it's repeated throughout codebase.

Why

Part of #491

Notes
There are 21 instances of Subhead component that explicitly set tag on heading slot and all the tags appear to be heading elements so no update needed there.

Grepped for:

Primer::SubheadComponent.new(((?!%>).)|\n)*(mb:)+(((?!%>).)|\n)*%>(((?!%>).)|\n)*component.heading(((?!%>).)|\n)*(tag:)+

@khiga8 khiga8 requested a review from a team April 30, 2021 19:24
@vercel
Copy link

vercel bot commented Apr 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/view-components/CfWB92yJBfTEuCYKKK8DLTgmarrb
✅ Preview: https://view-components-git-kh-updatesubhead-primer.vercel.app

@khiga8 khiga8 force-pushed the kh-update_subhead branch from e97927d to 3e073e9 Compare April 30, 2021 20:49
@vercel vercel bot temporarily deployed to Preview April 30, 2021 20:50 Inactive
@khiga8 khiga8 merged commit a0ab176 into main Apr 30, 2021
@khiga8 khiga8 deleted the kh-update_subhead branch April 30, 2021 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants