Remove redundant header from Policy Workspace, move Refresh to top-right
The workspace component had its own header (eyebrow 'Policy Studio · Workspace', h1 'Policy packs', lede) that duplicated the parent pack-shell's 'Policy Pack Workspace' title. Removed it. Moved the Refresh button from bottom-left footer to top-right actions bar using secondary button styling. Removed min-height: 100vh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,14 +14,10 @@ import { PolicyPackStore } from '../services/policy-pack.store';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
<section class="workspace" [attr.aria-busy]="loading">
|
||||
<header class="workspace__header">
|
||||
<div>
|
||||
<p class="workspace__eyebrow">Policy Studio · Workspace</p>
|
||||
<h1>Policy packs</h1>
|
||||
<p class="workspace__lede">Deterministic list sorted by modified date desc, tie-breaker id.</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="workspace__actions">
|
||||
<button type="button" (click)="refresh()" [disabled]="refreshing">{{ refreshing ? 'Refreshing…' : 'Refresh' }}</button>
|
||||
</div>
|
||||
|
||||
@if (scopeHint) {
|
||||
<div class="workspace__banner">
|
||||
{{ scopeHint }} — some actions are disabled. Request scopes from your admin.
|
||||
@@ -125,18 +121,16 @@ import { PolicyPackStore } from '../services/policy-pack.store';
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="workspace__footer">
|
||||
<button type="button" (click)="refresh()" [disabled]="refreshing">{{ refreshing ? 'Refreshing…' : 'Refresh packs' }}</button>
|
||||
</div>
|
||||
</section>
|
||||
`,
|
||||
styles: [
|
||||
`
|
||||
:host { display: block; background: var(--color-surface-primary); color: var(--color-text-primary); min-height: 100vh; }
|
||||
:host { display: block; background: var(--color-surface-primary); color: var(--color-text-primary); }
|
||||
.workspace { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
|
||||
.workspace__header { margin-bottom: 1rem; }
|
||||
.workspace__eyebrow { margin: 0; color: var(--color-status-info); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }
|
||||
.workspace__lede { margin: 0.2rem 0 0; color: var(--color-text-muted); }
|
||||
.workspace__actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-bottom: 1rem; }
|
||||
.workspace__actions button { background: var(--color-btn-secondary-bg); border: 1px solid var(--color-btn-secondary-border); color: var(--color-btn-secondary-text); border-radius: var(--radius-lg); padding: 0.35rem 0.7rem; cursor: pointer; font-size: 0.8125rem; }
|
||||
.workspace__actions button:hover:not(:disabled) { background: var(--color-btn-secondary-hover-bg); border-color: var(--color-btn-secondary-hover-border); }
|
||||
.workspace__actions button:disabled { opacity: 0.5; cursor: not-allowed; }
|
||||
.workspace__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
|
||||
.pack-card { background: var(--color-surface-elevated); border: 1px solid var(--color-border-primary); border-radius: var(--radius-xl); padding: 1rem; box-shadow: var(--shadow-md); display: grid; gap: 0.6rem; }
|
||||
.pack-card__head { display: flex; justify-content: space-between; gap: 0.75rem; align-items: flex-start; }
|
||||
@@ -153,8 +147,6 @@ import { PolicyPackStore } from '../services/policy-pack.store';
|
||||
dt { color: var(--color-text-muted); font-size: 0.85rem; margin: 0; }
|
||||
dd { margin: 0; color: var(--color-text-primary); }
|
||||
.workspace__banner { background: var(--color-status-warning-bg); border: 1px solid var(--color-status-warning-border); color: var(--color-status-warning-text); padding: 0.75rem 1rem; border-radius: var(--radius-xl); margin: 0.5rem 0 1rem; }
|
||||
.workspace__footer { margin-top: 0.8rem; }
|
||||
.workspace__footer button { background: var(--color-btn-primary-bg); border: 1px solid var(--color-btn-primary-bg); color: var(--color-btn-primary-text); border-radius: var(--radius-lg); padding: 0.45rem 0.8rem; cursor: pointer; }
|
||||
.workspace__empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1.5rem; border: 1px dashed var(--color-border-primary); border-radius: var(--radius-xl); background: var(--color-surface-elevated); }
|
||||
.workspace__empty h3 { margin: 0 0 0.5rem; color: var(--color-text-heading); }
|
||||
.workspace__empty p { margin: 0 0 1rem; color: var(--color-text-muted); max-width: 480px; margin-inline: auto; }
|
||||
|
||||
Reference in New Issue
Block a user