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

feat: keyboard shortcut added for opening editor modal #2213

Merged

Conversation

therealrinku
Copy link
Contributor

@therealrinku therealrinku commented May 19, 2024

resolves: #1923
shift + enter keyboard shortcut added for opening editor modal

Copy link
Contributor

ellipsis-dev bot commented May 19, 2024

Your free trial has expired. To keep using Ellipsis, sign up at https://app.ellipsis.dev for $20/seat/month or reach us at help@ellipsis.dev

@rathboma rathboma requested a review from azmy60 June 6, 2024 21:53
@rathboma
Copy link
Collaborator

rathboma commented Jun 6, 2024

@azmy60 wanna review this? If good, approve and merge!

Copy link
Contributor

@azmy60 azmy60 left a comment

Choose a reason for hiding this comment

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

Just a some notes, and we're good :)

Also I think there is some merge conflicts too, can you also look into it? Thanks!

const range: RangeComponent = _.last(this.tabulator.getRanges())
const cell = range.getCells().flat()[0];
if (this.isEditorMenuDisabled(cell)) return
this.$refs.editorModal.openModal(cell.getValue(), undefined, cell)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you be able to add a FIXME note here so we can avoid calling child methods directly like this? Normally, it should be done by calling an event using this.$modal.show(modalName) or this.$trigger(AppEvent.something).

@@ -411,6 +411,7 @@ export default Vue.extend({
// const focusingTable = this.tabulator.element.contains(document.activeElement)
// if (!focusingTable) this.page--
// }
result['alt+m'] = this.openEditorMenuByShortcut.bind(this)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we press shift+enter (DBeaver uses this)? Or anything similar with pressing enter? I usually look at other tools to decide. I'm just not too familiar with alt+m though I feel like it might works or I might be too nitpicky. Feel free to use anything that's best for you.

@therealrinku
Copy link
Contributor Author

therealrinku commented Jun 9, 2024

hi @azmy60 ! thanks for the review!
there was not any specific reason to add alt + m shortcut. I agree, that it makes more sense to use shift + enter so I updated it to use shift + enter and added FIXME note as well :)

@therealrinku therealrinku requested a review from azmy60 June 9, 2024 10:17
Copy link
Contributor

@azmy60 azmy60 left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks so much.

@azmy60 azmy60 merged commit 5ea27af into beekeeper-studio:master Jun 9, 2024
15 checks passed
@therealrinku therealrinku deleted the feat/editor-modal-shortcut branch June 9, 2024 13: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.

FEAT: Add keyboard shortcut to open editor modal
3 participants