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

Fix/revert old style change (#10667)

Benjamin Bädorf338feb2ca6ad
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 04ae0774583..929e5742560 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
@@ -22,26 +22,10 @@
<ng-container slot="body">
<div class="op-project-include--header">
<h1 class="op-project-include--title">{{ text.title }}</h1>
- <div class="form--field-inline-buttons-container">
- <button
- class="button form--field-inline-button"
- [ngClass]="{ '-active': displayMode === 'all' }"
- data-qa-selector="op-project-include--toggle"
- type="button"
- (click)="displayMode = 'all'"
- >
- {{ text.filter_all }}
- </button>
- <button
- class="button form--field-inline-button"
- type="button"
- data-qa-selector="op-project-include--toggle"
- [ngClass]="{ '-active': displayMode === 'selected' }"
- (click)="displayMode = 'selected'"
- >
- {{ text.filter_selected }}
- </button>
- </div>
+ <spot-toggle
+ [options]="displayModeOptions"
+ [(ngModel)]="displayMode"
+ ></spot-toggle>
</div>
<form
(submit)="onSubmit($event)"
@@ -89,7 +73,7 @@
<div class="spot-action-bar--right">
<button
[disabled]="(loading$ | async)"
- class="button"
+ class="spot-button spot-button_outlined spot-button_main"
type="button"
(click)="clearSelection()"
>
@@ -97,7 +81,7 @@
</button>
<button
[disabled]="(loading$ | async)"
- class="button -highlight"
+ class="spot-button spot-button_main"
>
{{ text.apply }}
</button>
diff --git a/frontend/src/app/shared/components/project-include/project-include.component.ts b/frontend/src/app/shared/components/project-include/project-include.component.ts
index 2026deb8632..a8b82fb0048 100644
--- a/frontend/src/app/shared/components/project-include/project-include.component.ts
+++ b/frontend/src/app/shared/components/project-include/project-include.component.ts
@@ -65,6 +65,11 @@ export class OpProjectIncludeComponent extends UntilDestroyedMixin implements On
public query$ = this.wpTableFilters.querySpace.query.values$();
+ public displayModeOptions = [
+ { value: 'all', title: this.text.filter_all },
+ { value: 'selected', title: this.text.filter_selected },
+ ];
+
private _displayMode = 'all';
public get displayMode():string {
diff --git a/frontend/src/app/spot/styles/sass/components/drop-modal.sass b/frontend/src/app/spot/styles/sass/components/drop-modal.sass
index d7e927e3688..426d41f11ed 100644
--- a/frontend/src/app/spot/styles/sass/components/drop-modal.sass
+++ b/frontend/src/app/spot/styles/sass/components/drop-modal.sass
@@ -3,7 +3,7 @@
display: inline-flex
&--body
- $border-radius: 2px
+ $border-radius: 5px
@include spot-z-index("drop-modal", 1)
pointer-events: all
diff --git a/frontend/src/app/spot/styles/sass/components/link.sass b/frontend/src/app/spot/styles/sass/components/link.sass
index 8b177e72cd5..7d7a1765784 100644
--- a/frontend/src/app/spot/styles/sass/components/link.sass
+++ b/frontend/src/app/spot/styles/sass/components/link.sass
@@ -1,7 +1,7 @@
.spot-link
@include unset-button-styles
display: inline
- color: var(--content-link-color)
+ color: $spot-color-main
text-decoration: none
cursor: pointer
@@ -11,7 +11,7 @@
&:hover,
&:active,
&:focus
- color: var(--content-link-hover-active-color)
+ color: $spot-color-main-dark
text-decoration: none
&_danger
diff --git a/frontend/src/global_styles/content/_buttons.sass b/frontend/src/global_styles/content/_buttons.sass
index 92406721174..21eae57c947 100644
--- a/frontend/src/global_styles/content/_buttons.sass
+++ b/frontend/src/global_styles/content/_buttons.sass
@@ -146,14 +146,6 @@ html.-browser-windows.-browser-chrome
&:before
margin-right: var(--button--text-icon-spacing)
- // This is an override to be able to use these button styles in the new SPOT action-bar
- .spot-action-bar
- .button
- width: auto
-
- &:not(:last-child)
- margin-right: 1rem
-
// Button class to use as a link-like submit button
.button--link
color: var(--content-link-color)
diff --git a/spec/support/components/project_include_component.rb b/spec/support/components/project_include_component.rb
index d4808d34307..a834de931ce 100644
--- a/spec/support/components/project_include_component.rb
+++ b/spec/support/components/project_include_component.rb
@@ -61,7 +61,7 @@ module Components
def set_filter_selected(filter)
within_body do
- page.find("[data-qa-selector='op-project-include--toggle']", text: filter ? 'Only selected' : 'All projects').click
+ page.find("label.spot-toggle--option", text: filter ? 'Only selected' : 'All projects').click
end
end