-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add a glance_metric
component
#4452
Conversation
1cace6c
to
55dc5a7
Compare
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.
Looks good, added some comments.
app/assets/stylesheets/govuk_publishing_components/components/_glance-metric.scss
Outdated
Show resolved
Hide resolved
app/views/govuk_publishing_components/components/_glance_metric.html.erb
Outdated
Show resolved
Hide resolved
app/views/govuk_publishing_components/components/docs/glance_metric.yml
Outdated
Show resolved
Hide resolved
app/assets/stylesheets/govuk_publishing_components/components/_glance-metric.scss
Outdated
Show resolved
Hide resolved
55dc5a7
to
68a8147
Compare
68a8147
to
bac6f4c
Compare
bac6f4c
to
d25ff76
Compare
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.
LGTM 👍 Just needs one small change but will approve so I'm not a blocker for it.
- communicate number value and label (if present) in a single dictation when read with a screen reader | ||
- convey the meaning of the number shown | ||
- The component must use the correct heading level for the page (defaults to `<h3>`) | ||
|
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.
Could you add uses_component_wrapper_helper: true
so the functionality of it is surfaced in the docs? Thanks
This is based on the `glance_metric` component used in [content-data-admin](https://github.com/alphagov/content-data-admin) with some unused options removed. I’ve also tweaked the display of the explicit label, as `aria-label` is not supported on non-semantic elements,
d25ff76
to
d4f4dd8
Compare
* Use component wrapper on panel component ([PR #4459](#4459)) * Use the component wrapper on the phase banner component ([PR #4460](#4460)) * Add a `glance_metric` component ([PR #4452](#4452)) * Use component wrapper on org logo component ([PR #4458](#4458)) * Use component wrapper on notice component ([PR #4444](#4444)) * Add component wrapper to the metadata component ([PR #4442](#4442))
* Use component wrapper on panel component ([PR #4459](#4459)) * Use the component wrapper on the phase banner component ([PR #4460](#4460)) * Add a `glance_metric` component ([PR #4452](#4452)) * Use component wrapper on org logo component ([PR #4458](#4458)) * Use component wrapper on notice component ([PR #4444](#4444)) * Add component wrapper to the metadata component ([PR #4442](#4442))
* Use component wrapper on panel component ([PR #4459](#4459)) * Use the component wrapper on the phase banner component ([PR #4460](#4460)) * Add a `glance_metric` component ([PR #4452](#4452)) * Use component wrapper on org logo component ([PR #4458](#4458)) * Use component wrapper on notice component ([PR #4444](#4444)) * Add component wrapper to the metadata component ([PR #4442](#4442))
This is based on the
glance_metric
component used in content-data-admin with some unused options removed. I’ve also tweaked the display of the explicit label, asaria-label
is not supported on non-semantic elements,Screenshot
Trello card: https://trello.com/c/eJTfFnFN/700-create-rollup-for-view-page-and-review-page