-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Create reusable FilterMenu
with advanced options
#16522
Merged
dannon
merged 12 commits into
galaxyproject:dev
from
ahmedhamidawan:reusable_filters_component
Oct 13, 2023
Merged
Create reusable FilterMenu
with advanced options
#16522
dannon
merged 12 commits into
galaxyproject:dev
from
ahmedhamidawan:reusable_filters_component
Oct 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ahmedhamidawan
added
area/UI-UX
kind/feature
kind/refactoring
cleanup or refactoring of existing code, no functional changes
labels
Aug 6, 2023
ahmedhamidawan
force-pushed
the
reusable_filters_component
branch
from
August 28, 2023 18:13
590f57b
to
daae119
Compare
ahmedhamidawan
force-pushed
the
reusable_filters_component
branch
from
September 29, 2023 21:48
684a07a
to
4c17c80
Compare
ahmedhamidawan
force-pushed
the
reusable_filters_component
branch
2 times, most recently
from
October 10, 2023 00:20
1e39d4e
to
6909bf2
Compare
Instead of creating a new filter/search with an advanced filtering menu for each item, this `FilterMenu` component, along with the `Filtering` class can be used in each case. Also modified the `Filtering` class so that we never need to create a `filterSettings = { "name:": "x", "create_time>": "2023" }` object and can instead just use: `filters = { name: "x", create_time_gt: "2023" }`
also add a `'Radio'` type in addition to the existing `typeof Boolean` also add a function to `Filtering` class: `addRangedFiltersIfNotPresent()`
Add functionailty for 3 types of menus. E.g.s: - `HistoryPanel` has default `linked` menu i.e.: `filters` object is reactive to `filterText` - `ToolSearch` has `separate` menu (not reactive, since `filterText` is for side panel search and menu is for advanced search in center panel) - `WorkflowBox` has a `standalone` menu (no `filterText`
also: - create `WorkflowFilters.js` that exports reusable `Filtering` - allow `MultiTags` filter type for `FilterMenu`, which allows you to add a `StatelessTags` field in the menu, allowing for array values as filter - allow `is:filter` filters that are Boolean filters, except, they only be set to true - apart from `q=filter1&qv=val&q=filter2&qv=val&...` query strings for the backend, the `Filtering` class can now also create `backendFormatted` strings in the form `filter1:val filter2:val`
ahmedhamidawan
force-pushed
the
reusable_filters_component
branch
from
October 12, 2023 18:31
a771985
to
1c37fa9
Compare
dannon
approved these changes
Oct 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/UI-UX
kind/feature
kind/refactoring
cleanup or refactoring of existing code, no functional changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of creating a new filter/search with an advanced filtering menu for each item (
HistoryFilters
, filters inHistoryPublishedList
,ToolSearch
, ...), thisFilterMenu
component, along with theFiltering
class can be reused with the appropriate props.Also modified the
Filtering
class so that we never need to create afilterSettings = { "name:": "x", "create_time>": "2023" }
object (with"name" -> "name:"
aliases) and can instead just use:filters = { name: "x", create_time_gt: "2023" }
Sample usage:
Provide a
Filtering
object with valid filters in the<script>
(or import it):In the
<template>
, provide theFilterMenu
props as required:Shows up like so:
How to test the changes?
(Select all options that apply)
License