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: Color problems with the newsletter sign-up pattern #528

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

juanfra
Copy link
Member

@juanfra juanfra commented Oct 9, 2024

Description

Fixes #526

Update cover blocks to use contrast color for texts to work in different variations.

Screenshots

Screen.Recording.2024-10-09.at.10.40.14.mov

Testing Instructions

  1. Create a page.
  2. Insert the "Newsletter sign-up" pattern
  3. Test the page with the different style variations.
  4. Confirm that it looks good and the colors follow a11y guidelines.

@juanfra juanfra added Accessibility (a11y) Needs accessibility testing or feedback [Component] Block Patterns labels Oct 9, 2024
@juanfra juanfra self-assigned this Oct 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: juanfra <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: beafialho <[email protected]>
Co-authored-by: sudip-md <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented Oct 9, 2024

Preview changes

You can preview these changes by following the link below:

I will update this comment with the latest preview links as you push more changes to this PR.
⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

@juanfra juanfra added the [Type] Bug An existing feature does not function as intended. label Oct 9, 2024
@beafialho
Copy link
Contributor

I'm trying to test this, but I'm having some issues with my local environment...

@beafialho
Copy link
Contributor

Is this one looking unaccessible to you as well?

Captura de ecrã 2024-10-09, às 10 37 37

@juanfra
Copy link
Member Author

juanfra commented Oct 9, 2024

Is this one looking unaccessible to you as well?

@beafialho yes, that's "Sunrise" right?

@carolinan
Copy link
Contributor

The only two color contrasts that are guaranteed to work on all palettes are contrast and base.

@beafialho
Copy link
Contributor

Is this one looking unaccessible to you as well?

@beafialho yes, that's "Sunrise" right?

Correct.

@carolinan
Copy link
Contributor

From the issue:

Another important thing to consider is that I believe the color is meant to be the same as in the (stories) footer?

Because the stories footer and the newsletter sign-up has the same background color.

@juanfra
Copy link
Member Author

juanfra commented Oct 9, 2024

Then, let's consider using the group block with Style 3 instead of the cover block. I will adjust the pattern for that.

@carolinan
Copy link
Contributor

carolinan commented Oct 9, 2024

Great point, I am not sure why the cover was used.

@juanfra
Copy link
Member Author

juanfra commented Oct 9, 2024

@beafialho @carolinan this one is ready for a new pass when you have time. Thanks 🙌

<!-- wp:heading {"textAlign":"center","fontSize":"xx-large"} -->
<h2 class="wp-block-heading has-text-align-center has-xx-large-font-size"><?php esc_html_e( 'Sign up to get daily stories', 'twentytwentyfive' ); ?></h2>
<!-- /wp:heading -->
<!-- wp:group {"tagName":"aside","metadata":{"categories":["call-to-action"],"patternName":"twentytwentyfive/cta-newsletter","name":"Newsletter Sign Up"},"align":"full","className":"is-style-section-3","style":{"spacing":{"padding":{"right":"var:preset|spacing|50","left":"var:preset|spacing|50","top":"var:preset|spacing|50","bottom":"var:preset|spacing|50"}},"dimensions":{"minHeight":""}},"layout":{"type":"constrained","contentSize":"800px"}} -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: remove metadata.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe we need to keep the categories so that the shuffle functionality can be more robust.

Have we concluded whether we're keeping the pattern name and name? I saw some discussions going on.

Copy link
Contributor

@carolinan carolinan Oct 10, 2024

Choose a reason for hiding this comment

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

But the category, slug, name everything is listed in the file header.
Who can give a definite answer?

Copy link
Member Author

Choose a reason for hiding this comment

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

I could be getting it wrong, but it seems that the suffle functionality relies on the metadata. Please check this code.

Copy link
Contributor

@carolinan carolinan Oct 10, 2024

Choose a reason for hiding this comment

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

The metadata is inserted in the editors when you insert the pattern.
So it is not missing from the shuffle functionality.

I went down a rabbit hole trying to find any official documentation, dev note or similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, thanks for that. Let's try to define what we do with the metadata in the issue and work on it in bulk.

Copy link
Contributor

@carolinan carolinan left a comment

Choose a reason for hiding this comment

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

From my end, using the section style on the group works much better across all the combined style variations.

@sudip-md
Copy link

sudip-md commented Oct 10, 2024

Test Report

Description:
There is still a Midnight style background without a contrast color for the text. Everything else looks good.
Suggested : Midnight style (#4433A6)should have White font color.

Video -

2024-10-10_12-04-27.mp4

@juanfra
Copy link
Member Author

juanfra commented Oct 10, 2024

@sudip-md thank you. That's not how I see it in the branch where I worked. This is how I see it:

Screen.Recording.2024-10-10.at.09.30.53.mov

Can you please check that you're on the update/newsletter-pattern branch, have pulled the latest changes, and re-inserted the pattern once you pulled the changes?

@carolinan
Copy link
Contributor

I think this can be merged but we need to define the questions clearly if we can find who to reach out to about the metadata, including the translation of the metadata.

@juanfra
Copy link
Member Author

juanfra commented Oct 10, 2024

I think this can be merged but we need to define the questions clearly if we can find who to reach out to about the metadata, including the translation of the metadata.

Sounds good. Shall we keep the conversation about metadata here? I saw they pinged Daniel Richards and maybe he has some more insights about it.

@juanfra
Copy link
Member Author

juanfra commented Oct 10, 2024

I've removed the metadata and merging this one. In case we decide to add metadata to patterns we can revisit later in batch. Thank you 🙌

@juanfra juanfra merged commit cdc72e2 into trunk Oct 10, 2024
4 checks passed
@juanfra juanfra deleted the update/newsletter-pattern branch October 10, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility (a11y) Needs accessibility testing or feedback [Component] Block Patterns [Type] Bug An existing feature does not function as intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Color problems with the newsletter sign-up pattern
4 participants