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

Add accent color to WC Blocks price slider #1508

Merged
merged 3 commits into from
Nov 2, 2020

Conversation

Aljullu
Copy link
Contributor

@Aljullu Aljullu commented Oct 20, 2020

This PR adds styles to the price slider of the Filter Products by Price block. It requires the changes in woocommerce/woocommerce-blocks#3300, which decrease the selector specificity of the default styles.

Screenshots

Customizer

Peek 2020-10-20 18-25

Child theme

(Screenshots with Bistro)

Before:
Price filter screenshot

After:
Price filter screenshot with custom styles

How to test the changes in this Pull Request:

  1. Create a page with the price filter and the All Products block.
  2. In the customizer, change the accent color to something different from purple.
  3. Verify the price slider has the new accent color.
  4. Test a Storefront child theme too to ensure the accent color of the child theme is honored as well.

Changelog

Enhancement – Added styles to the Filter Products by Price block, so the accent color is used in the slider.

@Aljullu Aljullu self-assigned this Oct 20, 2020
@Aljullu Aljullu requested review from a team and senadir and removed request for a team October 20, 2020 16:30
@Aljullu Aljullu added the status: needs review PR that needs review label Oct 20, 2020
@Aljullu Aljullu added this to the 2.9.0 milestone Oct 20, 2020
@Aljullu Aljullu added the category: styles Issues related to styling label Oct 20, 2020
Copy link
Member

@senadir senadir left a comment

Choose a reason for hiding this comment

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

Those changes are not being honoured on the editor, this can be addressed in a follow-up.

On initially loading this PR, I see this on frontend
Screen Shot 2020-11-02 at 1 14 13 PM
In the editor, I see this:
Screen Shot 2020-11-02 at 1 15 35 PM

When changing a color, the result is reflected on the frontend, but not the editor.

On trunk, I can see the new purple on both editor and frontend, so I don't know why is the frontend using old purple in this PR.

@senadir
Copy link
Member

senadir commented Nov 2, 2020

I missed this step

In WC Blocks directory check out the branch update/styles-source: git fetch && git checkout update/styles-source.

@senadir
Copy link
Member

senadir commented Nov 2, 2020

After doing that step, I'm still seeing this issue in the editor (color not being respected).

@Aljullu Aljullu force-pushed the add/price-slider-accent-color branch from a71f524 to 07f5846 Compare November 2, 2020 14:20
@Aljullu
Copy link
Contributor Author

Aljullu commented Nov 2, 2020

Those changes are not being honoured on the editor, this can be addressed in a follow-up.

Good catch @senadir! I fixed this in 07f5846. The issue was affecting other blocks like Cart and Checkout (they were not honoring the button color in the editor). I moved the CSS of all blocks so it should be fixed in all.

After doing that step, I'm still seeing this issue in the editor (color not being respected).

Ah, sorry, I just updated the PR to remove that step. It's no longer needed since that PR was merged into WC Blocks.

@Aljullu
Copy link
Contributor Author

Aljullu commented Nov 2, 2020

I will proceed merging this since it has already been approved and this way it gets in trunk for tomorrow's RC. We will still have one week of testing just in case something unexpected happens.

@Aljullu Aljullu merged commit 85402b4 into trunk Nov 2, 2020
@Aljullu Aljullu deleted the add/price-slider-accent-color branch November 2, 2020 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: styles Issues related to styling status: needs review PR that needs review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants