-
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
Add toggle to show only changed columns in experiments table #4402
Conversation
private getWebviewData(): TableData { | ||
const filters = this.experiments.getFilters() |
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] Follow up by making all of this async
a94fcbd
to
90acad8
Compare
<div> | ||
<p>No Columns Selected.</p> | ||
<StartButton onClick={selectColumns} text="Add Columns" /> | ||
{showOnlyChanged && ( |
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.
[F] Good thing I remembered this because without it users would have been stuck.
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.
Screen.Recording.2023-08-02.at.6.59.20.pm.mov
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!
@@ -210,6 +210,14 @@ $badge-size: 0.85rem; | |||
} | |||
} | |||
|
|||
.onlyChanged { | |||
background-color: $indicator-badge-background; |
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.
Minor, the hover color seems a little weird for the selected icon. I expected a lighter or darker shade, but instead you see a completely different color in most cases.
Maybe we could borrow a primary button's color and hover color for the "checked" only-changed icon 🤔
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.
PTAL at the update. We I can followup if needed.
tooltipContent="Toggle Show Only Changed Columns" | ||
delay={[1000, 0]} | ||
> | ||
<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.
Is there a reason why we're basically adding a new feature instead of building off of selected columns? Aka, "Show Only Changed" selects only changed columns and deselects none-changed columns?
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's also a possibility of users being confused on why "selected" columns just aren't showing up in the table and assume something is broken 🤔
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 there a reason why we're basically adding a new feature instead of building off of selected columns? Aka, "Show Only Changed" selects only changed columns and deselects none-changed columns?
Here is a list of things to consider with the approach of building on top of selecting columns
- User takes a long time setting up mono-repo only to display the columns related to the project they are working in. Toggles show only changed - all selection is lost.
- What happens when show only changed is toggled off? Would we hold the previous state and return to that? Does the selection stay the same when show only changed is turned off?
- What happens when selection has changed when only changed is turned on? After applying only changed I deselect a number of columns. What happens when the data updates? Do these columns reappear? Can other new changed columns appear/get selected?
- Filtering can update the columns selected for show only changed. Would this also change the selection?
There's also a possibility of users being confused on why "selected" columns just aren't showing up in the table and assume something is broken 🤔
This is why I tried to make the indicator as obvious as possible.
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.
so tl;dr - it gets complicated fast. We can discuss tomorrow when we catch up.
appearance="secondary" | ||
isNested={true} | ||
onClick={toggleShowOnlyChanged} | ||
text="Show Only Changed" |
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.
Minor! The "X" does make it more clear but when I saw this I assumed that only changed was off since the text is "Show Only Changed". Maybe "Disable Only Changed", Turn Off Only Changed" or "Toggle Only Changed"?
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.
Updated to "Disable".
90acad8
to
6ba80a4
Compare
Code Climate has analyzed commit 6ba80a4 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 95.2% (0.0% change). View more on Code Climate. |
Thanks for this! @mattseddon One small thing I noticed was when using the "show only changed" setting, the "columns" tab on the left no longer works to filter out columns. I wasn't sure if this was a limitation or a bug. |
@BradyJ27 show only changed is an overlay on top of the selected columns. It automatically hides unchanged columns that are selected but does not change the selected state of the columns. De-selecting columns that are still visible is possible: Screen.Recording.2023-08-08.at.7.55.46.am.movSee #4402 (comment) above for more details on why this implementation was chosen. |
Sure, this makes sense. The columns tab will still show all columns, but selecting/de-selecting hidden columns does nothing when the "toggle only changed" is on. Thanks for clarifying! |
Revisited whilst looking at #4229
Closes #1994
This PR gives users the ability to switch the experiments table into a show-only changed columns mode. The behaviour closely follows the
--only-changed
flag forexp show
(documented here):Demo
Screen.Recording.2023-08-02.at.12.36.23.pm.mov