Skip to content
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
Binary file modified .loki/reference/chrome.laptop/Phones/PhoneField_Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Surfaces/AppBar_Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .loki/reference/chrome.laptop/Surfaces/AppBar_Dense.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/ui/src/app-bar/AppBarOverrides.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ColorDynamic } from '../theme/Color';
import { SuperDispatchTheme } from '../theme/SuperDispatchTheme';

export function overrideAppBar(theme: SuperDispatchTheme): void {
Expand All @@ -6,4 +7,13 @@ export function overrideAppBar(theme: SuperDispatchTheme): void {
color: 'inherit',
position: 'static',
};

theme.overrides.MuiAppBar = {
root: {
'&.MuiPaper-elevation0': {
border: 'none',
borderBottom: `1px solid ${ColorDynamic.Silver400}`,
},
},
};
}
14 changes: 14 additions & 0 deletions packages/ui/src/app-bar/__tests__/AppBar.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ it('checks default props', () => {
`);
});

it('renders a bottom border instead of the inherited full box border', () => {
// eslint-disable-next-line testing-library/render-result-naming-convention -- renderCSS returns a CSS string, not an RTL render result
const css = renderCSS(<AppBar />, ['MuiAppBar']);

expect(css).toContain('.MuiAppBar-root.MuiPaper-elevation0');
expect(css).toContain('border: none');
expect(css).toContain('border-bottom: 1px solid ColorDynamic.Silver400');
});

it('checks component css', () => {
expect(renderCSS(<AppBar />, ['MuiAppBar'])).toMatchInlineSnapshot(`
.MuiAppBar-root {
Expand All @@ -24,6 +33,11 @@ it('checks component css', () => {
flex-direction: column;
}

.MuiAppBar-root.MuiPaper-elevation0 {
border: none;
border-bottom: 1px solid ColorDynamic.Silver400;
}

.MuiAppBar-positionFixed {
top: 0;
left: auto;
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/drawer/DrawerActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const useStyles = makeStyles(
'&&': {
bottom: 0,
top: 'auto',
borderTop: `1px solid ${ColorDynamic.Silver400}`,
borderLeft: 'none',
borderRight: 'none',
borderBottom: 'none',
Expand Down
10 changes: 10 additions & 0 deletions packages/ui/src/drawer/__tests__/Drawer.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ it('checks default props', () => {
`);
});

it('DrawerActions declares its own top border rather than the inherited box border', () => {
// eslint-disable-next-line testing-library/render-result-naming-convention -- renderCSS returns a CSS string, not an RTL render result
const css = renderCSS(<DrawerActions />, ['SD-DrawerActions']);

// AppBar no longer ships a full box border, so the action bar must own its
// top divider explicitly (width + style), toggling only the color on sticky.
expect(css).toContain('border-top: 1px solid ColorDynamic.Silver400');
});

it('checks component css', () => {
expect(
renderCSS(
Expand Down Expand Up @@ -106,6 +115,7 @@ it('checks component css', () => {
.SD-DrawerActions-appBar.SD-DrawerActions-appBar {
top: auto;
bottom: 0;
border-top: 1px solid ColorDynamic.Silver400;
transition: border-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
border-left: none;
border-right: none;
Expand Down
Loading