Skip to content

Commit

Permalink
Merge pull request #17721 from itisAliRH/fix-workflow-card-name-bleed
Browse files Browse the repository at this point in the history
[24.0] Fix Workflow Name Display in `WorkflowCard` to Prevent Bleeding Over Borders
  • Loading branch information
martenson authored Mar 15, 2024
2 parents ed06985 + 73d14be commit 98564d7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 73 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Workflow/WorkflowActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const menuActions: ComputedRef<BAction[]> = computed(() => {
:data-workflow-actions-dropdown="workflow.id"
right
no-caret
class="workflow-actions-dropdown show-in-card"
class="workflow-actions-dropdown"
toggle-class="inline-icon-button"
title="Workflow actions"
variant="link">
Expand Down
126 changes: 54 additions & 72 deletions client/src/components/Workflow/WorkflowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,38 +123,34 @@ async function onTagClick(tag: string) {
:class="{
'workflow-shared': workflow.published,
}">
<div>
<div class="d-flex justify-content-between align-items-center mb-1">
<div>
<WorkflowIndicators :workflow="workflow" :published-view="publishedView" />

<span class="workflow-name font-weight-bold">
{{ workflow.name }}
<BButton
v-if="!shared && !workflow.deleted"
v-b-tooltip.hover.noninteractive
:data-workflow-rename="workflow.id"
class="inline-icon-button workflow-rename"
variant="link"
size="sm"
title="Rename"
@click="showRename = !showRename">
<FontAwesomeIcon :icon="faPen" fixed-width />
</BButton>
</span>
</div>
<div class="workflow-card-header">
<WorkflowIndicators :workflow="workflow" :published-view="publishedView" />

<div class="workflow-count-actions">
<WorkflowInvocationsCount v-if="!isAnonymous && !shared" class="mx-1" :workflow="workflow" />
<div class="workflow-count-actions">
<WorkflowInvocationsCount v-if="!isAnonymous && !shared" class="mx-1" :workflow="workflow" />

<WorkflowActions
:workflow="workflow"
:published="publishedView"
@refreshList="emit('refreshList', true)"
@toggleShowPreview="toggleShowPreview" />
</div>
<WorkflowActions
:workflow="workflow"
:published="publishedView"
@refreshList="emit('refreshList', true)"
@toggleShowPreview="toggleShowPreview" />
</div>

<span class="workflow-name font-weight-bold">
{{ workflow.name }}
<BButton
v-if="!shared && !workflow.deleted"
v-b-tooltip.hover.noninteractive
:data-workflow-rename="workflow.id"
class="inline-icon-button workflow-rename"
variant="link"
size="sm"
title="Rename"
@click="showRename = !showRename">
<FontAwesomeIcon :icon="faPen" fixed-width />
</BButton>
</span>

<TextSummary
v-if="description"
class="my-1"
Expand Down Expand Up @@ -272,47 +268,53 @@ async function onTagClick(tag: string) {
border-radius: 0.5rem;
padding: 0.5rem;
.workflow-count-actions {
display: flex;
align-self: baseline;
align-items: center;
flex-direction: row;
&.workflow-shared {
border-left: 0.25rem solid $brand-primary;
}
.text-summary {
height: inherit;
}
.workflow-card-header {
display: grid;
.workflow-name {
font-size: 1rem;
font-weight: bold;
}
.workflow-count-actions {
display: flex;
align-items: center;
flex-direction: row;
position: absolute;
right: 0.5rem;
}
.workflow-card-actions {
display: flex;
gap: 0.25rem;
margin-top: 0.25rem;
align-items: center;
justify-content: end;
.workflow-name {
font-size: 1rem;
font-weight: bold;
word-break: break-all;
}
}
.workflow-card-footer {
display: flex;
justify-content: space-between;
align-items: end;
}
.workflow-card-tags {
max-width: 60%;
.workflow-card-tags {
max-width: 60%;
}
.workflow-card-actions {
display: flex;
gap: 0.25rem;
margin-top: 0.25rem;
align-items: center;
justify-content: end;
}
}
@container workflow-card (max-width: #{$breakpoint-sm}) {
.workflow-card-footer {
display: inline-block;
}
.workflow-card-tags {
max-width: 100%;
.workflow-card-tags {
max-width: 100%;
}
}
}
Expand All @@ -329,19 +331,7 @@ async function onTagClick(tag: string) {
}
}
.workflow-shared {
border-left: 0.25rem solid $brand-primary;
}
@container workflow-card (max-width: #{$breakpoint-md}) {
.hide-in-card {
display: none !important;
}
.show-in-card {
display: inline-block !important;
}
.workflow-count-actions {
align-items: baseline;
justify-content: end;
Expand All @@ -353,14 +343,6 @@ async function onTagClick(tag: string) {
align-items: end;
flex-direction: column-reverse;
}
.hide-in-card {
display: inline-block !important;
}
.show-in-card {
display: none !important;
}
}
}
</style>

0 comments on commit 98564d7

Please sign in to comment.