Skip to content

UI: Keyboard Shortcut(s) - #8250

Open
apurv-1 wants to merge 7 commits into
apache:mainfrom
apurv-1:keyboard-shortcuts
Open

UI: Keyboard Shortcut(s)#8250
apurv-1 wants to merge 7 commits into
apache:mainfrom
apurv-1:keyboard-shortcuts

Conversation

@apurv-1

@apurv-1 apurv-1 commented Nov 18, 2023

Copy link
Copy Markdown
Contributor

Description

Adds the support to navigate through CloudStack Management UI with Keyboard.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@apurv-1

apurv-1 commented Nov 18, 2023

Copy link
Copy Markdown
Contributor Author

@borisstoyanov can we show the list of keyboard shortkeys in a different way? for eg: github (shift+?)

Screenshot 2023-11-18 at 6 52 29 PM

cc: @rohityadavcloud

@apurv-1 apurv-1 mentioned this pull request Nov 18, 2023
5 tasks
@borisstoyanov

Copy link
Copy Markdown
Contributor

nice, great to see you back on this @apurv-1! The list you suggest seems good, let me know if you need any help/testing

@codecov

codecov Bot commented Nov 20, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0bc7fb5) 30.75% compared to head (4082d43) 31.22%.

❗ Current head 4082d43 differs from pull request most recent head b0ecf89. Consider uploading reports for the commit b0ecf89 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8250      +/-   ##
============================================
+ Coverage     30.75%   31.22%   +0.47%     
+ Complexity    33910    31081    -2829     
============================================
  Files          5341     4839     -502     
  Lines        374759   338361   -36398     
  Branches      54510    48669    -5841     
============================================
- Hits         115248   105657    -9591     
+ Misses       244276   218202   -26074     
+ Partials      15235    14502     -733     
Flag Coverage Δ
simulator-marvin-tests 25.15% <ø> (+0.50%) ⬆️
uitests ?
unit-tests 14.81% <ø> (-1.63%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vishesh92

Copy link
Copy Markdown
Member

@blueorangutan ui

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/8250 (QA-JID-228)

@yadvr

yadvr commented Nov 27, 2023

Copy link
Copy Markdown
Member

Excellent, thanks for raising this @apurv-1

@DaanHoogland

Copy link
Copy Markdown
Contributor

@apurv-1 I know I have asked this and you replied but I can not find the dialog above so;

Will you add the other shortcuts from the old PR as well?

@apurv-1

apurv-1 commented Nov 27, 2023

Copy link
Copy Markdown
Contributor Author

@apurv-1 I know I have asked this and you replied but I can not find the dialog above so;

Will you add the other shortcuts from the old PR as well?

Yeah, I am planning to add older shortcuts and but to display shortcuts, I am inclining the way github shows it i.e by opening a dialog. (We can discuss more on this, its just a suggestion right now)

@DaanHoogland

Copy link
Copy Markdown
Contributor

@apurv-1 I know I have asked this and you replied but I can not find the dialog above so;
Will you add the other shortcuts from the old PR as well?

Yeah, I am planning to add older shortcuts and but to display shortcuts, I am inclining the way github shows it i.e by opening a dialog. (We can discuss more on this, its just a suggestion right now)

ok, so do you want this merged as is or add to it first?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@apurv-1

apurv-1 commented Nov 27, 2023

Copy link
Copy Markdown
Contributor Author

@apurv-1 I know I have asked this and you replied but I can not find the dialog above so;
Will you add the other shortcuts from the old PR as well?

Yeah, I am planning to add older shortcuts and but to display shortcuts, I am inclining the way github shows it i.e by opening a dialog. (We can discuss more on this, its just a suggestion right now)

ok, so do you want this merged as is or add to it first?

I will add the more shortcuts then add the dialog then it will be ready for merge. Sorry, for confusion will change this to draft PR 😅

@apurv-1
apurv-1 marked this pull request as draft November 27, 2023 11:18
@github-actions

github-actions Bot commented Dec 1, 2023

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@yadvr

yadvr commented Dec 12, 2023

Copy link
Copy Markdown
Member

@apurv-1 thanks for the PR (again), could you resolve the conflict? Thanks.

@apurv-1

apurv-1 commented Dec 12, 2023

Copy link
Copy Markdown
Contributor Author

@apurv-1 thanks for the PR (again), could you resolve the conflict? Thanks.

Yeah, Sure

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@codecov-commenter

codecov-commenter commented Apr 18, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.92%. Comparing base (1ceb1d0) to head (fb76569).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##              main    #8250       +/-   ##
============================================
+ Coverage     3.41%   20.92%   +17.51%     
- Complexity       0    19790    +19790     
============================================
  Files          487     5881     +5394     
  Lines        41867   533022   +491155     
  Branches      7912    62441    +54529     
============================================
+ Hits          1429   111539   +110110     
- Misses       40238   409410   +369172     
- Partials       200    12073    +11873     
Flag Coverage Δ
uitests ?
unittests 20.92% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland DaanHoogland reopened this Apr 19, 2024
@vladimirpetrov

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vladimirpetrov a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@apurv-1

apurv-1 commented Apr 21, 2024

Copy link
Copy Markdown
Contributor Author

@DaanHoogland we can merge this and then have follow up PRs for improvements. We can start with "what are the 10 most used actions that user performs on the UI"? I can start with adding shortkeys for those actions.

Agree, @apurv-1 . I think this would be a good topic to start a new discussion on ;)

@DaanHoogland started a discussion here :)

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9348

@DaanHoogland DaanHoogland changed the title UI: Keyboard Shortcuts UI: Keyboard Shortcut(s) Apr 25, 2024
@vladimirpetrov

Copy link
Copy Markdown
Contributor

Hi @apurv-1, I tested the feature but it seems that the 'r' shortcut doesn't work on the following pages:

  • 'Domains' page
  • 'Infrastructure' summary page
  • 'Infrastructure' - CPU sockets page
  • 'Infrastructure' - DB/Usage server page
  • 'Configuration' - Global Settings
  • 'Tools' - Import-Export Instances

@DaanHoogland

Copy link
Copy Markdown
Contributor

@vladimirpetrov , do you think that needs to be implemented before we can merge?

@vladimirpetrov

Copy link
Copy Markdown
Contributor

Well, I think we should be consistent - wherever there is a 'Refresh' button, the shortcut must work, so yes, @DaanHoogland

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@vladimirpetrov I do not think any more effort is going to be put into this. jfyi

@DaanHoogland

Copy link
Copy Markdown
Contributor

@vladimirpetrov (cc @apurv-1 ) I merged main. lets create a new issue from your comment #8250 and continue with this if it tests ok?

@DaanHoogland

Copy link
Copy Markdown
Contributor

Well, I think we should be consistent - wherever there is a 'Refresh' button, the shortcut must work, so yes, @DaanHoogland

I do not agree @vladimirpetrov . Better to have inconsistent keyboard shortcut then to have none.

@weizhouapache weizhouapache modified the milestones: 4.23.0, 4.24.0 Jun 29, 2026
@nvazquez

Copy link
Copy Markdown
Contributor

Hi @apurv-1 @DaanHoogland @vladimirpetrov I see there has been some testing on this PR but hasn't been merged, are there any further issues to be solved on this PR?

@apurv-1

apurv-1 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Hi @apurv-1 @DaanHoogland @vladimirpetrov I see there has been some testing on this PR but hasn't been merged, are there any further issues to be solved on this PR?

@nvazquez based on the recent testing from @vladimirpetrov, he mentioned the refresh is not working for these pages-

'Domains' page
'Infrastructure' summary page
'Infrastructure' - CPU sockets page
'Infrastructure' - DB/Usage server page
'Configuration' - Global Settings
'Tools' - Import-Export Instances

I can update & test things if we're planning to merge this feature in the latest release? The current PR is almost 2 years old now 😅

Copilot AI lite review requested due to automatic review settings August 12, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds initial keyboard-shortcut support to the CloudStack Management UI by introducing a keyboard shortcut for refreshing data in AutogenView, and wiring up a shortcut plugin at the app level.

Changes:

  • Register vue3-shortkey as a Vue plugin in the UI bootstrap.
  • Add a refresh keyboard shortcut binding to the refresh button in AutogenView.
  • Add vue3-shortkey (and transitive deps) to UI dependencies/lockfile.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
ui/src/views/AutogenView.vue Adds a keyboard shortcut handler to trigger refresh.
ui/src/main.js Registers the vue3-shortkey plugin with basic input/textarea prevention.
ui/package.json Adds vue3-shortkey dependency.
ui/package-lock.json Locks vue3-shortkey and its transitive dependencies.
Files not reviewed (1)
  • ui/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +40 to 42
v-shortkey="['r']"
@shortkey="fetchData({ irefresh: true })"
@click="fetchData({ irefresh: true })"
Comment on lines +40 to +41
v-shortkey="['r']"
@shortkey="fetchData({ irefresh: true })"
Comment thread ui/src/main.js
vueApp.use(backupUtilPlugin)
vueApp.use(extensions)
vueApp.use(directives)
vueApp.use(require('vue3-shortkey'), { prevent: ['input', 'textarea'] })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.