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

fix(visualization/#3654): View encapsulation causing component style problems #3655

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
5 changes: 4 additions & 1 deletion visualization/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
"customWebpackConfig": {
"path": "conf/webpack.config.js"
},
"scripts": []
"scripts": [],
"stylePreprocessorOptions": {
"includePaths": ["app/material"]
}
},
"configurations": {
"production": {
Expand Down
4 changes: 2 additions & 2 deletions visualization/app/codeCharta/codeCharta.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../material/theme";
@use "variables";
@import "../mixins.scss";

cc-code-charta {
Expand Down Expand Up @@ -95,7 +95,7 @@ cc-code-charta {
}

&.current:hover {
background-color: theme.$cc-emphasized-color !important;
background-color: variables.$cc-emphasized-color !important;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../material/theme";
@use "variables";

cc-action-icon {
display: inline-flex;
Expand All @@ -7,11 +7,11 @@ cc-action-icon {
width: 24px;
height: 24px;
border-radius: 100%;
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
font-size: 14px;

&:hover {
background-color: theme.$cc-emphasized-color;
background-color: variables.$cc-emphasized-color;
}

&.disabled {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "../../../../material/theme";
@use "variables";

cc-attribute-type-selector {
.mat-button-toggle-appearance-standard .mat-button-toggle-label-content {
display: flex;
Expand All @@ -12,7 +13,7 @@ cc-attribute-type-selector {

&:hover {
background-color: rgba(0, 0, 0, 0.05);
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
@use "../../../../../material/theme";
@use "variables";

.cc-add-custom-config-dialog .mat-mdc-dialog-container {
padding: 0;
width: 500px;
overflow: hidden;

mat-toolbar {
&.header {
background-color: theme.$cc-primary-color;
h2 {
color: white;
}
}
}

.dialog-content {
mat-form-field {
width: 100%;
Expand Down Expand Up @@ -62,11 +49,8 @@
}

&.add-custom-config-button {
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
background-color: rgba(138, 132, 132, 0.08);
position: absolute;
right: 16px;
bottom: 0;
}

&.add-custom-config-button[disabled] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@use "../../../../../material/theme";
@use "variables";

cc-custom-config-item-group {
.custom-config-item-group-title {
color: theme.$cc-font-color;
color: variables.$cc-font-color;
display: inline-block;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../material/theme";
@use "variables";

.cc-custom-config-list {
width: 850px;
Expand Down Expand Up @@ -49,7 +49,7 @@
margin: 10px 0 20px 0;
font-size: 1.4em;
line-height: 1.4em;
color: theme.$cc-font-color;
color: variables.$cc-font-color;
}

.action-buttons button {
Expand All @@ -60,12 +60,12 @@
border-radius: 100%;
line-height: 48px;
background-color: #ffffff;
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;

&:disabled,
&[disabled] {
background-color: #e6e6e6;
color: theme.$cc-disabled-color;
color: variables.$cc-disabled-color;
}

i.fa {
Expand Down Expand Up @@ -128,7 +128,7 @@

&:hover {
background-color: rgba(0, 0, 0, 0.05);
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
border-radius: 50%;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "app/material/theme";
@use "variables";

cc-custom-config-note-dialog {
.custom-config-note-dialog-container {
Expand All @@ -19,12 +19,12 @@ cc-custom-config-note-dialog {
button {
padding: 12px;
margin: 0 0 0 10px;
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
background-color: rgba(138, 132, 132, 0.08);

&:hover {
background-color: rgba(0, 0, 0, 0.05);
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@use "../../../../material/theme";
@use "variables";

cc-download-custom-configs-button {
button {
padding: 0 16px;
height: 48px;
width: 100%;
margin: 0;
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
vertical-align: middle;

&:disabled {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../material/theme";
@use "variables";

.cc-changelog-dialog .mat-mdc-dialog-container {
[mat-dialog-content] {
Expand Down Expand Up @@ -26,7 +26,7 @@
justify-content: flex-end;

a {
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
}

button {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,29 @@ export class ChangelogDialogComponent {
private getChangelogChanges() {
const parsedMarkdownFile = marked.parse(markdownFile, { headerIds: false })
let changelogLines = parsedMarkdownFile.split("\n")

const currentVersionFirstLine = this.findVersionLine(changelogLines, this.data.currentVersion)
const lastOpenedVersionFirstLine = this.findVersionLine(changelogLines, this.data.previousVersion)

//Add 1 to keep the version line so that it detects the end of the last set of changes
changelogLines = changelogLines.slice(currentVersionFirstLine, lastOpenedVersionFirstLine + 1)
const titles = ["Added 🚀", "Fixed 🐞", "Changed", "Removed 🗑", "Chore 👨‍💻 👩‍💻"]
const changes = {}
for (const title of titles) {
const titlePattern = new RegExp(`<h3>${title}</h3>`)
const titleLinesIndexes = this.getAllIndexes(changelogLines, titlePattern)

const changelogTypes: string[] = []
for (const lineIndex of titleLinesIndexes) {
// Add 2 to remove the headline and the <ul> tag
const start = lineIndex + 2
const end = this.findEndChangesLine(changelogLines, lineIndex)

for (const changeLine of changelogLines.slice(start, end)) {
changelogTypes.push(`${changeLine}<br>`)
}
}

if (changelogTypes.length > 0) {
changes[title] = changelogTypes.join("\n")
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../material/theme";
@use "variables";

cc-file-panel {
display: flex;
Expand All @@ -20,32 +20,32 @@ cc-file-panel {
}

&.current {
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
color: #ffffff;
}

&.current:hover {
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
}
}
}

.reference-comparison-switch {
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
margin: 0;
height: 24px;
width: 36px;
border-radius: 5px;

&[disabled] {
background-color: theme.$cc-disabled-color;
background-color: variables.$cc-disabled-color;
}

&:hover {
background-color: theme.$cc-emphasized-color;
background-color: variables.$cc-emphasized-color;

&[disabled] {
background-color: theme.$cc-disabled-color;
background-color: variables.$cc-disabled-color;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../material/theme";
@use "variables";
.file-select {
&.mat-mdc-select-panel {
min-width: max-content;
Expand All @@ -23,7 +23,7 @@

&:hover {
background-color: rgba(0, 0, 0, 0.05);
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
}

&.file-select-action-button {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../material/theme";
@use "variables";

$fixedHeight: 35;
cc-legend-panel {
Expand All @@ -10,10 +10,10 @@ cc-legend-panel {
right: -35px;
color: white;
user-select: none;
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;

&:hover {
background-color: theme.$cc-emphasized-color;
background-color: variables.$cc-emphasized-color;
}

&.isAttributeSideBarVisible {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../material/theme";
@use "variables";

cc-metric-chooser {
width: 100%;
Expand Down Expand Up @@ -43,7 +43,7 @@ cc-metric-chooser:hover .metric-value {
0px 3px 14px 2px rgba(0, 0, 0, 0.12);

.search-icon {
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
margin-left: 8px;
font-size: 18px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@use "../../../../material/theme";
@use "variables";

.cc-confirm-reset-map-dialog .mat-mdc-dialog-container {
padding: 0;
width: 500px;
overflow: hidden;

mat-toolbar {
&.header {
background-color: theme.$cc-primary-color;
background-color: variables.$cc-primary-color;
h2 {
color: white;
}
Expand All @@ -24,7 +20,7 @@
.mat-mdc-button {
padding: 0 8px;
margin: 8px 0 8px 8px;
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
background-color: rgba(138, 132, 132, 0.08);
bottom: 0;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@use "../../../material/theme";
@use "variables";

cc-reset-settings-button {
button {
color: theme.$cc-primary-color;
color: variables.$cc-primary-color;
background: none;
align-items: center;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "../../../../material/theme";
@use "variables";

cc-artificial-intelligence {
display: flex;
justify-content: center;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../../material/theme";
@use "variables";

.ai-drop-down.suspicious-metric-panel {
scrollbar-gutter: stable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@use "../../../../../material/theme";
@use "variables";

cc-metric-color-range-slider {
.cc-range-slider-container {
Expand Down Expand Up @@ -47,7 +47,7 @@ cc-metric-color-range-slider {
position: absolute;
top: 20px;
border-radius: 100%;
border: 7px solid theme.$cc-primary-color;
border: 7px solid variables.$cc-primary-color;
}
}
}
Expand Down
Loading
Loading