-
Notifications
You must be signed in to change notification settings - Fork 52
Feature/keyboard shortcuts #160
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
base: develop
Are you sure you want to change the base?
Feature/keyboard shortcuts #160
Conversation
remove bootstrap and js file from home_shortcuts add test for router
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.
Awesome work!
Can you please add tests to the JS part?
You can use either Jest (the more popular one) or Cypress.
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.
Thank you yam!
Working now on js test:)
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.
Awesome work, there are some small improvement to do :) Keep up the good work
Fix CR and conflicts
Codecov Report
@@ Coverage Diff @@
## develop #160 +/- ##
===========================================
- Coverage 95.15% 95.11% -0.04%
===========================================
Files 76 77 +1
Lines 3382 3359 -23
===========================================
- Hits 3218 3195 -23
Misses 164 164
Continue to review full report at Codecov.
|
Yam, I am understand that we are not using cypress? |
I'm waiting for @Lisafiluz to resolve the conflicts there |
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.
Great job, added few insights
app/templates/partials/user_profile/sidebar_left/features_card.html
Outdated
Show resolved
Hide resolved
'alt+c+p': function() { window.open('/profile/', '_self'); }, | ||
'alt+c+s': function() { window.open('/search/', '_self'); }, | ||
'alt+c+a': function() { window.open('/agenda/', '_self'); }, | ||
'ctrl+.': function() { window.open('/keyboard_shortcuts/', '_self'); } |
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.
Can you open this using modal instead? It's actually not too hard :)
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.
I do not understand, I need to open the page itself , not?
modal open a modal not the page, I need to navigate the user to the page he wanted
Thanks :)
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.
I think it's better not to move the user to a whole new page, but to show him the keyboard shortcuts in the same page. Just like Jupyter Notebook does.
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.
Ahh, do you mean just the /keyboard_shortcuts to open like modal 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.
Hey, I created Modal instead of page by using the button in profile page and It's definitely more beautiful, but I was not able to run it nicely by keyboard shortcut. so I removed that shortcut it for now.
All the ways that I found to do so, was by change the visibility (CSS) or using jQuery or JS but by change the button of the modal to use JS function instead.
If you know how to do so I'll be glad to hear
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.
What have you tried?
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.
$(#keyboard-shortcuts).modal('show') - It did not work
or just change the display of the element to block
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.
It does not work because it assumes jQuery is imported (and also syntactically wrong - there are no quote signs wrapping #keyboard-shortcuts
). Look at the relevant documentation of bootstrap 5, not 4
Keyboards shortcuts - New Feature: