-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changes - improves overflow issues at smaller screen sizes - adds icons to buttons - updates text & layout to match mocks - changes primary button & button options depending on if there's a qa run available - adds a loading state for qa run status & buttons - updates `<btrix-crawl-status>` with a `type` param allowing for crawls, uploads, and QA runs - Updates `<btrix-alert>` to match `<sl-tag>` styling - Improves overflow issues at smaller viewport sizes by making tab lists overflow when necessary ### Features - Ability to start/stop/cancel QA runs #1666 @SuaYoo - Ability to see progress of current QA run @emma-sg - Ability to delete QA runs @emma-sg - Ability to download QA run files #1666 @SuaYoo - Only able to start review if a QA Run is finished (for now, initial pass). @SuaYoo - Only most recent running or successful QA run is displayed in header --------- Co-authored-by: sua yoo <[email protected]> Co-authored-by: sua yoo <[email protected]> Co-authored-by: Ilya Kreymer <[email protected]> Co-authored-by: Henry Wilkinson <[email protected]>
- Loading branch information
1 parent
6cabb9c
commit 9f0a1fc
Showing
22 changed files
with
1,498 additions
and
571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import { localized } from "@lit/localize"; | ||
import type { SlDropdown } from "@shoelace-style/shoelace"; | ||
import menuItemStyles from "@shoelace-style/shoelace/dist/components/menu-item/menu-item.styles.js"; | ||
import { html } from "lit"; | ||
import { customElement, property } from "lit/decorators.js"; | ||
import { classMap } from "lit/directives/class-map.js"; | ||
|
||
import { TailwindElement } from "@/classes/TailwindElement"; | ||
import type { OverflowDropdown } from "@/components/ui/overflow-dropdown"; | ||
import { NavigateController } from "@/controllers/navigate"; | ||
|
||
/** | ||
* Enables `href` on menu items | ||
* See https://github.com/shoelace-style/shoelace/discussions/1629 | ||
* | ||
* Based on https://github.com/shoelace-style/shoelace/blob/d0b71adb81e21687a5ef036565dad44bc609bcce/src/components/menu-item/menu-item.component.ts | ||
*/ | ||
@localized() | ||
@customElement("btrix-menu-item-link") | ||
export class MenuItemLink extends TailwindElement { | ||
static styles = [menuItemStyles]; | ||
|
||
@property({ type: String }) | ||
href = ""; | ||
|
||
@property({ type: Boolean }) | ||
download: boolean | string = false; | ||
|
||
@property({ type: Boolean }) | ||
disabled = false; | ||
|
||
@property({ type: Boolean }) | ||
loading = false; | ||
|
||
private readonly navigate = new NavigateController(this); | ||
|
||
render() { | ||
return html`<a | ||
href=${this.href} | ||
id="anchor" | ||
part="base" | ||
class=${classMap({ | ||
"menu-item": true, | ||
"menu-item--disabled": this.disabled, | ||
"menu-item--loading": this.loading, | ||
})} | ||
download=${this.download} | ||
aria-disabled=${this.disabled} | ||
@click=${(e: MouseEvent) => { | ||
if (this.disabled || this.loading) return; | ||
if (this.download) { | ||
const dropdown = this.shadowRoot!.host.closest< | ||
SlDropdown | OverflowDropdown | ||
>("sl-dropdown, btrix-overflow-dropdown"); | ||
if (dropdown) { | ||
void dropdown.hide(); | ||
} | ||
} else { | ||
this.navigate.link(e); | ||
} | ||
}} | ||
> | ||
<span part="checked-icon" class="menu-item__check"> | ||
<sl-icon name="check" library="system" aria-hidden="true"></sl-icon> | ||
</span> | ||
<slot name="prefix" part="prefix" class="menu-item__prefix"></slot> | ||
<slot part="label" class="menu-item__label"></slot> | ||
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot> | ||
<span part="submenu-icon" class="menu-item__chevron"> | ||
<!-- This also functions as a spacer in sl-menu-item --> | ||
</span> | ||
${this.loading ? html` <sl-spinner part="spinner"></sl-spinner> ` : ""} | ||
</a>`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from "./page-list"; | ||
import("./page-qa-toolbar"); | ||
import("./page-qa-approval"); | ||
import("./qa-run-dropdown"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.