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

Support selecting single run using double click. #5831

Merged
merged 4 commits into from Aug 1, 2022

Conversation

bmd3k
Copy link
Contributor

@bmd3k bmd3k commented Jul 29, 2022

  • Motivation for features / changes

    Users have asked for a way to select one and only one item in the Runs list in the Time Series dashboard. That is, select one run while deselecting all the others. This is supported in Scalars dashboad with a radio button but was not ported to Time Series.

    We decided to support this differently in Time Series -- with a double click. Double clicking on the checkbox for any run will select that run while deselecting the remaining runs.

  • Technical description of changes

    We listen for dblclick events on the mat-checkbox. Events and actions are triggered up to the reducer layer where just the one run is selected while the other runs are deselected.

    We recognize that this might be a bit difficult to discover and some might consider it an anti-pattern but we think it is the best option for our situation. Some users might even try this out, having learned the pattern from other products.

@bmd3k bmd3k requested a review from japie1235813 July 29, 2022 17:53
@@ -233,6 +233,7 @@
<mat-checkbox
[checked]="item.selected"
(change)="onSelectionToggle.emit(item)"
(dblclick)="onSelectionDblClick.emit(item)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also add a note here that (dblclick) will also fire (change)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

runId: 'book2',
})
);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth to add a test that click and dblclick event are fired in such order and we get the single selection result?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think a user or machine has to actually double click on the element in the browser window in order for both events to be fired. Here I am just doing a lower-level operation pretending that some sort of double click has happened.

I will explore writing a webtest for this, though, to see if I can simulate an actual double click (and both the change and dblclick events).

@bmd3k bmd3k merged commit d67a8d9 into tensorflow:master Aug 1, 2022
yatbear pushed a commit to yatbear/tensorboard that referenced this pull request Mar 27, 2023
* Motivation for features / changes

  Users have asked for a way to select one and only one item in the Runs list in the Time Series dashboard. That is, select one run while deselecting all the others. This is supported in Scalars dashboad with a radio button but was not ported to Time Series.

  We decided to support this differently in Time Series -- with a double click. Double clicking on the checkbox for any run will select that run while deselecting the remaining runs.

* Technical description of changes

  We listen for dblclick events on the mat-checkbox. Events and actions are triggered up to the reducer layer where just the one run is selected while the other runs are deselected.

  We recognize that this might be a bit difficult to discover and some might consider it an anti-pattern but we think it is the best option for our situation. Some users might even try this out, having learned the pattern from other products.
dna2github pushed a commit to dna2fork/tensorboard that referenced this pull request May 1, 2023
* Motivation for features / changes

  Users have asked for a way to select one and only one item in the Runs list in the Time Series dashboard. That is, select one run while deselecting all the others. This is supported in Scalars dashboad with a radio button but was not ported to Time Series.

  We decided to support this differently in Time Series -- with a double click. Double clicking on the checkbox for any run will select that run while deselecting the remaining runs.

* Technical description of changes

  We listen for dblclick events on the mat-checkbox. Events and actions are triggered up to the reducer layer where just the one run is selected while the other runs are deselected.

  We recognize that this might be a bit difficult to discover and some might consider it an anti-pattern but we think it is the best option for our situation. Some users might even try this out, having learned the pattern from other products.
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.

None yet

2 participants