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

refactor: adopt primer design system ui components #1589

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

setchy
Copy link
Member

@setchy setchy commented Oct 12, 2024

Closes: #1541

Adopts the excellent GitHub Primer Design System Component Library - https://primer.style/components to replace our custom components and provide a level-up on user experience and visual consistency.

This PR, though sizeable, focuses on replacing the following components

  • Icons
  • Buttons
  • Layout via Stack

I have also replaced most tests to use data-testid and getByTestId so that they're more resilient to UI changes

Items found during testing that should be resolved

  • Horizontal scroll bar showing on notification animation (mark as read, etc)
  • Different uses of colors (tailwind vs design token), eg: green color
  • position of repository title tooltip gets cut off

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@github-actions github-actions bot added dependency Dependency updates refactor Refactoring of existing feature labels Oct 12, 2024
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@bmulholland
Copy link
Collaborator

I have also replaced most tests to use data-testid and getByTestId so that they're more resilient to UI changes

Lovely, nice touch.

jest.setup.js.js Outdated Show resolved Hide resolved
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy setchy marked this pull request as ready for review October 14, 2024 22:05
@setchy
Copy link
Member Author

setchy commented Oct 14, 2024

@afonsojramos @bmulholland - I'm pretty happy with the completeness of this initial uplift to use the GitHub Primer UI Components.

I plan to update this issue later with before/after screenshots, but while that's pending, if you do happen to have a few minutes I'd appreciate your feedback by running this branch locally 🙏

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@bmulholland
Copy link
Collaborator

Sure, testing this locally now :)

@bmulholland
Copy link
Collaborator

A minor nitpick: there's now two different versions of green. The Gitify logo in the tray, when there's notifs, is one -- I think the same as open PR green? The sidebar icons are another, along with the sub-icons for a notification.

@setchy
Copy link
Member Author

setchy commented Oct 21, 2024

A minor nitpick: there's now two different versions of green. The Gitify logo in the tray, when there's notifs, is one -- I think the same as open PR green? The sidebar icons are another, along with the sub-icons for a notification.

Good feedback.

The sidebar icons are now using the GitHub design tokens (colors), while the others (notification type icon and tray icons) are unchanged.

Post this PR I do intend to use the GitHub design token colors more extensively and reduce the amount of tailwind colors we're using

@bmulholland
Copy link
Collaborator

Yeah I think temporary mismatches are fine, too.

@setchy
Copy link
Member Author

setchy commented Oct 23, 2024

During further testing, noticed that when a notification row is animating out (mark as read, etc) a horizontal scroll bar is being shown temporarily. Added as an open task to the OP

Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy setchy mentioned this pull request Oct 25, 2024
1 task
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Signed-off-by: Adam Setch <adam.setch@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Dependency updates refactor Refactoring of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

explore adopting GitHub's primer.design component library
2 participants