-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support copy from right in timetable editor #1013
base: dev
Are you sure you want to change the base?
Conversation
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.
Add null checks and a check to avoid copying time into a non-time cell.
case 76: { // l | ||
// Set current cell's value to adjacent cell's (rightward) value. | ||
const adjacentCol = columns[this._getColIndex(scrollToColumn) + 1] | ||
if (evt.shiftKey && !activeCell && isTimeFormat(adjacentCol.type)) { |
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.
Need to check that adjacentCol
is defined (see console error), and that check needs to be added for copy-from-left.
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.
I think there should also be an isTimeFormat
check for the focused cell. (We probably don't want to copy a time value into a non-time cell, but this is possible, as written, from the first time cell into the trip short name cell).
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.
There is a caveat that the adjacent cells must be visible for the copy operations to complete, but that is not blocking for this PR.
Checklist
dev
before they can be merged tomaster
)Description
Timetable editor has a cool keyboard shortcut to copy from left/top, but nothing to copy from right! We add shift+l to do this, mirroring shift+'.
Please test thoroughly I could only come up with so many edge cases. Tempted to add a new e2e case