Skip to content

Commit

Permalink
[2658] Add dedicated colors for the navigation bar in the theme
Browse files Browse the repository at this point in the history
Bug: #2658
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
  • Loading branch information
AxelRICHARD authored and sbegaudeau committed Dec 8, 2023
1 parent 2e8ab3b commit 07b364b
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 8 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.adoc
Expand Up @@ -16,7 +16,16 @@
All implementations of this interface must implement these new methods:
* `List<NodeDescription> getNodeDescriptions();` to retrieve all `NodeDescriptions` created by providers.
* `List<EdgeDescription> getEdgeDescriptions();` to retrieve all `EdgeDescriptions` created by providers.

- https://github.com/eclipse-sirius/sirius-web/issues/2658[#2658] [sirius-web] Add dedicated colors for navigation bar in the Sirius Web theme.
The theme provided by the user must now provide navigation bar colors:
```ts
...
navigationBar: {
border: 'yellow',
background: 'blue',
},
...
```

=== Dependency update

Expand All @@ -33,6 +42,7 @@ All implementations of this interface must implement these new methods:
* `List<NodeDescription> getNodeDescriptions();` to retrieve all `NodeDescriptions` created by providers.
* `List<EdgeDescription> getEdgeDescriptions();` to retrieve all `EdgeDescriptions` created by providers.
- https://github.com/eclipse-sirius/sirius-web/issues/2733[#2733] Leverage the page object model to improve out integration tests
- https://github.com/eclipse-sirius/sirius-web/issues/2658[#2658] [sirius-web] Add dedicated colors for navigation bar in the Sirius Web theme


== v2023.12.0
Expand Down
12 changes: 12 additions & 0 deletions packages/core/frontend/sirius-components-core/src/materialui.ts
Expand Up @@ -18,6 +18,10 @@ declare module '@material-ui/core/styles' {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
}

Expand All @@ -27,11 +31,19 @@ declare module '@material-ui/core/styles/createPalette' {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
export interface PaletteOptions {
navigation: {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
}
6 changes: 5 additions & 1 deletion packages/core/frontend/sirius-components-core/src/theme.ts
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021, 2022 Obeo.
* Copyright (c) 2021, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -18,6 +18,10 @@ const fallbackTheme = createTheme({
leftBackground: 'white',
rightBackground: 'white',
},
navigationBar: {
border: 'black',
background: 'black',
},
},
typography: {
h1: {
Expand Down
Expand Up @@ -18,6 +18,10 @@ declare module '@material-ui/core/styles' {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
}

Expand All @@ -27,11 +31,19 @@ declare module '@material-ui/core/styles/createPalette' {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
export interface PaletteOptions {
navigation: {
leftBackground: React.CSSProperties['color'];
rightBackground: React.CSSProperties['color'];
};
navigationBar: {
border: React.CSSProperties['color'];
background: React.CSSProperties['color'];
};
}
}
Expand Up @@ -29,12 +29,13 @@ const useNavigationBarStyles = makeStyles((theme) => ({
},
appBarHeader: {
height: '4px',
backgroundColor: theme.palette.primary.main,
backgroundColor: theme.palette.navigationBar.border,
},
toolbar: {
display: 'flex',
flexDirection: 'row',
justifyContent: 'space-between',
backgroundColor: theme.palette.navigationBar.background,
},
left: {
display: 'flex',
Expand Down
Expand Up @@ -43,16 +43,15 @@ export const baseTheme: Theme = createTheme({
leftBackground: '#BE1A7880',
rightBackground: '#261E5880',
},
navigationBar: {
border: '#BE1A78',
background: '#261E58',
},
action: {
hover: '#BE1A7826',
selected: '#BE1A7842',
},
},
props: {
MuiAppBar: {
color: 'secondary',
},
},
overrides: {
MuiSnackbarContent: {
root: {
Expand Down

0 comments on commit 07b364b

Please sign in to comment.