Skip to content

Conversation

@broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Oct 18, 2022

Issues addressed in this PR:

  • Display loading counters for all nav items.
  • Add string type to counter prop to support cases like 12K

Storybook link: https://primer-8434fe8ecf-13348165.drafts.github.io/storybook/?path=/story/components-underlinenav--counters-loading-state
Documentation link: https://primer-8434fe8ecf-13348165.drafts.github.io/drafts/UnderlineNav2

Merge checklist

  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2022

🦋 Changeset detected

Latest commit: 6835a22

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.99 KB (0%)
dist/browser.umd.js 78.64 KB (0%)

)}
{counter && (
{loadingCounters ? (
<Box as="span" data-component="counter" sx={counterStyles}>
Copy link
Member Author

Choose a reason for hiding this comment

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

Just wanted to point out that I am not super happy with this duplication of the the wrapper Box component but otherwise it wasn't easily readable so that was my trade off but open to suggestions (as always) 💖

@broccolinisoup broccolinisoup marked this pull request as ready for review October 18, 2022 07:29
@broccolinisoup broccolinisoup requested review from a team and pksjce October 18, 2022 07:29
@broccolinisoup
Copy link
Member Author

@danielguillan Could I please get a review on loading counters? Especially for their width and background colour and opacity? Its source code is here

Thank you! 😊

@broccolinisoup broccolinisoup temporarily deployed to github-pages October 18, 2022 07:35 Inactive
@danielguillan
Copy link
Contributor

Thanks @broccolinisoup!

Let's try the following:

  • background-color set to colors.neutral.muted, so we match the actual CounterLabel.
  • opacity goes from 1 to 0.2.
  • animation easing set to ease-in-out to improve the pulse effect.

@broccolinisoup broccolinisoup force-pushed the underlineNav-sign-off-remediations branch 2 times, most recently from 74387fa to 4247884 Compare October 21, 2022 07:38
@broccolinisoup broccolinisoup temporarily deployed to github-pages October 21, 2022 07:58 Inactive
Copy link
Contributor

@danielguillan danielguillan left a comment

Choose a reason for hiding this comment

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

Looks great! I just added one little change suggestion.

Co-authored-by: Daniel Guillan <[email protected]>
@broccolinisoup broccolinisoup temporarily deployed to github-pages October 21, 2022 09:12 Inactive
@broccolinisoup broccolinisoup merged commit 9391d0d into underlineNav-sign-off-remediations Oct 21, 2022
@broccolinisoup broccolinisoup deleted the loading-counters-fix branch October 21, 2022 09:16
broccolinisoup added a commit that referenced this pull request Oct 23, 2022
…ading counter for all (#2449)

* string type for counters and fix loading issue

* add changeset

* improve docs

* update animation details

* Inverte the pulse effect

Co-authored-by: Daniel Guillan <[email protected]>

Co-authored-by: Daniel Guillan <[email protected]>
broccolinisoup added a commit that referenced this pull request Oct 24, 2022
…ading counter for all (#2449)

* string type for counters and fix loading issue

* add changeset

* improve docs

* update animation details

* Inverte the pulse effect

Co-authored-by: Daniel Guillan <[email protected]>

Co-authored-by: Daniel Guillan <[email protected]>
broccolinisoup added a commit that referenced this pull request Oct 24, 2022
…ading counter for all (#2449)

* string type for counters and fix loading issue

* add changeset

* improve docs

* update animation details

* Inverte the pulse effect

Co-authored-by: Daniel Guillan <[email protected]>

Co-authored-by: Daniel Guillan <[email protected]>
broccolinisoup added a commit that referenced this pull request Oct 25, 2022
…viour (A11y sign-off remediations) (#2447)

* Discard the pointer types and scroll behaviour

* add changeset

* remove arrow btn styles

* introduce gap between items and remove 4px padding around the links

* [UnderlineNav2]: React router implementation fixes & docs improvement (#2448)

* react router implementation fixes

* add changeset

* [UnderlineNav2]: Add string type to the `counter` prop and display loading counter for all (#2449)

* string type for counters and fix loading issue

* add changeset

* improve docs

* update animation details

* Inverte the pulse effect

Co-authored-by: Daniel Guillan <[email protected]>

Co-authored-by: Daniel Guillan <[email protected]>

* Remove unnecessary styles (scroll behaviour styles)

* improve docs

Co-authored-by: Daniel Guillan <[email protected]>
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