-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Tracker filters #9298
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
Tracker filters #9298
Conversation
|
Connected to Huly®: UBERF-11658 |
013c7c9 to
b975cd1
Compare
| let resultQuery: DocumentQuery<Issue> = { ...searchQuery } | ||
| function saveTrackerIssueState (): void { | ||
| console.log('[DEBUG_STATE_ISSUES] Save State: Starting for tab', currentTabId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra logs, please remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up
| import { Viewlet } from '@hcengineering/view' | ||
| import ViewletSelector from './ViewletSelector.svelte' | ||
| import FilterButton from './filter/FilterButton.svelte' | ||
| import { WorkbenchTab } from '../../../workbench/types' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. You can't use workbench types in view, because workbench depends on view... You should extract it to the view package, or use Ref instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually indicates the problem with the approach - the header and button components know on which tab rendered, which is not correct per my point of view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the logic to the Workbench layer, keeping all the View components pure
99a8066 to
1dc152c
Compare
|
Can you explain the idea, how this works? |
We save the filter state in a store with a tabId relation and restore the state when user gets back on a tab. That is the basic idea. |
Signed-off-by: Rostislav Nagimov <[email protected]>
82dff5d to
b40ddc1
Compare
Signed-off-by: Rostislav Nagimov <[email protected]>
The issue: filters in a tracker were set globally, so if you have two same tabs you cannot set two different set of filters (and some people in a product_feedback were asking to have this feature).