Skip to content

Added Shortcut Panel #67

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

Closed
wants to merge 18 commits into from
Closed

Conversation

om-ray
Copy link

@om-ray om-ray commented May 19, 2022

What does this pull request do?

This pull request adds a panel that shows you every shortcut that the app uses. It is available after you either:

  • Open a JSON file
  • Open a URL that leads to a JSON file
  • Paste in some JSON on the home page

It can be opened using:

  • The shortcut Alt/Option + S which can be seen in the button on the left-hand side of the footer
  • Clicking on the above-mentioned button

When opened, it shows you a list of the app's shortcuts, all in their own categories, with icons for each of the shortcuts on the left. All shortcuts that use an OS-dependent modifier key (eg. Cmd (Mac) / Ctrl (Windows/Linux)) will only show the shortcut using the key that the user's OS would use.

Screen Shot 2022-05-19 at 10 50 02 PM

The panel is also dark mode styled and will change when the user toggles dark mode.

Screen Shot 2022-05-19 at 10 41 58 PM

The panel can be closed by:

  • Using the shortcut used to open the panel (Alt/Option + S)
  • Clicking anywhere outside of the panel
  • Clicking the "x" in the top right-hand corner of the panel

There is a demo Loom video below where you can see all the functionalities that I described above in practice

https://www.loom.com/share/bd12894537f342a7bac126bf3518bb7e

@om-ray
Copy link
Author

om-ray commented May 22, 2022

@samejr Please check this PR

@om-ray om-ray marked this pull request as draft May 23, 2022 06:59
@om-ray om-ray marked this pull request as ready for review May 23, 2022 07:00
@matt-aitken
Copy link
Member

@samejr can you run this branch and check you're happy with the functionality. @123OM123 the code looks good to me, other than the very minor change to the tsconfig.json I mention in my review

1 similar comment
@matt-aitken
Copy link
Member

@samejr can you run this branch and check you're happy with the functionality. @123OM123 the code looks good to me, other than the very minor change to the tsconfig.json I mention in my review

@samejr
Copy link
Member

samejr commented May 23, 2022

Hey @123OM123 it's looking great 👍. Here are a few tweaks:

  • Can you remove the line of copy at the top of the panel "View and change..." as you can't update the shortcuts in this branch.
  • Can you add the X icon in the top right (like you have in the other branch)
  • Add the dark mode styling for the panel and footer link (It's working in the other branch but not this one)
  • Remove the button background on hover in the footer link. Just have this as a subtle text link. You can give it a 90% opacity and fade it up to 100% on hover if you like.
  • Also, worth making the whole footer link behave like a link so the cursor should turn to a pointer across the whole thing.

@om-ray
Copy link
Author

om-ray commented May 23, 2022

@samejr I made all the changes you recommended.

@samejr
Copy link
Member

samejr commented May 24, 2022

Thanks for this, here's a few more tweaks:

  1. Add some margin between the text and key icons
    CleanShot 2022-05-24 at 10 50 07
  2. Footer text needs to be styled in dark mode
    CleanShot 2022-05-24 at 10 51 06
  3. The close X button in the top right of the panel doesn't close the panel. Also the Esc key doesn't dismiss the panel too.
  4. The shortcut text in the panel doesn't have dark mode styling
    CleanShot 2022-05-24 at 10 52 11
  5. If you hit Cmd K while the shortcuts menu is open, it should close the shortcut panel and open the search bar.

Copy link
Member

@matt-aitken matt-aitken left a comment

Choose a reason for hiding this comment

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

Sorry I've been slow looking at this, busy with other work at the moment.

I'm happy with this except for the faking click code

@om-ray om-ray requested a review from matt-aitken May 24, 2022 18:10
@ericallam ericallam closed this Oct 5, 2022
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.

4 participants