From 5ad506a9e52acf11c048b088a8c905a661258a0c Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 2 Oct 2020 10:55:51 -0400 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=F0=9F=A4=96=20always=20show=20sco?= =?UTF-8?q?pe=20nav=20in=20header=20when=20authenticated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/templates/application.hbs | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ui/core/app/templates/application.hbs b/ui/core/app/templates/application.hbs index 9f7cd20a4..fa96053b4 100644 --- a/ui/core/app/templates/application.hbs +++ b/ui/core/app/templates/application.hbs @@ -8,29 +8,29 @@ {{#if this.session.isAuthenticated}} - {{#if this.scope.isOrg}} - - - {{#if this.session.data.authenticated.isGlobal}} - - {{t "titles.global"}} + + + {{#if this.session.data.authenticated.isGlobal}} + + {{t "titles.global"}} + + {{#each this.orgScopes as |scope|}} + + {{scope.displayName}} - {{#each this.orgScopes as |scope|}} - - {{scope.displayName}} - - {{/each}} - {{else}} + {{/each}} + {{else}} + {{#if this.scope}} {{this.scope.displayName}} {{/if}} - - - {{/if}} + {{/if}} + + Date: Fri, 2 Oct 2020 12:02:40 -0400 Subject: [PATCH 2/3] fix: a11y warning regarding card hover state --- addons/rose/addon/styles/rose/components/card/_link.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/rose/addon/styles/rose/components/card/_link.scss b/addons/rose/addon/styles/rose/components/card/_link.scss index ad33c49c5..605b274cb 100644 --- a/addons/rose/addon/styles/rose/components/card/_link.scss +++ b/addons/rose/addon/styles/rose/components/card/_link.scss @@ -115,6 +115,13 @@ $xxxs: sizing.rems(xxxs); // 2 } } + &:hover { + .rose-card-link-description, + .rose-card-link-footer-id { + color: var(--stark); + } + } + // .rose-card-link-description { // margin: auto 0 0; // color: var(--ui-gray); From e77f939ec4b7f193230615c7d3e10d53e8ec4db2 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 2 Oct 2020 12:31:30 -0400 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20enhance=20copyable?= =?UTF-8?q?=20with=20mark=20element=20and=20background=20color?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/app/components/copyable/index.hbs | 18 ++++++++++++------ ui/core/app/components/copyable/index.js | 19 +++++++++++-------- ui/core/app/styles/app.scss | 9 +++++++++ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/ui/core/app/components/copyable/index.hbs b/ui/core/app/components/copyable/index.hbs index 499c4fc43..497e5f2f7 100644 --- a/ui/core/app/components/copyable/index.hbs +++ b/ui/core/app/components/copyable/index.hbs @@ -5,18 +5,24 @@ {{did-insert this.register}} {{will-destroy this.destroy}} > - - {{yield}} - + {{#if this.copied}} + + {{yield}} + + {{else}} + + {{yield}} + + {{/if}} {{this.copyableButtonText}} + @iconOnly={{if this.copied this.successIcon this.actionIcon}} + title={{if this.copied this.successText this.actionText}} + >{{this.actionText}} {{else}} {{yield}} diff --git a/ui/core/app/components/copyable/index.js b/ui/core/app/components/copyable/index.js index 010c12758..0801d56b5 100644 --- a/ui/core/app/components/copyable/index.js +++ b/ui/core/app/components/copyable/index.js @@ -3,17 +3,22 @@ import ClipboardJS from 'clipboard'; import { action } from '@ember/object'; import { generateComponentID } from 'rose/utilities/component-auto-id'; import { task, timeout } from 'ember-concurrency'; -import { set } from '@ember/object'; import { bind } from '@ember/runloop'; +import { tracked } from '@glimmer/tracking'; export default class CopyableComponent extends Component { // =attributes id = generateComponentID(); - icon = 'copy-action'; copyableButtonId = `copyable-button-${this.id}`; - copyableButtonText = this.args.buttonText; + + actionIcon = 'copy-action'; + successIcon = 'copy-success'; + actionText = this.args.buttonText; + successText = this.args.acknowledgeText; + + @tracked copied = false; /** * A Ember Concurrency-based task that updates copy icon to a success state @@ -26,11 +31,9 @@ export default class CopyableComponent extends Component { * @type {Task} */ @task(function * () { - set(this, 'icon', 'copy-success'); - set(this, 'copyableButtonText', this.args.acknowledgeText); + this.copied = true; yield timeout(1000); - set(this, 'icon', 'copy-action'); - set(this, 'copyableButtonText', this.args.buttonText); + this.copied = false; }).drop() successIconTimer; // =methods @@ -58,7 +61,7 @@ export default class CopyableComponent extends Component { */ @action register() { - if(!this.clipboard) { + if (!this.clipboard) { this.clipboard = new ClipboardJS(`#${this.copyableButtonId}`, { text: () => this.args.text, }); diff --git a/ui/core/app/styles/app.scss b/ui/core/app/styles/app.scss index 052ca77c0..42ad8597c 100644 --- a/ui/core/app/styles/app.scss +++ b/ui/core/app/styles/app.scss @@ -100,4 +100,13 @@ position: relative; top: -2px; } + + mark { + background-color: transparent; + animation: fadeBackground 0.75s linear; + @keyframes fadeBackground { + 0% { background-color: var(--action-subtler-1); } + 100% { background-color: transparent; } + } + } }