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

fix(ras-acc): apply terms and conditions styles #1910

Open
wants to merge 3 commits into
base: epic/ras-acc
Choose a base branch
from

Conversation

chickenn00dle
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1207817176293825/1208579907739880

Looks like our terms and conditions styles weren't being applied correctly because we were targeting invalid classnames and nested elements. This PR adjusts our checkout styles to correctly target this section.

NOTE: I'm making some assumptions about what this should look like based on the existing styles since I didn't see this checkbox in the Figma. Let me know if this should look differently!

Without T&C set:
Screenshot 2024-10-18 at 13 49 25

With T&C set:
Screenshot 2024-10-18 at 13 52 04

How to test the changes in this Pull Request:

  1. Set up a terms and conditions page, then apply it in the customizer (WooCommerce > Checkout > Terms and conditions page)
  2. As a reader, go through checkout and confirm the Terms and Conditions checkbox appears as shown in the 'With T&C set' screenshot above.
  3. Remove the terms and conditions page via the customizer again
  4. Repeat step 2, but this time confirm the Terms and Conditions checkbox appears as shown in the 'Without T&C set' screenshot above.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

If it helps, I did get a thumbs up from Kevin for the styles used here -- the main difference is the font size and lack of background.

Personally I like how it looks now! The only thing that stands out to me with the label part is the distance between the text and the asterisks.

When the terms are open, the spacing is also a little funky -- the terms box is closer to the privacy policy text than the toggle:

CleanShot 2024-10-18 at 11 40 37@2x

I missed this myself, but when you add a heading the spacing at the top of the terms also seems like a lot! I think removing the top margin from the first element should take care of most cases of that.

@chickenn00dle chickenn00dle force-pushed the fix/terms-and-conditions-checkbox branch from 136e231 to ac5e438 Compare October 18, 2024 19:13
@chickenn00dle
Copy link
Contributor Author

Thanks for the review @laurelfulford!

I've got a fix up for the terms box and abbreviation spacing in 850d5aa and ac5e438

Let me know if this works!

Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

Thanks @chickenn00dle! This looks awesome overall! The only other thing I see is that the spacing next to the checkbox seems to be a bit smaller usual; it's only really noticeable when you have the checkboxes back to back like this:

CleanShot 2024-10-18 at 14 07 29

I think it's just a matter of changing var(--newspack-ui-spacer-base,8px) to var(--newspack-ui-spacer-2,12px) to match the checkbox above; marking as approved since it's a small tweak and things otherwise are solid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants