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

Task: Increase help and settings box sizes #1756

Merged
merged 14 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/views/main-header/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const Help = () => {
const calloutStyles: React.CSSProperties = {
overflowY: 'hidden'
}
const helpButtonStyles = mainHeaderStyles(currentTheme).iconButton;
const { iconButton: helpButtonStyles, tooltipStyles } = mainHeaderStyles(currentTheme);

const menuProperties = {
shouldFocusOnMount: true,
Expand All @@ -108,6 +108,7 @@ export const Help = () => {
content={translateMessage('Help')}
id={getId()}
calloutProps={{ gapSpace: 0 }}
styles={ tooltipStyles }
>
<IconButton
ariaLabel={translateMessage('Help')}
Expand Down
20 changes: 18 additions & 2 deletions src/app/views/main-header/MainHeader.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const mainHeaderStyles = (theme: ITheme) => {
},
feedbackIconAdjustmentStyles: {
position: 'relative' as 'relative',
right: '-6px',
top: '4px'
},
tenantStyles: {
Expand All @@ -32,7 +31,24 @@ export const mainHeaderStyles = (theme: ITheme) => {
width: '50px',
':hover': {
background: `${theme.palette.neutralLight} !important`
}
},
flexGrow: '1'
}
},
moreInformationStyles: {
flexGrow: 1,
flexShrink: 1,
flexBasis: '60px'
},
settingsContainerStyles: {
display: 'flex',
alignItems: 'stretch'
},
tooltipStyles: {
root: {
flexGrow: 1,
display: 'flex',
alignItems: 'stretch'
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/app/views/main-header/MainHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const MainHeader: React.FunctionComponent <MainHeaderProps> = (props: Mai
const mobileScreen = props.mobileScreen;
const currentTheme = getTheme();
const { rootStyles : itemAlignmentStackStyles, rightItemsStyles,
feedbackIconAdjustmentStyles, tenantStyles } = mainHeaderStyles(currentTheme);
feedbackIconAdjustmentStyles, tenantStyles, moreInformationStyles } = mainHeaderStyles(currentTheme);

return (
<Stack tokens={sectionStackTokens}>
Expand Down Expand Up @@ -98,9 +98,9 @@ export const MainHeader: React.FunctionComponent <MainHeaderProps> = (props: Mai
style={tenantStyles}
/>
}
<Settings />
<Help />
<span style={feedbackIconAdjustmentStyles}> <FeedbackButton /> </span>
<span style={ moreInformationStyles }> <Settings /> </span>
<span style={ moreInformationStyles }> <Help /> </span>
<span style={ feedbackIconAdjustmentStyles }> <FeedbackButton /> </span>
<Authentication />
</Stack>
</Stack>
Expand Down
6 changes: 4 additions & 2 deletions src/app/views/main-header/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
overflowY: 'hidden'
}

const settingsButtonStyles = mainHeaderStyles(currentTheme).iconButton;
const { iconButton : settingsButtonStyles, settingsContainerStyles,
tooltipStyles} = mainHeaderStyles(currentTheme);

const menuProperties = {
shouldFocusOnMount: true,
Expand All @@ -104,11 +105,12 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
};

return (
<div>
<div style={ settingsContainerStyles }>
<TooltipHost
content={translateMessage('Settings')}
id={getId()}
calloutProps={{ gapSpace: 0 }}
styles={ tooltipStyles }
>
<IconButton
ariaLabel={translateMessage('Settings')}
Expand Down