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

Add token-based CSS theming #11262 #11319

Merged
merged 22 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f7fd65e
Add token-based CSS theming #11262
jacobtylerwalls Aug 9, 2024
e7a0214
Create theme.ts
jacobtylerwalls Aug 12, 2024
e53594a
Stub out some primitive color tokens
jacobtylerwalls Aug 12, 2024
b75e002
Opt-in to primevue css layer
jacobtylerwalls Aug 12, 2024
607e866
Make themes a directory
jacobtylerwalls Aug 12, 2024
eefa2dd
Add css-reset selectors
jacobtylerwalls Aug 13, 2024
373cb9c
Remove "header" token
jacobtylerwalls Aug 19, 2024
14bbab4
Exclude theme files from vitest coverage
jacobtylerwalls Aug 19, 2024
5711938
Remove css-reset selectors and cssLayer
jacobtylerwalls Aug 20, 2024
b1dae72
Use legacy namespace
jacobtylerwalls Aug 20, 2024
e05e33e
Remove font-weight overrides
jacobtylerwalls Aug 20, 2024
6240034
Merge branch 'dev/8.0.x' into jtw/arches-theme
jacobtylerwalls Aug 28, 2024
82e22e5
Merge branch 'dev/8.0.x' into jtw/arches-theme
jacobtylerwalls Aug 29, 2024
174c5ae
Use palette util, avoid overwriting navigation, &c
jacobtylerwalls Sep 10, 2024
a9f4534
Override iconSize token and add custom content gap token
jacobtylerwalls Sep 10, 2024
e31736f
Merge branch 'dev/8.0.x' into jtw/arches-theme
jacobtylerwalls Sep 10, 2024
6914024
Add dark mode selector #11322
jacobtylerwalls Sep 10, 2024
6ebcb72
Add common toast styling
jacobtylerwalls Sep 12, 2024
7c8b6f0
Merge branch 'dev/8.0.x' into jtw/arches-theme
jacobtylerwalls Sep 12, 2024
fabd076
Add fontFamily token
jacobtylerwalls Oct 7, 2024
ed46cf2
Remove some tokens
jacobtylerwalls Oct 7, 2024
f5ff068
Rename navigation color token
jacobtylerwalls Oct 7, 2024
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
9 changes: 9 additions & 0 deletions arches/app/media/css/arches.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ img {
image-orientation: from-image;
}

.css-reset * {
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved
all: revert-layer;
font-family: 'Open Sans';
}

.css-reset .fa {
font-family: fontAwesome;
}

[class^="col-"]:not(.pad-no) {
padding-left: 0px;
padding-right: 0px;
Expand Down
14 changes: 1 addition & 13 deletions arches/app/media/js/utils/create-vue-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ import StyleClass from 'primevue/styleclass';
import ToastService from 'primevue/toastservice';
import Tooltip from 'primevue/tooltip';

import Aura from '@primevue/themes/aura';

import { createApp } from 'vue';
import { createGettext } from "vue3-gettext";

import arches from 'arches';

const DEFAULT_THEME = {
theme: {
preset: Aura,
options: {
prefix: 'p',
darkModeSelector: 'system',
cssLayer: false
}
}
};
import { DEFAULT_THEME } from "@/arches/themes/default.ts";

export default async function createVueApplication(vueComponent, themeConfiguration) {
/**
Expand Down
63 changes: 63 additions & 0 deletions arches/app/src/arches/themes/default.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { definePreset } from "@primevue/themes";
import Aura from "@primevue/themes/aura";

export const ArchesPreset = definePreset(Aura, {
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved
primitive: {
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved
arches: {
blue: {
400: "#54abd9", // legacy paginator button color
500: "#579ddb", // legacy light button color
600: "#2986b8", // legacy sidebar highlight
950: "#2d3c4b", // legacy sidebar
},
},
},
semantic: {
primary: {
50: "{sky.50}",
100: "{sky.100}",
200: "{sky.200}",
300: "{sky.300}",
400: "{sky.400}",
500: "{sky.500}",
600: "{sky.600}",
700: "{sky.700}",
800: "{sky.800}",
900: "{sky.900}",
950: "{sky.950}",
},
navigation: "{arches.blue.950}",
},
components: {
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved
button: {
root: {
label: {
fontWeight: 600,
},
},
},
datatable: {
column: {
title: {
fontWeight: 600,
},
},
},
splitter: {
handle: {
background: "{surface.500}",
},
},
},
});

export const DEFAULT_THEME = {
theme: {
preset: ArchesPreset,
options: {
prefix: "p",
darkModeSelector: "system",
cssLayer: true,
jacobtylerwalls marked this conversation as resolved.
Show resolved Hide resolved
},
},
};
1 change: 1 addition & 0 deletions releases/8.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Arches 8.0.0 Release Notes
### Major enhancements
- 9613 Adds editable_future_graphs and the ability to update Graphs without unpublishing.
- 11042 Adds `ResourceInstanceLifecycle`s and `ResourceInstanceLifecycleState`s
- Add token-based CSS theming [#11262](https://github.com/archesproject/arches/issues/11262)

### Additional highlights

Expand Down
Loading