Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Store Notices and Catalog Sorting blocks don't work well in dark themes #8265

Closed
Aljullu opened this issue Jan 23, 2023 · 5 comments · Fixed by #8270 or #8278
Closed

Store Notices and Catalog Sorting blocks don't work well in dark themes #8265

Aljullu opened this issue Jan 23, 2023 · 5 comments · Fixed by #8270 or #8278
Labels
focus: global styles Issues that involve styles/css/layout structure. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Jan 23, 2023

To reproduce

  1. Install a theme with a dark background (ie: theme TT3 with Auberginie style or theme Zaino).
  2. Go to Appearance > Editor and edit the Product Catalog template.
  3. Add the Store Notices and Catalog Sorting blocks.
  4. Notice they are illegible.
Editor Frontend
imatge imatge

Expected behavior

We should make sure the texts are legible in dark themes.

@Aljullu Aljullu added type: bug The issue/PR concerns a confirmed bug. focus: global styles Issues that involve styles/css/layout structure. labels Jan 23, 2023
@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 23, 2023

FYI @dinhtungdu @albarin @kmanijak I added this to the Blockifying Product Archive Templates epic.

@nielslange
Copy link
Member

@Aljullu In pdFofs-EZ-p2, @elizaan36 shared some thoughts on that. I think it's helpful to add a comment on that post about the issue you reported here.

@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 23, 2023

Thanks for the heads-up, @nielslange! The existing Store Notices block is just a wrapper around the WC core PHP functions which render the notices, so I don't think it's directly impacted by that project. But I left a comment to get a confirmation.

@albarin
Copy link
Contributor

albarin commented Jan 23, 2023

@Aljullu At least for the Store Notices, I think this is a problem with the Notice component from @wordpress/components and not with the new block. On the editor side, we are using the Notice which is the one with the issue, while on the front end, we are using the PHP function, as you mentioned, and it's rendering fine with those themes.
For example, if you insert the Filter by Attribute block and click on Done without selecting any attribute, you'll see the same behavior with the Notice component.

@Aljullu
Copy link
Contributor Author

Aljullu commented Jan 23, 2023

Good catch! Would it work if we forced notices displayed inside our blocks to have black color text, @albarin?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: global styles Issues that involve styles/css/layout structure. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
3 participants