Skip to content

Use new button styles sitewide #1470

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

Merged
merged 12 commits into from
May 28, 2025
Merged

Use new button styles sitewide #1470

merged 12 commits into from
May 28, 2025

Conversation

axlewin
Copy link
Contributor

@axlewin axlewin commented May 20, 2025

(Phy): prefer solid and keyline over primary and secondary

This introduces a lot of siteSpecifics which it would be nice to simplify eventually, but from a user perspective all of the buttons should now use the new styling.

axlewin added 2 commits May 20, 2025 15:46
(Phy): prefer `solid` and `keyline` over `primary` and `secondary`
Changed width of "log out everywhere" button
Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 22.58065% with 48 lines in your changes missing coverage. Please review.

Project coverage is 40.45%. Comparing base (f9c08fa) to head (a9d34a4).
Report is 135 commits behind head on redesign-2024.

Files with missing lines Patch % Lines
...elements/modals/TeacherConnectionModalCreators.tsx 20.00% 8 Missing ⚠️
...ponents/elements/panels/ManageExistingBookings.tsx 0.00% 3 Missing ⚠️
...c/app/components/pages/RegistrationGroupInvite.tsx 0.00% 3 Missing ⚠️
...components/elements/modals/GroupsModalCreators.tsx 33.33% 2 Missing ⚠️
...app/components/elements/panels/EventAttendance.tsx 0.00% 2 Missing ⚠️
src/app/components/pages/AssignmentSchedule.tsx 0.00% 2 Missing ⚠️
src/app/components/pages/EventDetails.tsx 0.00% 2 Missing ⚠️
src/app/components/pages/MyAssignments.tsx 0.00% 2 Missing ⚠️
src/app/components/site/cs/HomepageCS.tsx 0.00% 2 Missing ⚠️
...app/components/elements/ConceptGameboardButton.tsx 0.00% 1 Missing ⚠️
... and 21 more
Additional details and impacted files
@@                Coverage Diff                @@
##           redesign-2024    #1470      +/-   ##
=================================================
- Coverage          40.65%   40.45%   -0.21%     
=================================================
  Files                494      495       +1     
  Lines              22032    22120      +88     
  Branches            7302     7333      +31     
=================================================
- Hits                8957     8948       -9     
- Misses             12450    13135     +685     
+ Partials             625       37     -588     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@sjd210 sjd210 left a comment

Choose a reason for hiding this comment

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

Looking over things, everything looks reasonable on both sites.

That said, it seems a shame to have so many siteSpecifics around if we're planning to replace them so soon anyway. This seems to me like the perfect opportunity to instead get rid of that old language altogether now (i.e. replacing these classes with btn-solid and btn-keyline respectively, and no longer using the outline prop). It should make things way cleaner if we're changing all these lines of code anyway.

It's more work now, but it should be less work overall than changing it all again soon.

@@ -36,7 +36,7 @@ const GroupJoinPanel = () => {
e.preventDefault();
}}}
/>
<Button onClick={processToken} outline color="secondary">
<Button onClick={processToken} color="primary">
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be "solid", surely?

@axlewin
Copy link
Contributor Author

axlewin commented May 27, 2025

OK, I've changed most of the buttons on both sites to use the new classnames. I've left a few btn-secondarys; these ought to be siteSpecific(keyline, solid), but introducing new siteSpecifics doesn't feel neat 🤔.

There are no intentional visual changes to Ada here. There are a few changes to physics, but hopefully nothing controversial (mostly making sure that cancel/confirm options are always different styles to each other).

Copy link
Contributor

@sjd210 sjd210 left a comment

Choose a reason for hiding this comment

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

Nice! I haven't been through and checked every page, but I've had a look through each critical path on both sites and some specific cases where I noticed odd behaviour. It's mostly fine, but there are a couple of odd things to fix (partly from the initial migration months ago which may as well be sorted now). Nothing too major.

I wouldn't mind using some siteSpecifics(keyline, solid)s for instances where there actually IS a difference between the sites (that's what its for!) - but I'm also perfectly happy for them to be dealt with when/if the button is ever changed. We can leave them for now.

(+ I also noticed some spots in the content where this old naming remains, see Trello)

@@ -37,7 +37,7 @@ export const additionalManagerSelfRemovalModal = (group: AppGroup, user: Registe
buttons: [
<Row key={0}>
<Col>
<Button block outline color="primary" onClick={() => {
<Button block color="keyline" onClick={() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

One of these "Cancel"/"Confirm" buttons ought to be solid, and the other keyline. It isn't the case for the current redesign site but is for Ada and the live site (which is how it should be).

Given the nature of confirming a negative effect, I'm not sure I have strong opinions over which way round it should be (solid black to act as a warning for proceeding? or to indicate cancellation? - both are quite standard), as long as they are kept different colours.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've gone with solid to cancel, keyline to confirm on physics. I'm not sure it's the best way round (and indeed it's the opposite way to Ada) but it's consistent with most other places in the redesign - we can always swap them all over later.

(I've also swapped some secondarys for siteSpecific(keyline, solid) here to highlight that the two buttons are always opposite styles).

@sjd210 sjd210 merged commit 488bc6b into redesign-2024 May 28, 2025
8 of 9 checks passed
@sjd210 sjd210 deleted the redesign/button-styling branch May 28, 2025 13: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.

3 participants