-
Notifications
You must be signed in to change notification settings - Fork 29
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
Change experiments table circle to radio button #2553
Conversation
What is going to be displayed in the exps sidebar section? |
No change |
Adding the eye definitely makes things more clear for me!
➕ on this idea! |
I think this make it more obvious that there is an action to be done or, but I don't think this would solve the problem by itself.
Maybe if there was a new column header that says "Plot/Unplot" and make the bullets a clear column? One downside I'm seeing from this is that the other actions won't be labeled in the same way (star, select). |
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.
testId={'row-action-plot'} | ||
tooltipContent={getTooltipContent(!!bulletColor, 'Plot')} | ||
> | ||
<span |
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.
This is fine for now, but we definitely could change that for a button like we said. We could then have toggleExperiment
on click only and accessibility would be built in the component. There must be some default styles to the button that need to be overwritten, but other than that it should be a simple change.
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.
➕
|
||
align-items: center; | ||
justify-content: center; | ||
align-self: center; |
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.
Is this still needed? I vaguely remember us adding the property and it not doing anything.
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.
removed
border: calc(var(--border-width) * 1px) solid $checkbox-border; | ||
box-sizing: border-box; | ||
cursor: pointer; | ||
height: calc(var(--design-unit) * 4px); |
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.
We could make a variable out of that and use it for height
, width
and border-radius
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.
pulled out variable
box-sizing: border-box; | ||
cursor: pointer; | ||
height: calc(var(--design-unit) * 4px); | ||
outline: none; |
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.
This is useful if we transform the span
to a button
. Otherwise, it doesn't do anything. For transforming the element to a <button />
, the only other styles needed is padding: 0
and border: none
I think. We'll be able to remove box-sizing: border-box
too as its already the default on a button.
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.
changed to a button
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.
Great work, Matt!
Now that we are having more actions to the left, would it make sense to move the label of the column to something like this?
Or even move the name to the right?
(this would need to make that column be able to resize smaller than it possible at the moment)
Personally, I find the Experiments
label being in the "center" to look like of buggy. As for the second option, I believe it is recommended that we keep text left-aligned instead of right-aligned for readability. No strong opinion on this though :)
@@ -51,11 +59,17 @@ export const CellRowAction: React.FC<CellRowActionProps> = ({ | |||
) | |||
} | |||
|
|||
const getTooltipContent = (determiner: boolean, text: string): string => |
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.
Great idea for creating the text!
testId={'row-action-plot'} | ||
tooltipContent={getTooltipContent(!!bulletColor, 'Plot')} | ||
> | ||
<span |
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.
➕
One caveat (not critical for now) is checkpoints (and resume / continue logic) when line breaks between the checkpoints. In this case line gives a hint. LGTM otherwise, let's proceed with this. I would say though that I don't think this is enough. I think we need more explicit things, buttons, etc to connect both webviews. |
@sroy3 this is good. I managed to move "Experiment" to the right Edit: I have "fixed" the problem but in order to do so I've changed the behaviour of the row Screen.Recording.2022-10-14.at.7.16.15.pm.movScreen.Recording.2022-10-14.at.7.20.10.pm.movThis is what things look like spreading the line from the opposite direction: Screen.Recording.2022-10-14.at.7.21.44.pm.movThe last idea that I had is to always keep the display name on the second line as per: Screen.Recording.2022-10-14.at.8.33.20.pm.movThe last one is probably my preferred option. WDYT? Am I overthinking this? |
<button | ||
className={styles.bullet} | ||
style={{ color: bulletColor }} | ||
{...clickAndEnterProps(toggleExperiment)} |
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.
We can change this to a basic onClick
event since all keyboard event are already handled by the button.
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.
This ended up being a button inside a button so I had to move the action into <Indicator/>
and changed it back to a <span/>
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 will make the same change for the other row actions in a follow-up (the change is bigger than I anticipated).
I think I'm with you on that one. The last option looks good. The first one is ok too and I wouldn't mind if it was what we finally went with. |
Last one is also my preferred option! The first one shows what appears to be secondary text (gray and small) before the primary text (white and large) and the second one looks kind of buggy to me with how the text jumps. |
Code Climate has analyzed commit 92be048 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (0.0% change). View more on Code Climate. |
Q: how will to look like with three commits? (my concern that we've completely flattened out the table - commit name, experiments (and checkpoints?) are all on the same level now? If that is the case, then we are loosing important information - hierarchy. |
Hmm, I prefer it way better the way it was before. It was more informative (in an important way - there is child-parent relationship). We've removed lines and hierarchy. It means either we'll have to implement something like in studio (sections per branch) or we need to go back and introduce the hierarchy back. |
Which part of the change? |
Sorry, I meant the names. Buttons are fine and definitely an improvement! |
Ok, I will raise a PR to revert. |
1/2
main
<- this <- #2567Related to #2373
This PR updates the experiments table and replaces the existing circles with a radio button. In the follow-up PR I have tried to improve the tooltip displayed when hovering over the radio button. Although not perfect I think this change is an improvement and good enough to ship.
Demo
Screen.Recording.2022-10-12.at.12.51.46.pm.mov
Previous attempts:
Demo
Screen.Recording.2022-10-10.at.12.59.55.pm.mov
With the sub-row indicator moved
Screen.Recording.2022-10-10.at.4.48.45.pm.mov
Left in draft and asked for reviews because I would like everyone to take a look at the idea.
I think we should move the eye + circle to the LHS with the other row action indicators and put any required whitespace between the circle and chevron. Like this:
Demo of the above
Screen.Recording.2022-10-10.at.6.52.23.pm.mov