Skip to content

Commit 4b45ae5

Browse files
fix(multi-org): align dropdown icons and fix user avatar dropdown hover styles (#5296)
1 parent 728623d commit 4b45ae5

File tree

6 files changed

+28
-14
lines changed

6 files changed

+28
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"dependencies": {
165165
"@codingame/monaco-jsonrpc": "^0.3.1",
166166
"@docsearch/react": "^3.0.0-alpha.37",
167-
"@influxdata/clockface": "^5.2.0",
167+
"@influxdata/clockface": "^6.0.1",
168168
"@influxdata/flux-lsp-browser": "0.8.28",
169169
"@influxdata/giraffe": "^2.33.4",
170170
"@influxdata/influxdb-templates": "0.9.0",

src/identity/components/GlobalHeader/GlobalHeader.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
IconFont,
88
Icon,
99
JustifyContent,
10+
InfluxColors,
1011
} from '@influxdata/clockface'
1112

1213
// Selectors and Context
@@ -72,6 +73,8 @@ export const GlobalHeader: FC = () => {
7273
}
7374
}, [orgsList])
7475

76+
const caretStyle = {fontSize: '18px', color: InfluxColors.Grey65}
77+
7578
return (
7679
<FlexBox
7780
margin={ComponentSize.Large}
@@ -86,7 +89,7 @@ export const GlobalHeader: FC = () => {
8689
activeAccount={activeAccount}
8790
accountsList={sortedAccounts}
8891
/>
89-
<Icon glyph={IconFont.CaretRight_New} />
92+
<Icon glyph={IconFont.CaretOutlineRight} style={caretStyle} />
9093
<OrgDropdown activeOrg={activeOrg} orgsList={sortedOrgs} />
9194
</>
9295
)}

src/identity/components/GlobalHeader/GlobalHeaderDropdown/GlobalHeaderDropdown.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@
2626
margin: 8px;
2727
background-color: rgba(241, 241, 243, 0.1);
2828
}
29+
30+
.global-header--align-center {
31+
display: flex;
32+
align-items: center;
33+
}

src/identity/components/GlobalHeader/GlobalHeaderDropdown/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class GlobalHeaderDropdown extends React.Component<Props, State> {
8484
active={active}
8585
onClick={onClick}
8686
size={dropdownButtonSize}
87-
icon={dropdownButtonIcon}
87+
trailingIcon={dropdownButtonIcon || IconFont.DoubleCaretVertical}
8888
className="global-header--dropdown-button"
8989
>
9090
{selectedItem?.name || defaultButtonText}
@@ -106,7 +106,11 @@ export class GlobalHeaderDropdown extends React.Component<Props, State> {
106106
const iconEl = <Icon glyph={value.iconFont} className="button-icon" />
107107
const textEl = <span>{value.name}</span>
108108
return (
109-
<Dropdown.HrefItem key={value.name} href={value.href}>
109+
<Dropdown.HrefItem
110+
key={value.name}
111+
href={value.href}
112+
className="global-header--align-center"
113+
>
110114
{iconEl}
111115
{textEl}
112116
</Dropdown.HrefItem>
@@ -161,7 +165,7 @@ export class GlobalHeaderDropdown extends React.Component<Props, State> {
161165
justifyContent={JustifyContent.SpaceBetween}
162166
alignItems={AlignItems.Center}
163167
>
164-
<span>
168+
<span className="global-header--align-center">
165169
{iconEl}
166170
{textEl}
167171
</span>

src/identity/components/GlobalHeader/UserPopoverStyles.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@
4444
padding: 0px 16px 16px 16px;
4545
display: inline-flex;
4646
flex-direction: column;
47+
margin-top: 8px;
4748

4849
.user-popover-footer--button {
49-
margin-top: 10px;
5050
cursor: pointer;
5151
color: inherit;
52-
}
53-
54-
a:hover {
55-
color: $cf-grey-75;
52+
padding: 8px 8px 8px 4px;
53+
display: inline-flex;
54+
align-items: center;
55+
&:hover {
56+
background: rgba(241, 241, 243, 0.1);
57+
}
5658
}
5759

5860
.user-popover-footer--button-icon {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,10 +1458,10 @@
14581458
gud "^1.0.0"
14591459
warning "^4.0.3"
14601460

1461-
"@influxdata/clockface@^5.2.0":
1462-
version "5.2.0"
1463-
resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-5.2.0.tgz#d6a079fe5c478151b916e73b3d34312afcc5988b"
1464-
integrity sha512-l3X7b4T98kw/1SMv5EcSCIoncoH7ByZ6rL1lAPlAnHRpPF1DFFo2D8fR/xB8ku+1K56uJwqfRaYIXoCbBo46jA==
1461+
"@influxdata/clockface@^6.0.1":
1462+
version "6.0.1"
1463+
resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-6.0.1.tgz#93f021dbf3d05b029cea0bca6b55493299150f54"
1464+
integrity sha512-C6e9nsPCCQQtLlPEOz3FE2sV3QNLQ6I3WbnZES5io1bcR9U6pnF/YpOwU+zICq4bGImyh23QBvXY2ffcGcqOsQ==
14651465
dependencies:
14661466
"@types/react-window" "^1.8.5"
14671467
react-window "^1.8.7"

0 commit comments

Comments
 (0)