-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: update workflow icon package and S2 TableView column menu #10586
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
Open
yihuiliao
wants to merge
6
commits into
main
Choose a base branch
from
update-workflow-icon
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+45
−22
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a7ea40c
add more vertical icon to workflow icons
yihuiliao 2039b5f
update table column menu
yihuiliao 544ad49
fix formatting
yihuiliao 01d5165
add hover/focus state to icon
yihuiliao 4470198
fix formatting
yihuiliao bbbc449
update line height
yihuiliao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
packages/@react-spectrum/s2/s2wf-icons/S2_Icon_MoreVertical_20_N.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,7 @@ import {Key} from '@react-types/shared'; | |
| import {LayoutInfo, Rect, TableLayout, Virtualizer} from 'react-aria-components/Virtualizer'; | ||
| import {LayoutNode} from 'react-stately/useVirtualizerState'; | ||
| import {Menu, MenuItem, MenuSection, MenuTrigger} from './Menu'; | ||
| import MoreVertical from '../s2wf-icons/S2_Icon_MoreVertical_20_N.svg'; | ||
| import Nubbin from '../ui-icons/S2_MoveHorizontalTableWidget.svg'; | ||
| import {OverlayTriggerStateContext} from 'react-aria-components/Dialog'; | ||
| import {ProgressCircle} from './ProgressCircle'; | ||
|
|
@@ -897,9 +898,7 @@ const resizableMenuButtonWrapper = style({ | |
| paddingX: 16, | ||
| backgroundColor: 'transparent', | ||
| borderStyle: 'none', | ||
| fontSize: controlFont(), | ||
| fontFamily: 'sans', | ||
| fontWeight: 'bold' | ||
| font: 'title-sm' | ||
| }); | ||
|
|
||
| const resizerHandleContainer = style({ | ||
|
|
@@ -949,20 +948,24 @@ const resizerHandle = style<{isFocusVisible: boolean; isResizing: boolean}>({ | |
| const columnHeaderText = style({ | ||
| truncate: true, | ||
| // Make it so the text doesn't completely disappear when column is resized to smallest width + both sort and chevron icon is rendered | ||
| minWidth: fontRelative(16), | ||
| minWidth: fontRelative(18), | ||
| flexGrow: 0, | ||
| flexShrink: 1, | ||
| flexBasis: 'auto' | ||
| }); | ||
|
|
||
| const chevronIcon = style({ | ||
| rotate: 90, | ||
| const moreVerticalIcon = style({ | ||
| size: '1lh', | ||
| marginStart: 'text-to-visual', | ||
| minWidth: fontRelative(16), | ||
| flexShrink: 0, | ||
| '--iconPrimary': { | ||
| type: 'fill', | ||
| value: 'currentColor' | ||
| value: { | ||
| default: 'gray-700', | ||
| isHovered: 'gray-800', | ||
| isFocusVisible: 'gray-800' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is no design for when it is focused so i just assume it's the same as hovered, we can clarify with design tho |
||
| } | ||
| } | ||
| }); | ||
|
|
||
|
|
@@ -1064,22 +1067,36 @@ function ColumnWithMenu(props: ColumnWithMenuProps) { | |
| className={renderProps => | ||
| resizableMenuButtonWrapper({...renderProps, align: buttonAlignment}) | ||
| }> | ||
| {allowsSorting && ( | ||
| <Provider | ||
| values={[ | ||
| [ | ||
| IconContext, | ||
| { | ||
| styles: sortIcon({isButton: true}) | ||
| } | ||
| ] | ||
| ]}> | ||
| {sortDirection != null && | ||
| (sortDirection === 'ascending' ? <SortUpArrow /> : <SortDownArrow />)} | ||
| </Provider> | ||
| {({isHovered, isFocusVisible}) => ( | ||
| <> | ||
| {allowsSorting && ( | ||
| <Provider | ||
| values={[ | ||
| [ | ||
| IconContext, | ||
| { | ||
| styles: sortIcon({isButton: true}) | ||
| } | ||
| ] | ||
| ]}> | ||
| {sortDirection != null && | ||
| (sortDirection === 'ascending' ? <SortUpArrow /> : <SortDownArrow />)} | ||
| </Provider> | ||
| )} | ||
| <div className={columnHeaderText}>{children}</div> | ||
| <Provider | ||
| values={[ | ||
| [ | ||
| IconContext, | ||
| { | ||
| styles: moreVerticalIcon({isHovered, isFocusVisible}) | ||
| } | ||
| ] | ||
| ]}> | ||
| <MoreVertical /> | ||
| </Provider> | ||
| </> | ||
| )} | ||
| <div className={columnHeaderText}>{children}</div> | ||
| <Chevron size="M" className={chevronIcon} /> | ||
| </Button> | ||
| <Menu onAction={onMenuSelect} styles={style({minWidth: 128})}> | ||
| {items.length > 0 && ( | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
fontSizewas originally usinguiwhich has a line height of 16px but the column title needs a line height of 18px so that the column menu icon uses the appropriate line height. not sure if this was updated at some point and we just never got to it