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

Show applied filter #6225

Merged
merged 5 commits into from
Jul 30, 2020
Merged

Show applied filter #6225

merged 5 commits into from
Jul 30, 2020

Conversation

kirya-dev
Copy link
Contributor

@kirya-dev kirya-dev commented Jul 25, 2020

Subject

Change the UX-behavior to stop hidding default filter and considering them as normal filters.

Closes #6217.
Closes #6137.
Closes #5745.

Changelog

## Changed:
- Stop to hide default filters in order to provide a more natural UX-behavior.

## Deprecate
- Abstract:: isDefaultFilter method.

src/Admin/AdminInterface.php Outdated Show resolved Hide resolved
src/Admin/AbstractAdmin.php Show resolved Hide resolved
src/Resources/views/CRUD/base_list.html.twig Outdated Show resolved Hide resolved
src/Resources/views/CRUD/base_list.html.twig Outdated Show resolved Hide resolved
src/Resources/views/CRUD/base_list.html.twig Outdated Show resolved Hide resolved
@VincentLanglet
Copy link
Member

@kirya-dev Test are failing because of the deprecation.

You have to add a @legacy annotation, a @expectDepraction deprecationMessage annotation and a NEXT_MAJOR: Remove this test comment , like it's done for some other test.

@kirya-dev
Copy link
Contributor Author

You have to add a @legacy annotation, a @expectDepraction deprecationMessage annotation and a NEXT_MAJOR: Remove this test comment , like it's done for some other test.

Hmm. Test required for check default logic.. Test has others assert not related with isDefaultFilter

@kirya-dev kirya-dev closed this Jul 25, 2020
@kirya-dev kirya-dev reopened this Jul 25, 2020
@VincentLanglet VincentLanglet requested a review from a team July 25, 2020 20:10
@VincentLanglet VincentLanglet requested review from a team, jordisala1991 and phansys July 25, 2020 21:36
@jordisala1991
Copy link
Member

The changelog is not well formed.

It will be nice to have some screenshots about before and after.

Ad it would be nice if you explain what is the alternative to setting default filters now. Bonus point if you add it to the deprecation message

@kirya-dev
Copy link
Contributor Author

Ad it would be nice if you explain what is the alternative to setting default filters now

Configure default filter was not change

@VincentLanglet
Copy link
Member

It will be nice to have some screenshots about before and after.

Before, you see nothing
image
But the filter was active
image
And you couldn't know the value applied.

Now, it's more natural
image

And it would be nice if you explain what is the alternative to setting default filters now. Bonus point if you add it to the deprecation message

You can still set default filter using the configureDefaultFilterValues method.
But if you're doing so, the filter will be displayed.
It's more user friendly to see how your list is filtered.

I you really want a hidden filter, you should rely on the configureQuery.

@VincentLanglet VincentLanglet merged commit 5539f02 into sonata-project:3.x Jul 30, 2020
@VincentLanglet
Copy link
Member

Thanks !

@kirya-dev kirya-dev deleted the fix-showing-applied-datagrid-filters branch July 30, 2020 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show filter Default filter "hidden by default" are not UI friendly and are currently buggy.
3 participants