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

enhance(ux): keymap manager for plugins #9430

Merged
merged 33 commits into from Jun 8, 2023

Conversation

xyhp915
Copy link
Collaborator

@xyhp915 xyhp915 commented May 18, 2023

  • enhance(ux): render the keymap tables pane into a modal dialog
  • feat: bind custom shortcuts for the plugin registered shortcut

Demo

CleanShot.2023-05-18.at.18.01.54.mp4

xyhp915 added 23 commits May 5, 2023 13:06
…display more information for plugin shortcut col
@github-actions github-actions bot added the :type/enhancement Enhancement to product. Does not affect the overall basic use. label May 18, 2023
@cannibalox
Copy link

beautiful !

about shortcut conflicts : a lot of apps (eg adobe or autodesk products) have a way to navigate back and forth between the conflicting shortcut(s) to let the user resolve issues (in the example from 0:35, it could be really useful to quick jump to the assigned shortcut for :go/whiteboard, in case the user wants to keep g w for vim shortcuts and change go whiteboard to something else). Maybe a clickable link in the alert box ?
or in the future, introduce a search box to filter the ever-increasing list of results (or just quick jump to result) ?
also maybe in the long run, it could be nice to expand the command palette ui to enable returning+editing shortcuts directly from the results list ?

you probably already have this on your radar though, so feel free to disregard...
This new modal is a great improvement :)

@xyhp915
Copy link
Collaborator Author

xyhp915 commented May 19, 2023

beautiful !

about shortcut conflicts : a lot of apps (eg adobe or autodesk products) have a way to navigate back and forth between the conflicting shortcut(s) to let the user resolve issues (in the example from 0:35, it could be really useful to quick jump to the assigned shortcut for :go/whiteboard, in case the user wants to keep g w for vim shortcuts and change go whiteboard to something else). Maybe a clickable link in the alert box ? or in the future, introduce a search box to filter the ever-increasing list of results (or just quick jump to result) ? also maybe in the long run, it could be nice to expand the command palette ui to enable returning+editing shortcuts directly from the results list ?

you probably already have this on your radar though, so feel free to disregard... This new modal is a great improvement :)

Hi @cannibalox, Highly appreciate your concern and valuable advice; the current UX with shortcut conflicts is really not friendly enough. Fortunately, we'll address this in another refactoring for the shortcuts system as soon as possible!

@Bad3r
Copy link
Collaborator

Bad3r commented May 23, 2023

Great enhancement! I tested this PR locally; here are some of my observations;

  • when opening the keymap manager from the command palette, Logseq UI reloads/flashes quickly. It's not an issue, but it's weird that the whole UI is refreshed, and it's noticeable.
  • After opening the keymap manager, it's not possible to use arrow keys to navigate up/down
  • The closing 'x' scrolls down and overlaps with other UI elements; you might want to consider making it fixed at the top
    image

Copy link
Collaborator

@logseq-cldwalker logseq-cldwalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xyhp915 Looks nice! 👍 🚢 Works well on openai plugin. Left some minor questions

src/main/frontend/components/shortcut.cljs Show resolved Hide resolved
@logseq-cldwalker
Copy link
Collaborator

when opening the keymap manager from the command palette, Logseq UI reloads/flashes quickly. It's not an issue, but it's weird that the whole UI is refreshed, and it's noticeable.
After opening the keymap manager, it's not possible to use arrow keys to navigate up/down
The closing 'x' scrolls down and overlaps with other UI elements; you might want to consider making it fixed at the top

I didn't see the first behavior on osx but I did see the other two

@xyhp915
Copy link
Collaborator Author

xyhp915 commented May 26, 2023

Great enhancement! I tested this PR locally; here are some of my observations;

  • when opening the keymap manager from the command palette, Logseq UI reloads/flashes quickly. It's not an issue, but it's weird that the whole UI is refreshed, and it's noticeable.
  • After opening the keymap manager, it's not possible to use arrow keys to navigate up/down
  • The closing 'x' scrolls down and overlaps with other UI elements; you might want to consider making it fixed at the top
    image

Nice shot to UI details. I'll simply polish the UI for this PR :-). Because we are unifying the entire UI component design system, the design of this modal component will also be improved.

@xyhp915 xyhp915 requested a review from tiensonqin May 26, 2023 14:41
@logseq-cldwalker
Copy link
Collaborator

logseq-cldwalker commented May 26, 2023 via email

@xyhp915
Copy link
Collaborator Author

xyhp915 commented May 28, 2023

Just to clarify I'm asking if it's a breaking change, not when we should do work to make it backwards compatible. Is it a breaking change? If so, we should mention it in the PR title as users have complained when we don't communicate breaking changes. If it's a minor we can call it "minor behavior change" like we did in #9291

On Fri, 26 May 2023 at 10:31, Charlie @.> wrote: @.* commented on this pull request. ------------------------------ In src/main/frontend/modules/shortcut/config.cljs <#9430 (comment)>: > @@ -113,19 +113,19 @@ :whiteboard/zoom-out {:binding "shift+dash" :fn #(.zoomOut (.-api ^js (state/active-tldraw-app)) false)} - :whiteboard/zoom-in {:binding "shift+=" + :whiteboard/zoom-in {:binding "shift+equals" I think it's best to support them in later refactorings. — Reply to this email directly, view it on GitHub <#9430 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXFVC5YKEREYD3W7V7YBZOLXIC5DJANCNFSM6AAAAAAYGIPRPM . You are receiving this because you commented.Message ID: @.***>

Gotcha! It's not a breaking change. Also, it's just a fix :)

@tiensonqin tiensonqin requested review from andelf and cnrpman May 30, 2023 08:12
@xyhp915
Copy link
Collaborator Author

xyhp915 commented Jun 6, 2023

@andelf @cnrpman Asking for code reviewers :)

Copy link
Collaborator

@cnrpman cnrpman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@logseq-cldwalker logseq-cldwalker merged commit c45f066 into master Jun 8, 2023
6 checks passed
@logseq-cldwalker logseq-cldwalker deleted the enhance/keymaps-manager-x branch June 8, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:type/enhancement Enhancement to product. Does not affect the overall basic use.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants