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

Tech/3733/view encapsulation dialogs #3736

Merged
merged 15 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions visualization/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/)
- Enabled view encapsulation for the Attribute Side Bar [#3726](https://github.com/MaibornWolff/codecharta/pull/3726)
- Enabled view encapsulation for Buttons [#3729](https://github.com/MaibornWolff/codecharta/pull/3729)
- Enabled view encapsulation for the Export 3D Map Dialog [#3732](https://github.com/MaibornWolff/codecharta/pull/3732)
- Enabled view encapsulation for Dialogs [#3736](https://github.com/MaibornWolff/codecharta/pull/3736)

## [1.127.1] - 2024-08-12

Expand Down
55 changes: 0 additions & 55 deletions visualization/app/codeCharta/codeCharta.component.scss

This file was deleted.

6 changes: 2 additions & 4 deletions visualization/app/codeCharta/codeCharta.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { Component, OnInit, ViewEncapsulation } from "@angular/core"
import { Component, OnInit } from "@angular/core"
import { Store } from "@ngrx/store"
import { LoadInitialFileService } from "./services/loadInitialFile/loadInitialFile.service"
import { setIsLoadingFile } from "./state/store/appSettings/isLoadingFile/isLoadingFile.actions"

@Component({
selector: "cc-code-charta",
templateUrl: "./codeCharta.component.html",
styleUrls: ["./codeCharta.component.scss"],
encapsulation: ViewEncapsulation.None
templateUrl: "./codeCharta.component.html"
})
export class CodeChartaComponent implements OnInit {
isInitialized = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:host {
.side-bar-container {
transition: right 0.3s ease;
width: 350px;
height: calc(100% - 98px); // canvas overflow (ribbonBar height)
padding: 8px;
Expand All @@ -13,6 +14,10 @@
right: 0;
}

&.cc-shadow {
box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.2) !important;
}

&:before {
content: "";
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,13 @@
.hidden {
display: none;
}

#codeMap {
position: fixed;
z-index: 0;
top: 98px;
left: 0;
width: 100%;
height: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Add Custom View</h2>
<p>
<mat-form-field>
<mat-label>Save individual configurations for your map.</mat-label>
<input matInput class="custom-config-input" [formControl]="customConfigName" required />
<input matInput class="cc-custom-config-input" [formControl]="customConfigName" required />
<mat-hint>Config View Name</mat-hint>
@if (customConfigName.invalid) {
<mat-error>{{ getErrorMessage() }}</mat-error>
Expand All @@ -20,7 +20,7 @@ <h2>Add Custom View</h2>
cdkAutosizeMinRows="8"
cdkTextareaAutosize
matInput
class="custom-config-input"
class="cc-custom-config-input"
[(ngModel)]="customConfigNote"
required
>
Expand All @@ -30,7 +30,7 @@ <h2>Add Custom View</h2>
</p>
</mat-dialog-content>

<mat-dialog-actions>
<mat-dialog-actions class="cc-add-custom-config">
<cc-download-and-purge-configs></cc-download-and-purge-configs>

<button mat-flat-button mat-dialog-close (click)="addCustomConfig()" [disabled]="customConfigName.invalid">ADD</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CcState } from "../../../../codeCharta.model"
import { State } from "@ngrx/store"

@Component({
selector: "cc-add-custom-config-dialog",
templateUrl: "./addCustomConfigDialog.component.html"
})
export class AddCustomConfigDialogComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
:host {
text-align: right;
display: flex;
flex-wrap: wrap;
justify-content: center;
}

.exceed-local-storage-message {
Expand All @@ -10,7 +13,10 @@
}

.exceed-local-storage-button {
margin-right: 89px;
color: #ffffff;
background-color: #b02929;

&:hover {
background-color: #8c1f1f;
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import markdownFile from "../../../../../CHANGELOG.md"
import { Component, Inject, ViewEncapsulation } from "@angular/core"
import { Component, Inject } from "@angular/core"
import { MAT_DIALOG_DATA } from "@angular/material/dialog"
import { marked } from "marked"

@Component({
templateUrl: "./changelogDialog.component.html",
styleUrls: ["./changelogDialog.component.scss"],
encapsulation: ViewEncapsulation.None
selector: "cc-change-log-dialog",
templateUrl: "./changelogDialog.component.html"
})
export class ChangelogDialogComponent {
changes: Record<string, string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Component, Inject, ViewEncapsulation } from "@angular/core"
import { Component, Inject } from "@angular/core"
import { MAT_DIALOG_DATA } from "@angular/material/dialog"

@Component({
templateUrl: "./confirmationDialog.component.html",
styleUrls: ["./confirmationDialog.component.scss"],
encapsulation: ViewEncapsulation.None
selector: "cc-confirmation-dialog",
templateUrl: "./confirmationDialog.component.html"
})
export class ConfirmationDialogComponent {
constructor(@Inject(MAT_DIALOG_DATA) public data: { title: string; message: string }) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, Inject, ViewEncapsulation } from "@angular/core"
import { Component, Inject } from "@angular/core"
import { MAT_DIALOG_DATA } from "@angular/material/dialog"

@Component({
templateUrl: "./errorDialog.component.html",
encapsulation: ViewEncapsulation.None
selector: "cc-error-dialog",
templateUrl: "./errorDialog.component.html"
})
export class ErrorDialogComponent {
constructor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
top: 98px;
}

cc-file-extension-bar {
:host {
z-index: 30;
background-color: white;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ViewEncapsulation } from "@angular/core"
import { Component } from "@angular/core"
import { MetricDistribution, FileExtensionCalculator } from "./selectors/fileExtensionCalculator"
import { metricDistributionSelector } from "./selectors/metricDistribution.selector"
import { ThreeSceneService } from "../codeMap/threeViewer/threeSceneService"
Expand All @@ -8,8 +8,7 @@ import { CcState } from "../../codeCharta.model"
@Component({
selector: "cc-file-extension-bar",
templateUrl: "./fileExtensionBar.component.html",
styleUrls: ["./fileExtensionBar.component.scss"],
encapsulation: ViewEncapsulation.None
styleUrls: ["./fileExtensionBar.component.scss"]
})
export class FileExtensionBarComponent {
showAbsoluteValues = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ $fixedHeight: 35;
bottom: ($fixedHeight + 20) + px;
width: 88px;
font-size: 10pt;
transition: right 0.3s ease;
}

.block-wrapper {
Expand All @@ -40,6 +41,7 @@ $fixedHeight: 35;
border-radius: 5px;
min-width: 200px;
max-width: 30%;
transition: right 0.3s ease;

&.isAttributeSideBarVisible {
right: 390px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cc-loading-file-progress-spinner #loading-gif-file {
#loading-gif-file {
position: fixed;
left: 0;
top: 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ViewEncapsulation } from "@angular/core"
import { Component } from "@angular/core"
import { Store } from "@ngrx/store"
import { Observable } from "rxjs"
import { CcState } from "../../codeCharta.model"
Expand All @@ -7,8 +7,7 @@ import { isLoadingFileSelector } from "../../state/store/appSettings/isLoadingFi
@Component({
selector: "cc-loading-file-progress-spinner",
templateUrl: "./loadingFileProgressSpinner.component.html",
styleUrls: ["./loadingFileProgressSpinner.component.scss"],
encapsulation: ViewEncapsulation.None
styleUrls: ["./loadingFileProgressSpinner.component.scss"]
})
export class LoadingFileProgressSpinnerComponent {
isLoadingFile$: Observable<boolean>
Expand Down
23 changes: 23 additions & 0 deletions visualization/app/codeCharta/ui/logo/logo.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#logo {
display: flex;
flex-direction: column;
position: absolute;
left: 2em;
bottom: 1em;
z-index: 1;

img {
object-fit: contain;
max-width: 100%;
height: auto;
}

h2 {
color: #5a585a;
font-weight: bold;
font-size: 10px;
text-align: center;
margin: 0;
z-index: -1;
}
}
4 changes: 2 additions & 2 deletions visualization/app/codeCharta/ui/logo/logo.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, ViewEncapsulation } from "@angular/core"
import { Component } from "@angular/core"
import packageJson from "../../../../package.json"

@Component({
selector: "cc-logo",
templateUrl: "./logo.component.html",
encapsulation: ViewEncapsulation.None
styleUrls: ["./logo.component.scss"]
})
export class LogoComponent {
version = packageJson.version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, Input, OnInit, ViewEncapsulation } from "@angular/core"
import { Component, Input, OnInit } from "@angular/core"
import { Store } from "@ngrx/store"
import { Observable, map } from "rxjs"
import { PrimaryMetrics, CcState, Node, CodeMapNode, AttributeTypes } from "../../../codeCharta.model"
import { map, Observable } from "rxjs"
import { AttributeTypes, CcState, CodeMapNode, Node, PrimaryMetrics } from "../../../codeCharta.model"
import { createAttributeTypeSelector } from "./createAttributeTypeSelector.selector"
import { NodeSelectionService } from "../nodeSelection.service"
import { isLeaf } from "../../../util/codeMapHelper"

@Component({
selector: "cc-metric-chooser-type",
templateUrl: "./metricChooserType.component.html",
encapsulation: ViewEncapsulation.None
templateUrl: "./metricChooserType.component.html"
})
export class MetricChooserTypeComponent implements OnInit {
@Input({ required: true }) metricFor: keyof PrimaryMetrics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HttpClient } from "@angular/common/http"
import { Component, ViewEncapsulation } from "@angular/core"
import { Component } from "@angular/core"
import { Store } from "@ngrx/store"
import { first, tap } from "rxjs"
import { CcState } from "../../../codeCharta.model"
Expand All @@ -13,9 +13,8 @@ import { defaultState } from "../../../state/store/state.manager"
import { deleteCcState } from "../../../util/indexedDB/indexedDBWriter"

@Component({
templateUrl: "./confirmResetMapDialog.component.html",
styleUrls: ["./confirmResetMapDialog.component.scss"],
encapsulation: ViewEncapsulation.None
selector: "cc-confirm-reset-map-dialog",
templateUrl: "./confirmResetMapDialog.component.html"
})
export class ConfirmResetMapDialogComponent {
private urlUtils = new UrlExtractor(this.httpClient)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,6 @@ cc-map-tree-view {
i.flattened {
color: gray;
}

.small-action-button button {
min-height: 0;
width: 100%;
height: 100%;
margin: 0;
background-color: transparent;
box-shadow: none;

&:hover {
background-color: #ddd;
}

i {
position: absolute;
top: 2px;
left: 6px;
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@use "variables";

button {
display: inline-block;
height: 19px;
width: 24px;
min-height: 0;
margin: 0;
background-color: transparent;
box-shadow: none;
vertical-align: top;

&:hover {
background-color: #ddd;
color: variables.$cc-font-color;
}

i {
position: absolute;
top: 2px;
left: 6px;
}
}
Loading
Loading