-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
fix: create view keyboard events should not affect the canvas when ex… #10562
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: create view keyboard events should not affect the canvas when ex… #10562
Conversation
…tension pane is open
📝 WalkthroughWalkthroughThe changes modify the keyboard navigation logic by expanding the early return conditions in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant KeyboardNavigation as KeyboardNav
participant BrowserUtils
User->>KeyboardNav: Key down event
KeyboardNav->>KeyboardNav: Check isViewSearchActive()
alt Search view active
KeyboardNav-->>User: Return without processing
else
KeyboardNav->>BrowserUtils: Check isCreateViewActive()
alt Create view active
KeyboardNav-->>User: Return without processing
else
KeyboardNav->>KeyboardNav: Process key event
KeyboardNav-->>User: Execute keyboard navigation logic
end
end
Suggested labels
Suggested reviewers
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/nc-gui/utils/browserUtils.ts (1)
13-13: Make return type consistent with other similar functions.The function should return a boolean to be consistent with other similar functions in the file, such as
isViewSearchActive.-export const isCreateViewActive = () => document.querySelector('.nc-view-create-modal') +export const isCreateViewActive = () => !!document.querySelector('.nc-view-create-modal')
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/nc-gui/components/smartsheet/grid/canvas/composables/useKeyboardNavigation.ts(1 hunks)packages/nc-gui/utils/browserUtils.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: release-docker / buildx
- GitHub Check: pre-build-for-playwright / playwright
- GitHub Check: unit-tests
- GitHub Check: unit-tests-pg
🔇 Additional comments (1)
packages/nc-gui/components/smartsheet/grid/canvas/composables/useKeyboardNavigation.ts (1)
59-59: LGTM! The change correctly addresses the PR objectives.Adding the
isCreateViewActive()check ensures that keyboard events don't affect the canvas when the create view modal is open, which aligns with the PR's goal of fixing keyboard event handling.
|
Uffizzi Preview |
…tension pane is open
Change Summary
There's a bug when extension pane is open and canvas is open and you try to create a new view. The arrows won't work and backspace won't work.
Screen.Recording.2025-02-20.at.6.02.07.PM.mov
This PR fixes it.
Change type
Test/ Verification
Provide summary of changes.
Additional information / screenshots (optional)
Anything for maintainers to be made aware of