-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: search by shortcut #2594
feat: search by shortcut #2594
Conversation
800cdee
to
39a611d
Compare
@@ -14,7 +14,7 @@ export const TABS_CONTAINER_HEIGHT = 30; | |||
|
|||
export const Panel = styled(MuiBox)({ | |||
flex: 1, | |||
overflowY: 'auto', | |||
overflowY: 'hidden', |
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 sometimes displayed an unnecessary scroll bar for a split second while the attributions/signals panel was updating.
[activeRelation, attributionIds, attributions, multiSelectedAttributionIds], | ||
); | ||
const areAllAttributionsSelected = useMemo(() => { | ||
const activeAttributionIds = attributionIds?.filter( |
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.
we need to filter by active relation first in order to prevent showing the select-all checkbox for a split second while the attributions/signals panel is updating and the active relation may be changing.
39a611d
to
d2a8a4e
Compare
paddingRight: value ? '26px' : '0px', | ||
paddingLeft: '26px', | ||
paddingRight: value ? '24px' : '0px', | ||
paddingLeft: '24px', |
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 makes sure the search button is a square
As discussed, I find the current implementation not really useful as I have to set focus on specific panel first. Instead, I would directly click on the search icon.
|
d2a8a4e
to
92f68af
Compare
I've added four different global hotkeys now, one for each search. |
92f68af
to
d74b0f0
Compare
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.
looks good. See failing tests and the small comment from my side.
- add four global hotkeys for accessing the four different searches - introduce ctrl/cmd+f shortcut to search for resources, attributions, signals depending on the focused context - improve general keyboard accessibility - use React context for search-ref because Redux can only handle serializable data - use context for Virtuoso comp. props as they cannot be inlined: petyosi/react-virtuoso#566 closes #2587 Signed-off-by: Maxim Stykow <maxim.stykow@tngtech.com>
d74b0f0
to
4daded9
Compare
Summary of changes
Context and reason for change
closes #2587
How can the changes be tested
Press ctrl/cmd+f in all four panels where searching is possible.