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

[SD-695] Use DL in stats grid markup #1446

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

waitingallday
Copy link
Member

@waitingallday waitingallday commented Feb 12, 2025

Issue: https://digital-vic.atlassian.net/browse/SD-695

What I did

  • Ideally, the stats blocks would all form one dl but the rules say that a dl can only contain dt and dd els, so there is no way of wrapping them for alignment in flex. I think this (using a dl for each pair) is still correct, but a bit verbose - no difference visually or in size of markup.
  • Refactor markup to dl with dt and dd (wrapped in a single div), use border instead of margin/gap

How to test

  • Chromatic

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed
  • I've updated the documentation site as needed
  • I have added tests to cover my changes (if not applicable, please state why in a comment)

For new UI components only

  • I have added a storybook story covering all variants
  • I have checked a11y tab in storybook passes
  • I have added cypress component tests (if the component is interactive)
  • Any events are emitted on the event bus using emitRplEvent

@waitingallday waitingallday added this to the 2.26.0 milestone Feb 12, 2025
@waitingallday waitingallday self-assigned this Feb 12, 2025
Copy link

cypress bot commented Feb 12, 2025

ripple-framework    Run #2559

Run Properties:  status check passed Passed #2559  •  git commit f14c6b112d: refactor: :recycle: remove inner wrapper
Project ripple-framework
Branch Review fix/sd-695-stats-grid-markup
Run status status check passed Passed #2559
Run duration 10m 54s
Commit git commit f14c6b112d: refactor: :recycle: remove inner wrapper
Committer Jason Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 235
View all changes introduced in this branch ↗︎

@dylankelly
Copy link
Contributor

@waitingallday I believe you can wrap the children in a div see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl#wrapping_name-value_groups_in_div_elements

@waitingallday waitingallday merged commit a866703 into release/2.26.0 Feb 13, 2025
14 checks passed
@waitingallday waitingallday deleted the fix/sd-695-stats-grid-markup branch February 13, 2025 03:51
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.

3 participants