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

Rename Library.{Pattern, Example} => Library.{SectionL2, SectionL3} #1818

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

robertknight
Copy link
Member

The hierarchical relationship between Library.{Section, Pattern, Example} was unclear and the Pattern and Example components had an unclear purpose since they were used as sections with different kinds of content. Rename these
components to make the structure clearer: Page -> Section -> SectionL2 ->
SectionL3 where SectionL{N} is effectively an alias for <Section level={N}>. In the process the meaning of the level prop has been adjusted to match the logical section level.

In the process also correct the usage of the <main> element to refer to just the main content of the page (ie. excluding navigation) instead of the whole page.

Discussed here in Slack.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f7da9bf) to head (e94aef2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1818   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           70        70           
  Lines         1273      1273           
  Branches       478       478           
=========================================
  Hits          1273      1273           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 636 to 652
Example,
SectionL3,
Info,
InfoItem,
Link,
Page,
Pattern,
SectionL2,
Section,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should sort these.

The hierarchical relationship between `Library.{Section, Pattern, Example}` was
unclear and the `Pattern` and `Example` components had an unclear purpose since
they were used as sections with different kinds of content. Rename these
components to make the structure clearer: `Page` -> `Section` -> `SectionL2` ->
`SectionL3` where `SectionL{N}` is effectively an alias for `<Section
level={N}>`. In the process the meaning of the `level` prop has been adjusted
to match the logical section level.

In the process also correct the usage of the `<main>` element to refer to just
the main content of the page (ie. excluding navigation) instead of the whole
page.
@robertknight robertknight force-pushed the rename-library-sections branch from 630955f to e94aef2 Compare December 3, 2024 17:18
@robertknight robertknight merged commit 04481a5 into main Dec 3, 2024
2 checks passed
@robertknight robertknight deleted the rename-library-sections branch December 3, 2024 17:21
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