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

HParams: Header Button Styling and Context Menu updates #6471

Merged
merged 4 commits into from
Jun 30, 2023

Conversation

rileyajones
Copy link
Contributor

Motivation for features / changes

While testing the new hparams in time series feature we got a lot of feedback about the styling and placement of the header buttons.

The main takeaways are:

  • Remove the "Delete Column" button
  • Ensure the icons are the same height and color
  • The 3dot button ripple was weird

We also noticed that the sort button was missing from the context menu and discovered that right clicking a header cell logged an error to the console

Screenshots of UI changes (or N/A)

Header Buttons (Dark Mode)
image

Header Buttons (Light Mode)
image

Context Menu (Dark Mode)
image

Context Menu (Light Mode)
image

No context menu in scalar card
image

@rileyajones rileyajones marked this pull request as ready for review June 29, 2023 22:20
*ngIf="
sortingInfo.order === SortingOrder.ASCENDING &&
sortingInfo.name === contextMenuHeader?.name;
else descending"
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is currently ascending shouldn't we show the down arrow as clicking this button will make it descending?

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 originally had it that way but I found it confusing to have the arrow in the context menu conflict with the arrow in the header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

image

<button
mat-icon-button
class="context-menu-trigger"
<mat-icon
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is supposed to be a button for accessibility. Or you have to add tab indexes and aria labels and all that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 for accessibility, that is why it was a button originally.
I made it just an icon so that it would be consistent with the sort icon, should I also make the sort icon a button too? Also I thought that people didn't like the ripple which comes with mat-button

svgIcon="arrow_upward_24px"
></mat-icon>
<ng-template #descending>
<mat-icon svgIcon="arrow_downward_24px"></mat-icon>
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic around which icon renders should be tested.

@@ -15,19 +15,37 @@
<custom-modal #contextMenu>
<div class="context-menu">
<div
*ngIf="!canContextMenuRemoveColumn() && !(selectableColumns && selectableColumns.length)"
*ngIf="!contextMenuHeader?.removable && !contextMenuHeader?.sortable && !canContextMenuInsert()"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just realized there is no test for this logic.

@JamesHollyer JamesHollyer merged commit 54129b3 into tensorflow:master Jun 30, 2023
14 checks passed
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.

2 participants