Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Change buttons and toggle to match old styles in project include

Benjamin Bädorfc0b0991aabca
diff --git a/frontend/src/app/shared/components/project-include/project-include.component.html b/frontend/src/app/shared/components/project-include/project-include.component.html
index 929e5742560..491a7550868 100644
--- a/frontend/src/app/shared/components/project-include/project-include.component.html
+++ b/frontend/src/app/shared/components/project-include/project-include.component.html
@@ -73,7 +73,7 @@
<div class="spot-action-bar--right">
<button
[disabled]="(loading$ | async)"
- class="spot-button spot-button_outlined spot-button_main"
+ class="button"
type="button"
(click)="clearSelection()"
>
@@ -81,7 +81,7 @@
</button>
<button
[disabled]="(loading$ | async)"
- class="spot-button spot-button_main"
+ class="button -highlight"
>
{{ text.apply }}
</button>
diff --git a/frontend/src/app/spot/components/toggle/toggle.component.html b/frontend/src/app/spot/components/toggle/toggle.component.html
index 0c223b773e4..5da2e5c1495 100644
--- a/frontend/src/app/spot/components/toggle/toggle.component.html
+++ b/frontend/src/app/spot/components/toggle/toggle.component.html
@@ -1,6 +1,6 @@
<label
*ngFor="let option of options"
- [ngClass]="{ 'spot-toggle--option': true, 'spot-toggle--option_selected': value === option.value }"
+ [ngClass]="{ 'button': true, 'form--field-inline-button': true, '-active': value === option.value }"
>
<input
class="spot-toggle--option-input"
diff --git a/frontend/src/app/spot/components/toggle/toggle.component.ts b/frontend/src/app/spot/components/toggle/toggle.component.ts
index 38823f76f3b..f00e700e129 100644
--- a/frontend/src/app/spot/components/toggle/toggle.component.ts
+++ b/frontend/src/app/spot/components/toggle/toggle.component.ts
@@ -23,6 +23,9 @@ export interface SpotToggleOption<T> {
}],
})
export class SpotToggleComponent<T> implements ControlValueAccessor {
+ // TODO: These old styles will need to be replaced
+ @HostBinding('class.form--field-inline-buttons-container') public classNameOld = true;
+
@HostBinding('class.spot-toggle') public className = true;
@Output() checkedChange = new EventEmitter<boolean>();
diff --git a/frontend/src/global_styles/content/_editable_toolbar.sass b/frontend/src/global_styles/content/_editable_toolbar.sass
index 75a596fbeb7..06de54a39d9 100644
--- a/frontend/src/global_styles/content/_editable_toolbar.sass
+++ b/frontend/src/global_styles/content/_editable_toolbar.sass
@@ -9,9 +9,6 @@
float: none
margin-left: 1rem
- // Fix up default margins of items in floating toolbar
- .button
- margin: 0
.title-container.-small
.editable-toolbar-title--fixed
diff --git a/frontend/src/global_styles/layout/_toolbar.sass b/frontend/src/global_styles/layout/_toolbar.sass
index 68620b7c400..31974bb2b5c 100644
--- a/frontend/src/global_styles/layout/_toolbar.sass
+++ b/frontend/src/global_styles/layout/_toolbar.sass
@@ -105,7 +105,6 @@ $nm-color-success-background: #d8fdd1
flex-grow: 0
.button
- width: 100%
overflow: hidden
white-space: normal
// For links the total height adds borders to line-height (== 34px)