-
-
Notifications
You must be signed in to change notification settings - Fork 332
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
Record selector bug fixes and UX improvements #1856
Conversation
@kgodey and @ghislaineguerin You can look at the demo video here for a tour of the UX design changes to the Record Selector. |
@seancolsen I don't think I'll be able to watch the video in full in the next couple of days (I don't yet have the necessary focus), but I skimmed through it and from what I see, the changes look great. I'm looking forward to playing around with it once it gets merged. |
options: [null, true, false], | ||
getLabel: (value?: boolean | null) => { | ||
if (isDefinedNonNullable(value)) { | ||
return value ? labels[0] : labels[1]; | ||
} |
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.
Do we need to allow null
here? If we do, we should represent Null using the NULL component instead of empty string.
While we can allow null, there's no way for any other components (checkbox, text boxes, textarea etc.,) to ever set null as a value, so this would be a special option allowed only by the Select menu within a 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.
Do we need to allow
null
here?
The reason for this change is to improve the behavior of the input for boolean columns within the record selector. Before this change, the input only had options for "true" and "false". The records selector needs to open with blank values for all inputs, and the user needs to be able to set a value and then set it back to some sort of blank value after setting it. If you can think of a better way to accomplish what I'm after, then I'm open to changing the approach here.
we should represent Null using the NULL component instead of empty string.
I'm not sure about this. I think that would look pretty weird.
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 that would look pretty weird.
I agree this would probably look weird in the context of record selector search. But we use the same component for the Cells in the table, and we represent nulls using the Null component in the Cell. The empty value looks odd in that context.
Either way, this is not a priority at the moment, and we can figure this out later.
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 just tested a boolean column. The dropdown shows an empty option. When you select the empty option the cell value changes to NULL
and displays stylized. I think that should suffice. It would be nice to hide the empty option of the column doesn't allow NULL, but I don't imagine that's a priority.
Though it's worth noting that I did uncover #1919 while checking this out, and I predict that's a regression from this PR too. But I think it's worth merging this in and fixing that subsequently.
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.
@seancolsen Looks good! Nice work!
I'll leave reviewing of the UX to @kgodey and @ghislaineguerin, which can probably be done post merge.
I noticed a couple bugs while doing a quick local test:
-
Regression: Array type column styling is broken. Open Data Explorer and summarize any column so that it results in an Array type column. Notice that the css modifications result in this column being messed up. I'd like this to be fixed before merging the PR in.
-
Selection is not reset after opening & closing record selector. Click on a column that opens Record selector, and use the keyboard to pick a row. Notice that the record selector is closed. Move the mouse around without clicking and notice that the cells are being selected when the mouse is moved, which is not desired. Feel free to create an issue for this and handle it later if you do not wish to address it in this PR.
Screen.Recording.2022-11-11.at.12.02.10.AM.mov
function setRecordSelectorToAccompanyDropdown() { | ||
const modal = document.querySelector<HTMLElement>('.modal-record-selector'); | ||
if (dropdownAccompanyingElements && modal) { | ||
dropdownAccompanyingElements.add(modal); | ||
} |
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.
The modal element that's added here is never removed. While the modal itself is removed from the DOM, it's reference will be held here until the parent AttachableDropdown is removed.
While this should cause no major problems, I'm certain we'd have to do similar operations in other places and it would be better if we ensure that we always remove stale references.
Not a priority. We can keep track of this to handle later.
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.
it would be better if we ensure that we always remove stale references.
Fair enough. I added 4f01720 to address this.
@seancolsen I noticed another bug: Screen.Recording.2022-11-11.at.12.12.14.AM.mov
I'll leave it upto you to decide if you'd like to fix this in this PR, or separately (in which case, please create an issue), or maybe later during the post-release improvements. |
@pavish this is ready for re-review.
|
This PR
Demo of some notable design changes
2022-11-03.13-56-26.mp4
Remaining issues to handle later
01. Live Demo
03. Post-Release Improvements
2023 or later
What's next
Checklist
Update index.md
).master
branch of the repositoryDeveloper Certificate of Origin
Developer Certificate of Origin