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

2.0a Controls visibility filter resets too often and feels slow to use #1495

Open
Kovas opened this issue Nov 16, 2024 · 5 comments
Open

2.0a Controls visibility filter resets too often and feels slow to use #1495

Kovas opened this issue Nov 16, 2024 · 5 comments
Assignees
Labels
feature Features, refactoring, enhancements, improvements Low Effort
Milestone

Comments

@Kovas
Copy link

Kovas commented Nov 16, 2024

Unlike the search field, the visibility filter is reset every time the "All Devices" breakpoint is switched or the block is changed.

Additionally, the dropdown feels somewhat sluggish, possibly due to the issue mentioned above. It might be more efficient to use two icons functioning as checkboxes, allowing for faster switching and the ability to combine both filters.

@Kovas Kovas added the triage Awaiting review label Nov 16, 2024
@tomusborne tomusborne added feature Features, refactoring, enhancements, improvements and removed triage Awaiting review labels Nov 19, 2024
@tomusborne
Copy link
Owner

Thanks, @Kovas!

This was also mentioned here: https://generatepress.com/generateblocks-2-0-a-new-era/#comment-907410

We should consider storing the filter type in the URL like we do the search params @iansvo.

@iansvo iansvo self-assigned this Nov 25, 2024
@iansvo
Copy link
Collaborator

iansvo commented Nov 25, 2024

@Kovas Just an FYI, the two filter types are not compatible with each other. One of them filters controls that aren't set on the block or global style, the other hides anything that is set and only shows inherited values (i.e. values that aren't set but come from elsewhere).

My latest PR refactors the filters to use the URL search params just like search, which should be better here.

@iansvo iansvo added this to the 2.0.0 milestone Nov 25, 2024
@Kovas
Copy link
Author

Kovas commented Nov 26, 2024

@iansvo, my reasoning for combining filters is that it simplifies jumping between breakpoints and editing set values quickly.

For example, take the inner container: it has max-width and margins defined at the "All devices" breakpoint. Since filters can't be combined, switching between breakpoints becomes tedious, because one breakpoint has set values, while others show inherited values. Even worse, when editing inherited values, they immediately become set values and vanish from the inherited view, disrupting the flow mid-edit.

@tomusborne
Copy link
Owner

Re-opening this, as the merged PR only addresses one of the issues.

@tomusborne tomusborne reopened this Dec 2, 2024
@tomusborne tomusborne removed this from the 2.0.0 milestone Dec 2, 2024
@iansvo iansvo added this to the 2.0.0 milestone Dec 10, 2024
@iansvo
Copy link
Collaborator

iansvo commented Dec 10, 2024

My latest PR adds support for multiple filters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Features, refactoring, enhancements, improvements Low Effort
Projects
None yet
Development

No branches or pull requests

3 participants