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/3713/view encapsulation slider #3714

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

- Bump node version from 18 to 20 [#3690](https://github.com/MaibornWolff/codecharta/pull/3690)
- Enabled view encapsulation for Global Configuration dialog, Ribbon Bar and File Panel [#3712](https://github.com/MaibornWolff/codecharta/pull/3712)
- Enabled view encapsulation for Slider [#3713](https://github.com/MaibornWolff/codecharta/pull/3713)

## [1.127.1] - 2024-08-12

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mat-card {
padding: 0 5px;
padding: 0;
height: 46px;
border-radius: 0;
border-top: 1px solid #cdcdcd;
Expand All @@ -26,6 +26,7 @@ mat-card {
transition: background-color 0.4s;
border-bottom: 1px solid transparent;
white-space: nowrap;
margin: 0 5px;

@at-root :host.separator & {
border-top: 1px solid rgba(0, 0, 0, 0.12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<mat-slider [disabled]="disabled" [step]="step" [min]="min" [max]="max">
<input matSliderThumb [value]="value" (input)="handleInputOnChange($event)" />
</mat-slider>
<mat-form-field appearance="outline">
<mat-form-field appearance="outline" subscriptSizing="dynamic">
<input
matInput
type="number"
Expand Down
48 changes: 2 additions & 46 deletions visualization/app/codeCharta/ui/slider/slider.component.scss
Original file line number Diff line number Diff line change
@@ -1,49 +1,5 @@
cc-slider {
:host {
width: 100%;
margin-top: 8px;

.label {
margin-left: 10px;
}

.cc-slider-container {
display: flex;
flex-direction: column;

.slider-with-input {
display: flex;
align-items: center;

mat-slider {
margin: 0px 12px;
flex: 2;
}

mat-form-field {
flex: 1;
height: 32px;

.mat-mdc-text-field-wrapper {
padding: 0px 12px;

.mat-mdc-form-field-flex {
align-self: center;

.mat-mdc-form-field-infix {
padding: 0;
min-height: 28px;

.mat-mdc-input-element {
min-height: inherit;
}
}
}
}

.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align {
display: none;
}
}
}
}
display: inline-block;
}
5 changes: 2 additions & 3 deletions visualization/app/codeCharta/ui/slider/slider.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Component, Input, ViewEncapsulation } from "@angular/core"
import { Component, Input } from "@angular/core"
import { parseNumberInput } from "../../util/parseNumberInput"

@Component({
selector: "cc-slider",
templateUrl: "./slider.component.html",
styleUrls: ["./slider.component.scss"],
encapsulation: ViewEncapsulation.None
styleUrls: ["./slider.component.scss"]
})
export class SliderComponent {
@Input() value?: number
Expand Down
12 changes: 3 additions & 9 deletions visualization/app/material/matSelectMetricChooser.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
width: 100%;
font-size: 14px;
box-shadow:
0px 5px 5px -3px rgba(0, 0, 0, 0.2),
0px 8px 10px 1px rgba(0, 0, 0, 0.14),
0px 3px 14px 2px rgba(0, 0, 0, 0.12);
0 5px 5px -3px rgba(0, 0, 0, 0.2),
0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);

.search-icon {
color: variables.$cc-primary-color;
Expand Down Expand Up @@ -59,10 +59,4 @@
}
}
}

&:has(.cc-file-select) {
.mat-mdc-select-panel {
padding: 0;
}
}
}
1 change: 1 addition & 0 deletions visualization/app/material/material.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
@import "./matMenu";
@import "./matDialog";
@import "./matSelect";
@import "./slider";
47 changes: 47 additions & 0 deletions visualization/app/material/slider.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@use "variables";

.cc-slider-container {
display: flex;
flex-direction: column;

.label {
margin-left: 10px;
color: variables.$cc-font-color;
}

.slider-with-input {
display: flex;
align-items: center;
}

mat-slider {
margin: 0 12px;
flex: 2;
}

mat-form-field {
flex: 1;
height: 32px;
}

.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align {
display: none;
}

.mat-mdc-text-field-wrapper {
padding: 0 12px;

.mat-mdc-form-field-flex {
align-self: center;

.mat-mdc-form-field-infix {
padding: 0;
min-height: 28px;

.mat-mdc-input-element {
min-height: inherit;
}
}
}
}
}
Loading