From e93f195d59b6d94c3e2b6542b49c2875a0e478c6 Mon Sep 17 00:00:00 2001 From: Henry Wilkinson Date: Thu, 28 Sep 2023 15:08:27 -0400 Subject: [PATCH] fix: Right Align Copy Buttons & `` vertical `width: 100%` (#1177) * Reorders actions, adds tooltip - All copy buttons on the collection share dialog are now on the right side - Adds a tooltip to tell the user the button opens the link in a new tab * Make vertical `dec-list` items fill 100% width of their parent container - Allows for better placement of items within the container - Adds horizontal padding to info bars * Right align copy button in item details page --- frontend/src/components/desc-list.ts | 5 +++++ frontend/src/pages/org/collection-detail.ts | 24 ++++++++++++--------- frontend/src/pages/org/crawl-detail.ts | 12 +++++++---- frontend/src/pages/org/workflow-detail.ts | 2 +- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/desc-list.ts b/frontend/src/components/desc-list.ts index b9ddb683..ef1bcf4e 100644 --- a/frontend/src/components/desc-list.ts +++ b/frontend/src/components/desc-list.ts @@ -46,6 +46,10 @@ export class DescListItem extends LitElement { justify-content: var(--justify-item, initial); border-right: var(--border-right, 0px); } + + .content { + width: var(--width-full, initial); + } `; @property({ type: String }) @@ -71,6 +75,7 @@ export class DescList extends LitElement { .vertical { grid-template-columns: 100%; gap: 1rem; + --width-full: 100%; } .horizontal { diff --git a/frontend/src/pages/org/collection-detail.ts b/frontend/src/pages/org/collection-detail.ts index cc6042cd..7c609833 100644 --- a/frontend/src/pages/org/collection-detail.ts +++ b/frontend/src/pages/org/collection-detail.ts @@ -121,7 +121,9 @@ export class CollectionDetail extends LiteElement { ${when(this.isCrawler, this.renderActions)} -
${this.renderInfoBar()}
+
+ ${this.renderInfoBar()} +
${this.renderTabs()}
${choose( @@ -217,21 +219,23 @@ export class CollectionDetail extends LiteElement { ${msg("This collection can be viewed by anyone with the link.")}

+
+ + + + +
+
${publicReplayUrl}
publicReplayUrl} content=${msg("Copy Public URL")} >
-
${publicReplayUrl}
-
- - -
${msg("Embed Collection")} diff --git a/frontend/src/pages/org/crawl-detail.ts b/frontend/src/pages/org/crawl-detail.ts index a3cc987f..9b8095af 100644 --- a/frontend/src/pages/org/crawl-detail.ts +++ b/frontend/src/pages/org/crawl-detail.ts @@ -699,10 +699,14 @@ export class CrawlDetail extends LiteElement { ${this.crawl - ? html` - ${this.crawl.id} ` + ? html` +
+ ${this.crawl.id} + +
+ ` : html``}
diff --git a/frontend/src/pages/org/workflow-detail.ts b/frontend/src/pages/org/workflow-detail.ts index 3d39125b..275c381b 100644 --- a/frontend/src/pages/org/workflow-detail.ts +++ b/frontend/src/pages/org/workflow-detail.ts @@ -318,7 +318,7 @@ export class WorkflowDetail extends LiteElement { -
+
${this.renderDetails()}