-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 "selected" styling to active elements in the design selector. #65127
Comments
CC: @scruffian @MaggieCabrera , I think you may have worked on the inspector control. Thank you for looking. |
@juanfra @jasmussen I'll look into this and create a PR for the same. |
Hey folks! Coming back to this issue after a first round of review on #65917 and wanted to add a clarification to this suggestion:
That is true! Although we won't be able to rely on the "active" item to style the "selected" item — there's a difference between the two:
This scenario is similar to what happens in https://github.com/WordPress/gutenberg/blob/8a7df39e11758aade23c586b435830a5d35aa5f2/packages/dataviews/src/dataviews-layouts/list/index.tsx I'm leaving this clarification because folks who are not knowledgeable about how composite widgets and the |
Thanks for the clarification Marco! Indeed, the suggestion is to add styling over the "selected" element.
Definitely! I referenced the |
Thanks for all the details and explanations that you have shared. Now it is more clear regarding the scenario that we need to handle. So I will look into these points in details and work on some alternative solutions. Just clarifying that, we need the selected pattern styling along with this, right? Regards, |
Thanks @benazeer-ben
We need to highlight which design is selected, right. |
Hi @ciampo I have updated the code as per your feedbacks and committed. So please have a look on that and share your thoughts on this. I have also added separate explanations for each feedback that you have provided. So now, we are highlighting which design is selected. Regard, |
@WordPress/gutenberg-design , could you advise on the styles for the selected design (pattern) ? I have a draft proposal in #66185 but it definitely needs some design feedback |
Got it — so the standard "primary color" (blueberry) outline for focused items, and a black outline for selected. Kapture.2024-10-18.at.15.10.24.mp4Focus styles and hover styles should override selected styles. |
Yes. We can evolve the treatment if need be, for the moment the main point is they should be the same. |
What problem does this address?
While working on TT5, I noticed no visual indication of the design chosen for templates. It would be nice to know at a first glance which design is active.
Screen.Recording.2024-09-06.at.17.43.57.mov
To reproduce:
What is your proposed solution?
We could leverage what we already have. The
:focus
style for that same element already has a visual hint (border with the admin accent color). We know with thedata-active-item
which element is active.The other option, which can also be in line with the design patterns we already have in place, could be replicating what we have for the "selected" state in the "Templates" page of the site editor.
Screen.Recording.2024-09-06.at.17.56.55.mov
The text was updated successfully, but these errors were encountered: