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

Fix keyboard navigation issues #2203

Merged
merged 3 commits into from
May 15, 2024
Merged

Fix keyboard navigation issues #2203

merged 3 commits into from
May 15, 2024

Conversation

azmy60
Copy link
Contributor

@azmy60 azmy60 commented May 13, 2024

close #2187


🚀 This description was created by Ellipsis for commit 9c812cb

Summary:

Enhances keyboard navigation and focus management across multiple components, improving accessibility and user experience.

Key points:

  • Updated focus styles in _mixins.scss.
  • Enhanced keyboard navigation and focus management in TabQueryEditor.vue.
  • Adjusted focus behavior in ConfirmationModal.vue.
  • Improved focus handling and added scrolling adjustments in ResultTable.vue.
  • Restored focus after updates in TableTable.vue.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to 9c812cb in 2 minutes and 17 seconds

More details
  • Looked at 224 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. apps/studio/src/assets/styles/app/_mixins.scss:56
  • Draft comment:
    Consider increasing the outline-offset for :focus-visible to ensure it is clearly visible on all displays. A value around 0.2rem or 0.3rem might be more noticeable.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.
2. apps/studio/src/components/common/modals/ConfirmationModal.vue:32
  • Draft comment:
    Ensure that the change in autofocus behavior in the ConfirmationModal (from "Confirm" to "Cancel" button) is intentional and documented, as it alters the user experience and expectations.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_azLz8tNPNAT7k2gk


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

3 days left in your free trial, upgrade for $20/seat/month or contact us.

updateTextEditorFocus(focused: boolean) {
this.switchPaneFocus(undefined, focused ? 'text-editor' : 'table')
},
switchPaneFocus(_event?: KeyboardEvent, target?: 'text-editor' | 'table') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider refactoring the switchPaneFocus method to use a more robust and scalable approach than string comparison for managing focus targets. Using an enum or constants for focus targets could improve maintainability and reduce potential bugs.

@@ -240,6 +245,38 @@
} catch {
return 0;
}
},
scrollToRangeIfOutOfView() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider refactoring the scrollToRangeIfOutOfView method in the ResultTable component to avoid duplicating code. Using a shared utility function or ensuring that the Tabulator library provides this functionality natively would be more maintainable.

@rathboma rathboma merged commit df818b2 into master May 15, 2024
13 checks passed
@rathboma rathboma deleted the fix/keyboard-issues branch May 15, 2024 14:14
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.

BUG: Several more issues with focus (largely thanks to Tabulator / Codemirror)
2 participants