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

Filters - New Functionality - Adding ID to Filter Labels in menus to allow for easy targeting #1087

Closed
wants to merge 6 commits into from

Conversation

lrljoe
Copy link
Collaborator

@lrljoe lrljoe commented Mar 5, 2023

To allow for manipulation/targeting of these elements, either by CSS or JS without impacting on the the wider toolbar elements. For example, I'd like to add a clickable icon to the label, or an extra attribute to the wrapper.

Also in plan is collapsible filters for when there's a large number in use.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests and did you add any new tests needed for your feature?
  2. Did you update all templates (if applicable)?
  3. Did you add the relevant documentation (if applicable)?
  4. Did you test locally to make sure your feature works as intended?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Adding ID to Label

Update toolbar.blade.php

Adding new line at EOF
@lrljoe
Copy link
Collaborator Author

lrljoe commented Mar 5, 2023

I'd actually prefer to move the filter labels into the actual blade files for the filters, as that seems a more sensible place to have them than in the toolbar.
Then in future, perhaps add a configuration option to display/not-display certain filters based on configuration options. This may make the filters array a bit easier to work with, for example only display the "Is Admin" filter to admins. Similar to the hideIf() option for columns.

Not sure what your thoughts are @rappasoft ?

Adding ID to Wrapper
Adding ID to Label

Adding ID to Wrapper

Adding new line at EOF

Update toolbar.blade.php

Adding ID to Wrapper
Adds IDs to Filter Labels
Adds IDs to Filter Wrappers
Restores removed EOF newline
@lrljoe
Copy link
Collaborator Author

lrljoe commented Mar 18, 2023

Yeah, definitely thinking more it'd be better to have them in with the filter blade, perhaps as an anonymous view component to make maintenance simple. But I think adding IDs will cause more issues similar to the header/footer filter ID clashing.

@lrljoe lrljoe changed the title Adding ID to Filter Labels in menus to allow for easy targeting Filters - New Functionality - Adding ID to Filter Labels in menus to allow for easy targeting Mar 20, 2023
@lrljoe
Copy link
Collaborator Author

lrljoe commented Mar 20, 2023

Propose using #1110 instead

@lrljoe
Copy link
Collaborator Author

lrljoe commented Mar 20, 2023

See #1111

@lrljoe lrljoe closed this Mar 20, 2023
@rappasoft rappasoft mentioned this pull request Apr 8, 2023
@lrljoe lrljoe deleted the FilterLabelID branch July 15, 2023 22:29
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.

1 participant