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

BC-6842 - Adjust design system #3170

Merged
merged 71 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3cfdf6f
fix dbc vuetify options
NFriedo Mar 13, 2024
b08c32a
change on-surface and on-background colors for testing purposes
NFriedo Mar 13, 2024
9179809
use typescript for vuetify options
NFriedo Mar 13, 2024
b5c59e6
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 13, 2024
1ac8895
adjust colors
NFriedo Mar 14, 2024
fe93c77
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 18, 2024
7225d64
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 18, 2024
1ac0656
adjust colors in the topbar elements
NFriedo Mar 19, 2024
8227456
remove custom css helpsection
NFriedo Mar 19, 2024
9f9c57b
remove custom css room list and overview pages
NFriedo Mar 19, 2024
ed5e288
adjust color avatar topbar
NFriedo Mar 20, 2024
d5345d4
adjust colors roomdetails page and remove heading colors in typography
NFriedo Mar 20, 2024
ec29a0b
Merge remote-tracking branch 'origin/main' into BC-4233-poc-customize…
NFriedo Mar 20, 2024
3b7a79e
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 20, 2024
4a8292d
adjust colors in the sidebar
NFriedo Mar 21, 2024
06f0a02
adjust color in avatar pop up
NFriedo Mar 21, 2024
5603e23
adjust color task-overview
NFriedo Mar 21, 2024
d151ecc
adjust breadcrumb color
NFriedo Mar 21, 2024
a1cbda2
adjust board colors
NFriedo Mar 21, 2024
6b6bc55
adjust colors in admin pages
NFriedo Mar 22, 2024
2c7fbd4
adjust colors in news, lernstore, footer
NFriedo Mar 22, 2024
73bc147
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 22, 2024
bccd912
adjust alerts
NFriedo Mar 22, 2024
d284102
set on-white var in vuetify options
NFriedo Mar 25, 2024
f249a99
fix HelpDropDown unit test
NFriedo Mar 25, 2024
e31015b
Merge branch 'main' into BC-4233-poc-customized-designsystem
NFriedo Mar 25, 2024
5c6c586
set link color
NFriedo Mar 25, 2024
8fd0df8
set theme colors and vars for dbc
NFriedo Mar 25, 2024
07095b1
Merge remote-tracking branch 'origin/main' into BC-6842-adjust-design…
NFriedo Mar 25, 2024
6e4a5f5
Merge remote-tracking branch 'origin/main' into BC-6842-adjust-design…
NFriedo Mar 25, 2024
820e375
Merge remote-tracking branch 'origin/main' into BC-6842-adjust-design…
NFriedo Mar 25, 2024
a62d28a
set on-surface/background/white on instances
monaweitzenberg Mar 26, 2024
6a6bcd6
Merge branch 'main' into BC-6842-adjust-design-system
NFriedo Mar 26, 2024
e1dff9c
Merge branch 'main' into BC-6842-adjust-design-system
NFriedo Mar 26, 2024
2efb6b7
test text-emphasis
monaweitzenberg Mar 27, 2024
85e0ded
Revert "set on-surface/background/white on instances"
monaweitzenberg Mar 27, 2024
c93a9a4
Revert "test text-emphasis"
monaweitzenberg Mar 27, 2024
25ac9c1
set variables for brb
monaweitzenberg Mar 27, 2024
4d6fac1
set variables for n21
monaweitzenberg Mar 27, 2024
ae64c85
set variables for thr
monaweitzenberg Mar 27, 2024
16b5936
Merge branch 'main' into BC-6842-adjust-design-system
NFriedo Mar 27, 2024
2409d0d
remove custom css rich text element
NFriedo Mar 28, 2024
49ec24d
remove secondary colors in BoardColumn
NFriedo Mar 28, 2024
6d4c6e7
set text variables in base-vuetify
monaweitzenberg Mar 28, 2024
e708e8f
Merge branch 'BC-6842-adjust-design-system' of https://github.com/hpi…
monaweitzenberg Mar 28, 2024
78e284f
change VBtn variant from plain to text
monaweitzenberg Mar 28, 2024
25c6b93
VBtn change from plain to text variant
monaweitzenberg Mar 28, 2024
7c3a69d
focus styles gelöscht
monaweitzenberg Mar 28, 2024
7e38e03
admin tables adjust colors
monaweitzenberg Mar 28, 2024
a9a28c9
Merge remote-tracking branch 'origin/main' into BC-6842-adjust-design…
NFriedo Apr 2, 2024
819c02a
adjust colors on-surface,-background,-white
NFriedo Apr 2, 2024
36eeb0d
fix focus avatar topbar
NFriedo Apr 2, 2024
c560b91
reintroduce focus styling
NFriedo Apr 2, 2024
46cc662
remove secondary colors
NFriedo Apr 3, 2024
bb49963
clean up BaseDialog: remove secondary color + unnecessary props
NFriedo Apr 3, 2024
03820d8
remove secondary color admin table pagination
NFriedo Apr 3, 2024
c86f685
Merge branch 'main' into BC-6842-adjust-design-system
NFriedo Apr 3, 2024
2db35b6
clean up: remove unused css, remove secondary color lernstore
NFriedo Apr 3, 2024
d5b043a
remove unused component modal-footer-actions
NFriedo Apr 3, 2024
45f0721
remove or replace theme-black var
NFriedo Apr 3, 2024
c510d24
removetheme-black var and unused css in lernstore
NFriedo Apr 3, 2024
21514cd
adjust + remove colors
NFriedo Apr 4, 2024
4ae88f9
remove text-black classes
NFriedo Apr 4, 2024
6bee8c0
fix unit test
NFriedo Apr 4, 2024
8a2bfa3
remove secondary colors
NFriedo Apr 4, 2024
0120ecc
remove theme black var
NFriedo Apr 4, 2024
83462ba
adjust alert css
NFriedo Apr 4, 2024
c86dc93
remove css class
NFriedo Apr 4, 2024
5ab3499
Merge branch 'main' into BC-6842-adjust-design-system
hoeppner-dataport Apr 8, 2024
842ba7c
exclude themes-configurations from sonarcloud coverage checks
hoeppner-dataport Apr 8, 2024
387ee11
add themes folder to all sonarcloud exclusions
hoeppner-dataport Apr 8, 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
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@mdi/js": "^7.2.96",
"@openapitools/openapi-generator-cli": "^2.7.0",
"@types/jest": "^27.5.2",
"@types/lodash": "^4.17.0",
"@types/object-hash": "^2.2.1",
"@types/sortablejs": "^1.15.7",
"@typescript-eslint/eslint-plugin": "^6.13.2",
Expand Down
6 changes: 3 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.organization=schulcloud-verbund
sonar.projectKey=hpi-schul-cloud_nuxt-client
sonar.exclusions=src/serverApi/*.*,src/fileStorageApi/*.*
sonar.coverage.exclusions=**/*.unit.ts,**/*.unit.js
sonar.cpd.exclusions=**/locales/**.ts,**/*.unit.ts,**/*.unit.js
sonar.exclusions=src/serverApi/*.*,src/fileStorageApi/*.*,**/themes/**.ts
sonar.coverage.exclusions=**/*.unit.ts,**/*.unit.js,**/themes/**.ts
sonar.cpd.exclusions=**/locales/**.ts,**/*.unit.ts,**/*.unit.js,**/themes/**.ts
2 changes: 1 addition & 1 deletion src/components/administration/AdminMigrationSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export default defineComponent({

<style lang="scss" scoped>
.alert-text {
color: rgba(var(--v-theme-black)) !important;
color: rgba(var(--v-theme-on-background)) !important;
line-height: var(--line-height-lg) !important;
}
</style>
6 changes: 1 addition & 5 deletions src/components/administration/MigrationWarningCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
/>
</v-card-text>
<v-card-actions>
<v-btn
data-testid="disagree-btn"
color="secondary"
@click="$emit(eventName)"
>
<v-btn data-testid="disagree-btn" @click="$emit(eventName)">
{{ $t(disagree) }}
</v-btn>
<v-btn
Expand Down
1 change: 0 additions & 1 deletion src/components/administration/ProvisioningOptionsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
<v-btn
class="mr-2"
data-testid="provisioning-options-cancel-button"
color="secondary"
variant="outlined"
@click="onCancel"
>{{ t("common.actions.cancel") }}</v-btn
Expand Down
1 change: 1 addition & 0 deletions src/components/atoms/vCustomBreadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:disabled="item.disabled"
:exact="true"
class="breadcrumbs-item"
color="primary"
:data-testid="`breadcrumb-${index}`"
>
{{ item.title }}
Expand Down
2 changes: 0 additions & 2 deletions src/components/atoms/vRoomAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export default defineComponent({
.subtitle {
margin-right: calc(var(--space-base-vuetify) * -5);
margin-left: calc(var(--space-base-vuetify) * -5);
color: rgba(var(--v-theme-black));
text-align: center;
overflow-wrap: break-word;
white-space: pre-wrap;
Expand All @@ -223,7 +222,6 @@ export default defineComponent({
margin-left: unset;
/* stylelint-disable-next-line sh-waqar/declaration-use-variable */
font-size: 14px;
color: rgba(var(--v-theme-black));
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/components/atoms/vRoomEmptyAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ export default {
<style scoped>
.outlined {
border: 2px dashed;
border-color: rgba(var(--v-theme-secondary));
}

.hovered-avatar {
border: 2px solid;
border-color: rgba(var(--v-theme-secondary));
}

.avatar-component-empty {
Expand Down
45 changes: 4 additions & 41 deletions src/components/base/BaseDialog/BaseDialog.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,74 +25,37 @@ describe("@/components/base/BaseDialog", () => {
expect(dialogCard.text()).toContain(testMessage);
});

it("iconColor Prop should override actionDesign", () => {
it("iconColor Prop should override default color", () => {
const testColor = "lime";
const wrapper = mountDialog({
props: {
active: true,
iconColor: testColor,
actionDesign: "danger",
icon: "warning",
},
});
expect(wrapper.vm.currentIconColor).toBe(testColor);
});

it("icon should have by default the actionDesign prop color", () => {
it("icon should have by default the primary color", () => {
const designs = ["success", "danger", "primary"];
// Make sure all expects get executed
expect.assertions(designs.length);
const testWithDesign = async (design) => {
const testWithDesign = async () => {
const wrapper = mountDialog({
props: {
actionDesign: design,
icon: "warning",
},
});
// We can not test if the style gets applied because
// the BaseIcon is not rendered (solvable)
// and css custom properties get ignored by vue-test-utils
expect(wrapper.vm.currentIconColor).toBe(
`rgba(var(--v-theme-${design}))`
"rgba(var(--v-theme-primary))"
);
};
designs.map(testWithDesign);
});

it("passes correct button designs", () => {
const wrapper = mountDialog({
props: {
active: true,
actionDesign: "success",
},
});
const confirmBtn = wrapper.findComponent(
`[data-testid="btn-dialog-confirm"]`
);
const cancelBtn = wrapper.findComponent(
`[data-testid="btn-dialog-cancel"]`
);
expect(confirmBtn.classes("text-success")).toBe(true);
expect(cancelBtn.classes("v-btn")).toBe(true);
});

it("invertedDesign: true switches the confirm and cancel button design", () => {
const wrapper = mountDialog({
props: {
active: true,
actionDesign: "success",
invertedDesign: true,
},
});
const confirmBtn = wrapper.findComponent(
`[data-testid="btn-dialog-confirm"]`
);
const cancelBtn = wrapper.findComponent(
`[data-testid="btn-dialog-cancel"]`
);
expect(confirmBtn.classes("v-btn")).toBe(true);
expect(cancelBtn.classes("bg-success")).toBe(true);
});
});

describe("behaviour", () => {
Expand Down
18 changes: 4 additions & 14 deletions src/components/base/BaseDialog/BaseDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
</template>
<template #footerRight>
<v-btn
variant="flat"
:color="!invertedDesign ? 'secondary' : 'success'"
variant="text"
data-testid="btn-dialog-cancel"
@click="cancel"
class="mr-3"
>
{{ cancelText }}
</v-btn>
<v-btn
variant="text"
:color="invertedDesign ? 'secondary' : 'success'"
variant="flat"
color="primary"
data-testid="btn-dialog-confirm"
@click="confirm"
>
Expand Down Expand Up @@ -62,10 +61,6 @@ export default {
type: String,
default: undefined,
},
actionDesign: {
type: String,
default: "primary",
},
confirmText: {
type: String,
default: "Bestätigen",
Expand All @@ -86,18 +81,13 @@ export default {
type: Function,
default: () => ({}),
},
invertedDesign: {
type: Boolean,
},
},
data() {
return {};
},
computed: {
currentIconColor() {
return this.iconColor
? this.iconColor
: `rgba(var(--v-theme-${this.actionDesign}))`;
return this.iconColor ? this.iconColor : "rgba(var(--v-theme-primary))";
},
isActive: {
get() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/base/BaseInput/BaseInputCheckbox.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("@/components/base/BaseInputCheckbox", () => {
label: "Checkbox",
type,
modelValue: true,
color: `rgba(var(--v-theme-secondary))`,
color: `rgba(var(--v-theme-on-background))`,
},
});
expect(wrapper.find("input[type='checkbox']").exists()).toBe(true);
Expand Down
1 change: 0 additions & 1 deletion src/components/base/BaseInput/BaseInputCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export default {
},
color: {
type: String,
default: `rgba(var(--v-theme-secondary))`,
},
label: {
type: String,
Expand Down
4 changes: 2 additions & 2 deletions src/components/base/BaseInput/BaseInputDefault.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<v-btn
v-if="type === 'password' && !error && !success"
icon
variant="plain"
variant="text"
type="button"
data-testid="pwd-visibility-toggle"
class="pwd-toggle"
Expand Down Expand Up @@ -237,7 +237,7 @@ export default defineComponent({

.top {
width: 100%;
border-bottom: var(--border-width) solid rgba(var(--v-theme-black));
border-bottom: var(--border-width) solid rgba(var(--v-theme-on-background));

&:focus-within,
&:hover:not(.disabled) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/base/BaseInput/BaseInputRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ label {
display: inline-block;
width: 0.7em;
height: 0.7em;
border: 2px solid rgba(var(--v-theme-secondary));
border: 2px solid rgba(var(--v-theme-on-background));
border-radius: var(--radius-round);
}

Expand All @@ -82,7 +82,7 @@ input:checked + .radio {
margin: 20% auto;
/* stylelint-enable */
content: "";
background: rgba(var(--v-theme-secondary));
background: rgba(var(--v-theme-on-background));
border-radius: var(--radius-round);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/copy-result-modal/CopyResultModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<p
v-if="warning.isShow"
:key="index"
class="text-black mb-0 aligned-with-icon"
class="mb-0 aligned-with-icon"
data-testid="warning-title"
>
<strong>{{ warning.title }}</strong>
Expand All @@ -36,7 +36,7 @@
</div>
</div>

<div v-if="hasErrors" class="text-black">
<div v-if="hasErrors">
<p>{{ $t("components.molecules.copyResult.information") }}</p>
</div>
<copy-result-modal-list :items="filteredItems" />
Expand Down
8 changes: 4 additions & 4 deletions src/components/copy-result-modal/CopyResultModalListItem.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div v-if="item !== undefined">
<div class="d-flex flex-row align-items-center text-black">
<div class="d-flex flex-row align-items-center">
{{ elementTypeName }} &middot;&nbsp;
<a :href="item.url" target="_blank">{{ breadcrumbTitle }}</a>
</div>
<ul class="ml-4 mb-4 pl-1">
<li v-for="(e, index) of elements" :key="index" class="element-info">
<span class="text-black"
>{{ getElementType(e) }}&nbsp;·&nbsp;{{ getElementTitle(e) }}</span
>
<span>
{{ getElementType(e) }}&nbsp;·&nbsp;{{ getElementTitle(e) }}
</span>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
<v-row class="justify-end mt-10">
<v-btn
class="mr-2"
color="secondary"
variant="outlined"
@click="onCancel"
data-testId="cancel-button"
Expand Down
2 changes: 1 addition & 1 deletion src/components/h5p/H5PPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
v-if="!playerInitialized"
class="d-flex position-fixed justify-center align-center min-height-screen"
>
<v-progress-circular indeterminate color="secondary" size="115" />
<v-progress-circular indeterminate size="115" />
</div>
<h5p-player
ref="h5pPlayerRef"
Expand Down
2 changes: 0 additions & 2 deletions src/components/legacy/NavigationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export default {
justify-content: center;
width: 100%;
line-height: var(--line-height-lg);
color: rgba(var(--v-theme-black));
text-align: center;
background-color: rgba(var(--v-theme-white));
-webkit-backdrop-filter: blur(5px);
Expand Down Expand Up @@ -219,7 +218,6 @@ export default {
padding: var(--space-xs) var(--space-md);
font-family: var(--font-primary);
font-size: var(--text-md);
color: rgba(var(--v-theme-black));

@include breakpoint(tablet) {
display: flex;
Expand Down
1 change: 0 additions & 1 deletion src/components/legacy/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export default {
width: 100%;
padding: 0 var(--space-md);
margin: var(--space-lg) 0 var(--space-md);
color: rgba(var(--v-theme-secondary-darken-1));
text-align: center;

@include breakpoint(tablet) {
Expand Down
Loading
Loading