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

Toggle Side menu with keyboard shortcuts #81

Merged
merged 9 commits into from
Jun 30, 2024

Conversation

Ktbch
Copy link
Contributor

@Ktbch Ktbch commented Jun 28, 2024

Adding a new feature which allows user to toggle the side menu with a keyboard shortcut
Which is the combination of the following keys
Control/CMD + B

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Tests
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

  • toggle of side menu bar with control/CMD + B

Does this introduce a breaking change?

  • Yes
  • No

Other information

Ktbch added 6 commits June 24, 2024 19:05
fix: widgetHead fix overflow: removal of uncessary css
New Feature: toggle side menu o control or cmd B
toogle on keyboard shortcut logic improvement
Adding a keyboard shortcut to toggle side menu
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

preventinf re attachment on every render
Copy link
Contributor Author

@Ktbch Ktbch left a comment

Choose a reason for hiding this comment

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

Prevention of reattachment of the handlekeypress function in every render

(event: KeyboardEvent) => {
if ((event.ctrlKey || event.metaKey) && event.keyCode === 66) {
setIsFullWidth(!isFullWidth);
console.log(isFullWidth);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this log

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it

@Ktbch
Copy link
Contributor Author

Ktbch commented Jun 30, 2024

Removal of of console.log from handlekeypress function

Copy link
Contributor

@thrownullexception thrownullexception left a comment

Choose a reason for hiding this comment

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

Nicely Done

@thrownullexception thrownullexception merged commit 24fb7ca into dashpresshq:master Jun 30, 2024
0 of 3 checks passed
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.

3 participants