Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
YairEn wants to merge 18 commits into PythonFreeCourse:develop
base: develop
Choose a base branch
Loading
from YairEn:feature/keyboard-shortcuts

Conversation

@YairEn
Copy link
Contributor

@YairEn YairEn commented Jan 30, 2021

Keyboards shortcuts - New Feature:

  • New page of shortcuts explanation can be found by pressing on keyboard shortcuts button in profile page
  • The shortcuts that was added for now are navigation shortcuts to navigate between pages
  • I'm using the Mousetrap.js lib to catch the key press

Copy link
Member

@yammesicka yammesicka left a 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.

Copy link
Contributor Author

@YairEn YairEn left a 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:)

Copy link
Member

@yammesicka yammesicka left a 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

Copy link

codecov-io commented Feb 23, 2021
edited
Loading

Codecov Report

Merging #160 (c79bc08) into develop (b91708d) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ 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 
Impacted Files Coverage Δ
app/main.py 92.68% <ø> (ø)
app/routers/keyboard_shortcuts.py 100.00% <100.00%> (ø)
app/routers/salary/config.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b91708d...b0a5938. Read the comment docs.

Copy link
Contributor Author

YairEn commented Feb 23, 2021

Yam, I am understand that we are not using cypress?
I did the tests but I talked to Lisaf and understand the his cypress ticket did not merged

Copy link
Member

I'm waiting for @Lisafiluz to resolve the conflicts there

Copy link
Member

@yammesicka yammesicka left a 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

'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'); }
Copy link
Member

@yammesicka yammesicka Feb 23, 2021

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 :)

Copy link
Contributor Author

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 :)

Copy link
Member

@yammesicka yammesicka Feb 23, 2021

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

Copy link
Member

@yammesicka yammesicka Feb 25, 2021

Choose a reason for hiding this comment

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

What have you tried?

Copy link
Contributor Author

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

Copy link
Member

@yammesicka yammesicka Feb 26, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yammesicka yammesicka Awaiting requested review from yammesicka

3 more reviewers

@ivarshav ivarshav ivarshav left review comments

@Gonzom Gonzom Gonzom left review comments

@IdanPelled IdanPelled IdanPelled left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /