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/spot fixes 12.1 (#10445)

Benjamin Bädorfa31a77ef878a
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 7bab05992bb..e4310b69483 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
@@ -29,7 +29,7 @@
</div>
<form
(submit)="onSubmit($event)"
- class="spot-body op-project-include--body"
+ class="spot-container op-project-include--body"
>
<spot-text-field
[disabled]="!(areProjectsLoaded$ | async)"
diff --git a/frontend/src/app/spot/components/chip-field/chip-field.component.html b/frontend/src/app/spot/components/chip-field/chip-field.component.html
deleted file mode 100644
index 80bdc022c87..00000000000
--- a/frontend/src/app/spot/components/chip-field/chip-field.component.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
- Normally I'd just wrap a spot-text-field here
- but because Angular is trash we'd increase HTML nesting,
- making it harder to write clean CSS.
--->
-
-<ng-content select="[slot=before]"></ng-content>
-
-<div class="spot-chip-field--values">
- <spot-filter-chip
- class="spot-filter-chip spot-chip-field--value"
- *ngFor="let item of value; index as i"
- (remove)="remove(i)"
- [title]="item"
- ></spot-filter-chip>
-</div>
-
-<input
- class="spot-text-field--input"
-
- [attr.name]="name"
- [disabled]="disabled"
- [placeholder]="placeholder"
- [(ngModel)]="textValue"
-
- (keydown.enter)="onEnter($event)"
- (keydown.backspace)="onBackspace($event)"
- #input
-/>
-<ng-content select="[slot=after]"></ng-content>
diff --git a/frontend/src/app/spot/components/chip-field/chip-field.component.ts b/frontend/src/app/spot/components/chip-field/chip-field.component.ts
deleted file mode 100644
index 758234a20c1..00000000000
--- a/frontend/src/app/spot/components/chip-field/chip-field.component.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import {
- Component,
- ElementRef,
- ViewChild,
- forwardRef,
- HostBinding,
- HostListener,
- Input,
-} from '@angular/core';
-import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
-
-@Component({
- selector: 'spot-chip-field',
- templateUrl: './chip-field.component.html',
- providers: [{
- provide: NG_VALUE_ACCESSOR,
- useExisting: forwardRef(() => SpotChipFieldComponent),
- multi: true,
- }],
-})
-export class SpotChipFieldComponent implements ControlValueAccessor {
- @HostBinding('class.spot-chip-field') public classNameChipField = true;
-
- @HostBinding('class.spot-text-field') public classNameTextField = true;
-
- @HostListener('click') public onParentClick() {
- this.input.nativeElement.focus();
- }
-
- @ViewChild('input') public input:ElementRef;
-
- @Input() name = `spot-chip-field-${+(new Date())}`;
-
- @Input() disabled = false;
-
- @Input() public placeholder = '';
-
- @Input('value') public _value:string[] = [];
-
- textValue = '';
-
- get value():string[] {
- return this._value;
- }
-
- set value(value:string[]) {
- this._value = value;
- this.onChange(value);
- this.onTouched(value);
- }
-
- remove(i:number):void {
- this.value = this.value.slice(0, i).concat(this.value.slice(i + 1));
- }
-
- onBackspace(e:KeyboardEvent):void {
- if (this.textValue !== '') {
- return;
- }
-
- e.preventDefault();
-
- this.value = this.value.slice(0, this.value.length - 1);
- }
-
- onEnter(e:KeyboardEvent):void {
- e.stopPropagation();
-
- if (this.textValue === '') {
- return;
- }
-
- e.preventDefault();
-
- this.value = [
- ...this.value,
- this.textValue,
- ];
-
- this.textValue = '';
- }
-
- writeValue(value:string[]):void {
- this.value = value;
- }
-
- onChange = (_:string[]):void => {};
-
- onTouched = (_:string[]):void => {};
-
- registerOnChange(fn:(_:string[]) => void):void {
- this.onChange = fn;
- }
-
- registerOnTouched(fn:(_:string[]) => void):void {
- this.onTouched = fn;
- }
-}
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html b/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
index 4e6994f7bd5..b9d622d49a2 100644
--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.html
@@ -1,8 +1,9 @@
<ng-content select="[slot=trigger]"></ng-content>
<div
- [ngClass]="['spot-drop-modal--body', 'spot-body', alignmentClass]"
+ [ngClass]="['spot-drop-modal--body', 'spot-container', alignmentClass]"
(click)="onBodyClick($event)"
cdkTrapFocus
+ *ngIf="open"
>
<ng-content select="[slot=body]"></ng-content>
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts b/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
index fef9f6284b6..82882f7fb98 100644
--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
@@ -17,13 +17,14 @@ import SpotDropAlignmentOption from '../../drop-alignment-options';
export class SpotDropModalComponent implements OnDestroy {
@HostBinding('class.spot-drop-modal') public className = true;
- @HostBinding('class.spot-drop-modal_opened') public _open = false;
-
@Output() closed = new EventEmitter<void>();
@Input() public alignment:SpotDropAlignmentOption = SpotDropAlignmentOption.BottomLeft;
+ public _open = false;
+
@Input('open')
+ @HostBinding('class.spot-drop-modal_opened')
set open(value:boolean) {
this._open = value;
diff --git a/frontend/src/app/spot/components/filter-chip/filter-chip.component.html b/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
index 73e6c09a3f4..67014ede578 100644
--- a/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
+++ b/frontend/src/app/spot/components/filter-chip/filter-chip.component.html
@@ -4,6 +4,7 @@
type="button"
(click)="remove.emit()"
[attr.aria-label]="text.remove"
+ [disabled]="disabled"
>
<span class="spot-icon spot-icon_close"></span>
</button>
diff --git a/frontend/src/app/spot/components/filter-chip/filter-chip.component.ts b/frontend/src/app/spot/components/filter-chip/filter-chip.component.ts
index 3fabaf10892..9c281848cc1 100644
--- a/frontend/src/app/spot/components/filter-chip/filter-chip.component.ts
+++ b/frontend/src/app/spot/components/filter-chip/filter-chip.component.ts
@@ -14,6 +14,8 @@ import { I18nService } from 'core-app/core/i18n/i18n.service';
export class SpotFilterChipComponent {
@HostBinding('class.spot-filter-chip') public className = true;
+ @Input() @HostBinding('class.spot-filter-chip_disabled') public disabled = false;
+
@Input() removable = true;
@Input() title = '';
diff --git a/frontend/src/app/spot/components/text-field/text-field.component.html b/frontend/src/app/spot/components/text-field/text-field.component.html
index 8584e144b7c..2ffebb090bf 100644
--- a/frontend/src/app/spot/components/text-field/text-field.component.html
+++ b/frontend/src/app/spot/components/text-field/text-field.component.html
@@ -5,6 +5,8 @@
[disabled]="disabled"
[placeholder]="placeholder"
[(ngModel)]="value"
+ (focus)="focused = true"
+ (blur)="focused = false"
#input
/>
<button
diff --git a/frontend/src/app/spot/components/text-field/text-field.component.ts b/frontend/src/app/spot/components/text-field/text-field.component.ts
index afa134f7982..c5616b1a002 100644
--- a/frontend/src/app/spot/components/text-field/text-field.component.ts
+++ b/frontend/src/app/spot/components/text-field/text-field.component.ts
@@ -21,6 +21,8 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
export class SpotTextFieldComponent implements ControlValueAccessor {
@HostBinding('class.spot-text-field') public className = true;
+ @HostBinding('class.spot-text-field_focused') public focused = false;
+
@HostListener('click') public onParentClick() {
this.input.nativeElement.focus();
}
diff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.html
index 1458f183693..3ffd9871a1a 100644
--- a/frontend/src/app/spot/spot-docs.component.html
+++ b/frontend/src/app/spot/spot-docs.component.html
@@ -1,59 +1,64 @@
<h1>Buttons</h1>
-<button class="spot-button">Default</button>
-<button class="spot-button">
- <span>Default</span>
- <span class="spot-icon spot-icon_bell"></span>
-</button>
-<button class="spot-button"><span class="spot-icon spot-icon_bell"></span></button>
-
-<button class="spot-button spot-button_main">Main</button>
-<button class="spot-button spot-button_main">
- <span class="spot-icon spot-icon_bell"></span>
- <span>Main</span>
- <span class="spot-icon spot-icon_bell"></span>
-</button>
-<button class="spot-button spot-button_main"><span class="spot-icon spot-icon_bell"></span></button>
-
-<button class="spot-button spot-button_accent">Accent</button>
-<button class="spot-button spot-button_accent">
- <span class="spot-icon spot-icon_bell"></span>
- <span>Accent</span>
- <span class="spot-icon spot-icon_bell"></span>
-</button>
-<button class="spot-button spot-button_accent"><span class="spot-icon spot-icon_bell"></span></button>
-
-<button class="spot-button spot-button_danger">Danger</button>
-<button class="spot-button spot-button_danger">
- <span class="spot-icon spot-icon_bell"></span>
- <span>Danger</span>
- <span class="spot-icon spot-icon_bell"></span>
-</button>
-<button class="spot-button spot-button_danger"><span class="spot-icon spot-icon_bell"></span></button>
-
-<button class="spot-button" disabled>Disabled</button>
-<button class="spot-button" disabled>
- <span class="spot-icon spot-icon_bell"></span>
- <span>Disabled</span>
- <span class="spot-icon spot-icon_bell"></span>
-</button>
-<button class="spot-button" disabled><span class="spot-icon spot-icon_bell"></span></button>
-
-
-<hr>
-
-<button class="spot-button spot-button_outlined">Default</button>
-<button class="spot-button spot-button_outlined spot-button_main">Main</button>
-<button class="spot-button spot-button_outlined spot-button_accent">Accent</button>
-<button class="spot-button spot-button_outlined spot-button_danger">Danger</button>
-<button class="spot-button spot-button_outlined" disabled>Disabled</button>
-
-<hr>
-
-<button class="spot-button spot-button_basic">Default</button>
-<button class="spot-button spot-button_basic spot-button_main">Main</button>
-<button class="spot-button spot-button_basic spot-button_accent">Accent</button>
-<button class="spot-button spot-button_basic spot-button_danger">Danger</button>
-<button class="spot-button spot-button_basic" disabled>Disabled</button>
+<section class="space-children">
+ <button class="spot-button">Default</button>
+ <button class="spot-button">
+ <span>Default</span>
+ <span class="spot-icon spot-icon_bell"></span>
+ </button>
+ <button class="spot-button"><span class="spot-icon spot-icon_bell"></span></button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button spot-button_main">Main</button>
+ <button class="spot-button spot-button_main">
+ <span>Main</span>
+ <span class="spot-icon spot-icon_bell"></span>
+ </button>
+ <button class="spot-button spot-button_main"><span class="spot-icon spot-icon_bell"></span></button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button spot-button_accent">Accent</button>
+ <button class="spot-button spot-button_accent">
+ <span>Accent</span>
+ <span class="spot-icon spot-icon_bell"></span>
+ </button>
+ <button class="spot-button spot-button_accent"><span class="spot-icon spot-icon_bell"></span></button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button spot-button_danger">Danger</button>
+ <button class="spot-button spot-button_danger">
+ <span>Danger</span>
+ <span class="spot-icon spot-icon_bell"></span>
+ </button>
+ <button class="spot-button spot-button_danger"><span class="spot-icon spot-icon_bell"></span></button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button" disabled>Disabled</button>
+ <button class="spot-button" disabled>
+ <span>Disabled</span>
+ <span class="spot-icon spot-icon_bell"></span>
+ </button>
+ <button class="spot-button" disabled><span class="spot-icon spot-icon_bell"></span></button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button spot-button_outlined">Default</button>
+ <button class="spot-button spot-button_outlined spot-button_main">Main</button>
+ <button class="spot-button spot-button_outlined spot-button_accent">Accent</button>
+ <button class="spot-button spot-button_outlined spot-button_danger">Danger</button>
+ <button class="spot-button spot-button_outlined" disabled>Disabled</button>
+</section>
+
+<section class="space-children">
+ <button class="spot-button spot-button_basic">Default</button>
+ <button class="spot-button spot-button_basic spot-button_main">Main</button>
+ <button class="spot-button spot-button_basic spot-button_accent">Accent</button>
+ <button class="spot-button spot-button_basic spot-button_danger">Danger</button>
+ <button class="spot-button spot-button_basic" disabled>Disabled</button>
+</section>
<h1>Toggles</h1>
@@ -148,87 +153,116 @@ Currently selected value is {{ toggleValue }}
<h1>Filter Chip</h1>
-<spot-filter-chip
- title="Default chip"
- (remove)="onRemoveChip()"
-></spot-filter-chip>
-<spot-filter-chip
- title="Unremovable chip"
- [removable]="false"
-></spot-filter-chip>
-<spot-filter-chip
- title="Default chip with icon"
- icon="bell"
- (remove)="onRemoveChip()"
-></spot-filter-chip>
-<spot-filter-chip
- icon="bell"
- title="Unremovable chip with icon"
- [removable]="false"
-></spot-filter-chip>
+<section class="space-children">
+ <spot-filter-chip
+ title="Default chip"
+ (remove)="onRemoveChip()"
+ ></spot-filter-chip>
+
+ <spot-filter-chip
+ title="Unremovable chip"
+ [removable]="false"
+ ></spot-filter-chip>
+
+ <spot-filter-chip
+ title="Default chip with icon"
+ icon="bell"
+ (remove)="onRemoveChip()"
+ ></spot-filter-chip>
+
+ <spot-filter-chip
+ icon="bell"
+ title="Unremovable chip with icon"
+ [removable]="false"
+ ></spot-filter-chip>
+</section>
+
+<section class="space-children">
+ <spot-filter-chip
+ title="Default chip"
+ (remove)="onRemoveChip()"
+ [disabled]="true"
+ ></spot-filter-chip>
-<h1>Text Field</h1>
+ <spot-filter-chip
+ title="Unremovable chip"
+ [removable]="false"
+ [disabled]="true"
+ ></spot-filter-chip>
-<input
- class="spot-text-field"
- placeholder="Placeholder value"
-/>
-
-<input
- class="spot-text-field"
- value="Test value"
-/>
-
-<spot-text-field
- placeholder="Placeholder value"
- value="Test value"
- name="textfield-name"
-></spot-text-field>
-
-<spot-text-field
- placeholder="Placeholder value"
- [(ngModel)]="textFieldValue"
-></spot-text-field>
-
-<spot-text-field
- placeholder="Placeholder value"
- [(ngModel)]="textFieldValue"
->
- <span
- slot="after"
- class="spot-icon spot-icon_bell"
- ></span>
-</spot-text-field>
-
-<spot-text-field
- placeholder="Placeholder value"
- [(ngModel)]="textFieldValue"
->
- <span
- slot="before"
- class="spot-icon spot-icon_bell"
- ></span>
- <span
- slot="after"
- class="spot-icon spot-icon_bell"
- ></span>
-</spot-text-field>
-
-<spot-text-field
- placeholder="Placeholder value"
- [(ngModel)]="textFieldValue"
->
- <span
- slot="before"
- class="spot-icon spot-icon_bell"
- ></span>
-</spot-text-field>
+ <spot-filter-chip
+ title="Default chip with icon"
+ icon="bell"
+ (remove)="onRemoveChip()"
+ [disabled]="true"
+ ></spot-filter-chip>
-<h1>Chip Field</h1>
+ <spot-filter-chip
+ icon="bell"
+ title="Unremovable chip with icon"
+ [removable]="false"
+ [disabled]="true"
+ ></spot-filter-chip>
+</section>
-<spot-chip-field
- placeholder="Type and press enter"
-></spot-chip-field>
+<h1>Text Field</h1>
+
+<section class="space-children">
+ <input
+ class="spot-text-field"
+ placeholder="Placeholder value"
+ />
+
+ <input
+ class="spot-text-field"
+ value="Test value"
+ />
+
+ <spot-text-field
+ placeholder="Placeholder value"
+ value="Test value"
+ name="textfield-name"
+ ></spot-text-field>
+
+ <spot-text-field
+ placeholder="Placeholder value"
+ [(ngModel)]="textFieldValue"
+ ></spot-text-field>
+
+ <spot-text-field
+ placeholder="Placeholder value"
+ [(ngModel)]="textFieldValue"
+ >
+ <span
+ slot="after"
+ class="spot-icon spot-icon_bell"
+ ></span>
+ </spot-text-field>
+
+ <spot-text-field
+ placeholder="Placeholder value"
+ [(ngModel)]="textFieldValue"
+ >
+ <span
+ slot="before"
+ class="spot-icon spot-icon_bell"
+ ></span>
+ <span
+ slot="after"
+ class="spot-icon spot-icon_bell"
+ ></span>
+ </spot-text-field>
+
+ <spot-text-field
+ placeholder="Placeholder value"
+ [(ngModel)]="textFieldValue"
+ >
+ <span
+ slot="before"
+ class="spot-icon spot-icon_bell"
+ ></span>
+ </spot-text-field>
+</section>
<h1>Drop Modal</h1>
@@ -259,7 +293,7 @@ Currently selected value is {{ toggleValue }}
(click)="dropModalOpen = !dropModalOpen"
>Open Modal</button>
<ng-container slot="body">
- <div class="spot-body">
+ <div class="spot-container">
<h1 class="spot-header-small">Test</h1>
<spot-text-field
@@ -324,3 +358,9 @@ Currently selected value is {{ toggleValue }}
</button>
</div>
</div>
+
+<style>
+ #content-wrapper {
+ background-color: #eee;
+ }
+</style>
diff --git a/frontend/src/app/spot/spot-docs.component.sass b/frontend/src/app/spot/spot-docs.component.sass
new file mode 100644
index 00000000000..86e92a378ae
--- /dev/null
+++ b/frontend/src/app/spot/spot-docs.component.sass
@@ -0,0 +1,11 @@
+.space-children
+ display: flex
+ flex-wrap: wrap
+
+ > *
+ margin: 0.5rem
+
+// This is done so we can see all-white elements
+#content,
+#content-wrapper
+ background-color: #eee
diff --git a/frontend/src/app/spot/spot-docs.component.ts b/frontend/src/app/spot/spot-docs.component.ts
index a370b1ea6ec..2dff05bcd39 100644
--- a/frontend/src/app/spot/spot-docs.component.ts
+++ b/frontend/src/app/spot/spot-docs.component.ts
@@ -1,8 +1,10 @@
-import { Component } from '@angular/core';
+import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'spot-docs',
templateUrl: './spot-docs.component.html',
+ styleUrls: ['./spot-docs.component.sass'],
+ encapsulation: ViewEncapsulation.None,
})
export class SpotDocsComponent {
indeterminateState = null;
diff --git a/frontend/src/app/spot/spot.module.ts b/frontend/src/app/spot/spot.module.ts
index 693dca63fac..0d872fdd554 100644
--- a/frontend/src/app/spot/spot.module.ts
+++ b/frontend/src/app/spot/spot.module.ts
@@ -8,7 +8,6 @@ import { SpotCheckboxComponent } from './components/checkbox/checkbox.component'
import { SpotToggleComponent } from './components/toggle/toggle.component';
import { SpotTextFieldComponent } from './components/text-field/text-field.component';
import { SpotFilterChipComponent } from './components/filter-chip/filter-chip.component';
-import { SpotChipFieldComponent } from './components/chip-field/chip-field.component';
import { SpotDropModalComponent } from './components/drop-modal/drop-modal.component';
import { SpotTooltipComponent } from './components/tooltip/tooltip.component';
import { SpotDocsComponent } from './spot-docs.component';
@@ -28,7 +27,6 @@ import { SpotDocsComponent } from './spot-docs.component';
SpotToggleComponent,
SpotTextFieldComponent,
SpotFilterChipComponent,
- SpotChipFieldComponent,
SpotDropModalComponent,
SpotTooltipComponent,
],
@@ -37,7 +35,6 @@ import { SpotDocsComponent } from './spot-docs.component';
SpotToggleComponent,
SpotTextFieldComponent,
SpotFilterChipComponent,
- SpotChipFieldComponent,
SpotDropModalComponent,
SpotTooltipComponent,
],
diff --git a/frontend/src/app/spot/styles/sass/common/body.sass b/frontend/src/app/spot/styles/sass/common/container.sass
similarity index 96%
rename from frontend/src/app/spot/styles/sass/common/body.sass
rename to frontend/src/app/spot/styles/sass/common/container.sass
index 0dac15aec1f..6e41d8e41f4 100644
--- a/frontend/src/app/spot/styles/sass/common/body.sass
+++ b/frontend/src/app/spot/styles/sass/common/container.sass
@@ -1,4 +1,4 @@
-.spot-body
+.spot-container
display: flex
flex-direction: column
diff --git a/frontend/src/app/spot/styles/sass/common/index.sass b/frontend/src/app/spot/styles/sass/common/index.sass
index 954cba1e43f..a386bf6f91a 100644
--- a/frontend/src/app/spot/styles/sass/common/index.sass
+++ b/frontend/src/app/spot/styles/sass/common/index.sass
@@ -1,3 +1,3 @@
@import './icon'
-@import './body'
+@import './container'
@import './typography'
diff --git a/frontend/src/app/spot/styles/sass/components/button.sass b/frontend/src/app/spot/styles/sass/components/button.sass
index 9a6057eb336..c2a776a0adf 100644
--- a/frontend/src/app/spot/styles/sass/components/button.sass
+++ b/frontend/src/app/spot/styles/sass/components/button.sass
@@ -22,6 +22,8 @@
&, *
box-sizing: border-box
+ @include spot-focus
+
&:hover
background-color: $spot-color-basic-gray-6
border-color: $spot-color-basic-gray-6
diff --git a/frontend/src/app/spot/styles/sass/components/checkbox.sass b/frontend/src/app/spot/styles/sass/components/checkbox.sass
index 0b89faa5ee2..de29255898b 100644
--- a/frontend/src/app/spot/styles/sass/components/checkbox.sass
+++ b/frontend/src/app/spot/styles/sass/components/checkbox.sass
@@ -5,6 +5,9 @@
height: $spot-spacing-1_5
width: $spot-spacing-1_5
+ &:focus-within &--fake
+ outline: $spot-focus
+
&, *
box-sizing: border-box
diff --git a/frontend/src/app/spot/styles/sass/components/chip-field.sass b/frontend/src/app/spot/styles/sass/components/chip-field.sass
deleted file mode 100644
index 30958e088aa..00000000000
--- a/frontend/src/app/spot/styles/sass/components/chip-field.sass
+++ /dev/null
@@ -1,7 +0,0 @@
-.spot-chip-field
- &--values
- display: flex
-
- &--value
- &:not(:last-child)
- margin-right: $spot-spacing-0_5
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 a61d10adee5..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,9 +3,11 @@
display: inline-flex
&--body
+ $border-radius: 5px
+
@include spot-z-index("drop-modal", 1)
- pointer-events: none
- opacity: 0
+ pointer-events: all
+ opacity: 1
position: fixed
top: auto
@@ -18,7 +20,7 @@
box-shadow: $spot-shadow-light-mid
background: $spot-color-basic-white
- border-radius: 5px
+ border-radius: $border-radius
display: flex
flex-direction: column
@@ -91,6 +93,14 @@
&_top-right
bottom: calc(100% + #{$spot-spacing-0_25})
right: 0%
+
+ // TODO: At some point, this needs to be a cleverer selector.
+ // Though most action bars will probably be at the bottom of a drop-modal,
+ // this does not necessarily have to be the case. In that case, this'll look weird.
+ > .spot-action-bar,
+ > .spot-container > .spot-action-bar
+ border-bottom-left-radius: $border-radius
+ border-bottom-right-radius: $border-radius
&_opened::before
@include spot-z-index("drop-modal", 0)
@@ -107,7 +117,7 @@
display: none
&--close-button
- display: none
+ display: block
position: fixed
top: auto
height: auto
@@ -122,13 +132,5 @@
right: $spot-spacing-0_75
transform: none
-
- &_opened &--close-button
- display: block
-
@media #{$spot-mq-drop-modal-in-context}
display: none
-
- &_opened &--body
- pointer-events: all
- opacity: 1
diff --git a/frontend/src/app/spot/styles/sass/components/filter-chip.sass b/frontend/src/app/spot/styles/sass/components/filter-chip.sass
index 64290385c28..eb6114a1243 100644
--- a/frontend/src/app/spot/styles/sass/components/filter-chip.sass
+++ b/frontend/src/app/spot/styles/sass/components/filter-chip.sass
@@ -18,7 +18,11 @@
cursor: pointer
padding: $spot-spacing-0_25
+ @include spot-focus
+
&--title
padding: $spot-spacing-0_25
-
+ &_disabled
+ color: $spot-color-basic-gray-3
+ background-color: $spot-color-basic-gray-5
diff --git a/frontend/src/app/spot/styles/sass/components/index.sass b/frontend/src/app/spot/styles/sass/components/index.sass
index 9835414dea8..f128dd4601d 100644
--- a/frontend/src/app/spot/styles/sass/components/index.sass
+++ b/frontend/src/app/spot/styles/sass/components/index.sass
@@ -5,7 +5,6 @@
@import './checkbox'
@import './text-field'
@import './filter-chip'
-@import './chip-field'
@import './drop-modal'
@import './list'
@import './action-bar'
diff --git a/frontend/src/app/spot/styles/sass/components/text-field.sass b/frontend/src/app/spot/styles/sass/components/text-field.sass
index c163d97ace3..cfef1f0b400 100644
--- a/frontend/src/app/spot/styles/sass/components/text-field.sass
+++ b/frontend/src/app/spot/styles/sass/components/text-field.sass
@@ -14,10 +14,9 @@
color: $spot-color-basic-gray-3
&:focus,
- &:focus-within
- border-color: $spot-color-indication-attention
+ &_focused
color: $spot-color-basic-black
- outline: none
+ outline: $spot-focus
&--input
background: transparent
@@ -41,5 +40,7 @@
font-size: $spot-spacing-0_75
color: $spot-color-basic-gray-3
+ @include spot-focus
+
&:not(:last-child)
margin-right: $spot-spacing-0_5
diff --git a/frontend/src/app/spot/styles/sass/components/toggle.sass b/frontend/src/app/spot/styles/sass/components/toggle.sass
index 4d8cea30548..6001a59073e 100644
--- a/frontend/src/app/spot/styles/sass/components/toggle.sass
+++ b/frontend/src/app/spot/styles/sass/components/toggle.sass
@@ -19,6 +19,9 @@
color: $spot-color-main-dark
cursor: pointer
+ &:focus-within
+ outline: $spot-focus
+
&:not(:last-child)
border-right: 0
diff --git a/frontend/src/app/spot/styles/sass/variables/focus.sass b/frontend/src/app/spot/styles/sass/variables/focus.sass
new file mode 100644
index 00000000000..3cd9ac75902
--- /dev/null
+++ b/frontend/src/app/spot/styles/sass/variables/focus.sass
@@ -0,0 +1,5 @@
+$spot-focus: 2px solid $spot-color-indication-attention
+
+@mixin spot-focus
+ &:focus
+ outline: $spot-focus
diff --git a/frontend/src/app/spot/styles/sass/variables/index.sass b/frontend/src/app/spot/styles/sass/variables/index.sass
index 03211e88368..d493699de3d 100644
--- a/frontend/src/app/spot/styles/sass/variables/index.sass
+++ b/frontend/src/app/spot/styles/sass/variables/index.sass
@@ -1,3 +1,4 @@
@import '../../tokens/dist/tokens'
@import 'typography'
@import 'zindex'
+@import 'focus'