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

Added btn--primary class to "Continue" button in New report page #4943

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

lucascumsille
Copy link
Contributor

@lucascumsille lucascumsille commented May 1, 2024

Fixes: https://github.com/mysociety/societyworks/issues/4246

With this PR "Continue" button will have same styling as btn--primary, to match the branding of each cobrand, the disabled state has also been updated so it has a more evident "disabled" state.

NOTE: To fix the original issue, including btn-primary is more of a bonus, but we could also get away with keeping what we currently have and add transparentize effect that passes the contrast colour to the disabled state. However this could be an opportunity to make a standard across all cobrands the use of the mixin button-variant for btn--primary. As an extra I think we could also include an extra variable in the mixin to control the border-radius property. We would be covering more topics, so happy to open a new issue to update the "button-variant" if you think that would be better.

Preview

PR4943.pdf

Master Preview(What we currently have)
Master.pdf

Default:

Screenshot 2024-05-01 at 08 35 42

Disabled

Screenshot 2024-05-01 at 08 36 28

[Skip changelog]

@lucascumsille lucascumsille requested a review from dracos May 1, 2024 07:49
Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.40%. Comparing base (a6ebf9a) to head (bc0538e).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4943      +/-   ##
==========================================
- Coverage   82.41%   82.40%   -0.01%     
==========================================
  Files         409      409              
  Lines       32042    32042              
  Branches     5109     5109              
==========================================
- Hits        26406    26404       -2     
- Misses       4123     4125       +2     
  Partials     1513     1513              

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

Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

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

There are a lot of Continue buttons in this template, but you've only updated one of them, was that deliberate?
I guess it looks like the difference was the "Continue" button was steps within the process, and then the "Submit" at the end is already btn--primary as the final actual-submission step. But I guess that doesn't really matter/make any difference, if you think it makes more sense for them all to be the same, okay with me.
I don't know how many things would need tidying up, I wouldn't want this to become a giant thing, but as always if it ends up making things simpler for the future, is good.

@lucascumsille
Copy link
Contributor Author

I guess it looks like the difference was the "Continue" button was steps within the process, and then the "Submit" at the end is already btn--primary as the final actual-submission step. But I guess that doesn't really matter/make any difference, if you think it makes more sense for them all to be the same, okay with me.

My thought was there is only one button visible at a time, so it didn't make much difference. With a "back" button right next to the "continue" one it would have more meaning to have a classic "primary" and "secondary" button approach.

I don't know how many things would need tidying up, I wouldn't want this to become a giant thing, but as always if it ends up making things simpler for the future, is good.

I think I'm following the same approach we have been following over the last year or so, trying to standardised the branding process with new variables and reduce the need of overrides =)

@lucascumsille lucascumsille force-pushed the 4246-continue-button branch 3 times, most recently from d6fb707 to 0c830cc Compare September 9, 2024 11:32
@lucascumsille lucascumsille marked this pull request as ready for review September 10, 2024 08:05
@lucascumsille lucascumsille changed the title WIP Added btn--primary class to "Continue" button in New report page Added btn--primary class to "Continue" button in New report page Sep 10, 2024
Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

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

Couple of tiny comments is all

web/cobrands/bromley/base.scss Outdated Show resolved Hide resolved
web/cobrands/buckinghamshire/_colours.scss Outdated Show resolved Hide resolved
@lucascumsille
Copy link
Contributor Author

@dracos Thanks for the feedback =) I just added a fixup for the comments/

Copy link
Member

@dracos dracos left a comment

Choose a reason for hiding this comment

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

Thanks :)

@lucascumsille lucascumsille force-pushed the 4246-continue-button branch 2 times, most recently from 3914400 to 63c3bd3 Compare November 4, 2024 12:34
@@ -36,7 +40,7 @@ $button-margin-left: 0 !default;
font-weight: bold;
font-family: inherit;
cursor: pointer;
border-radius: 4px;
border-radius: $button-border-radius;
Copy link
Contributor Author

@lucascumsille lucascumsille Nov 4, 2024

Choose a reason for hiding this comment

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

@dracos just in case Cypress was failing some test, I noticed it because at some point we dropped the border-radius mixin, but this PR was was still using it so I replaced it with border-radius property instead.

Originated from mysociety/societyworks#4246

The current disabled state of the "continue" button is very similar to its default state. As a solution I think it's a good idea to take this opportunity and give it the primary button styling so it matches the cobrands branding.

Also I have updated the button-variant mixin, so the disabled state has a more evident disabled state.
@lucascumsille lucascumsille merged commit bc0538e into master Nov 4, 2024
19 of 20 checks passed
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.

2 participants