refactor(frontend): the near-duplicate report rules shared via dup-report.css — KnowledgeView and SnippetListView carried identical scoped copies (#2903, milestone 299 step 5, part 2)
CI & Build / Python lint (push) Successful in 5s
CI & Build / Plugin hooks (push) Successful in 11s
CI & Build / integration (push) Successful in 27s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 1m9s
CI & Build / Build & push image (push) Successful in 41s
CI & Build / Python lint (push) Successful in 5s
CI & Build / Plugin hooks (push) Successful in 11s
CI & Build / integration (push) Successful in 27s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 1m9s
CI & Build / Build & push image (push) Successful in 41s
KnowledgeView's own comment asked for this promotion once a second view grew the panel. The sheet carries .dup-panel / .dup-empty,.dup-head / .dup-group / .dup-members / .dup-member(+:hover) / .dup-score; each view keeps only its extras (.dup-claimed, .dup-action). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
/* The near-duplicate report, shared by KnowledgeView (notes/tasks) and
|
||||||
|
SnippetListView (snippets) so the two reports read as one feature. Load
|
||||||
|
with <style src="@/assets/dup-report.css" /> beside the view's scoped
|
||||||
|
block; the view keeps only its own extras (.dup-claimed, .dup-action).
|
||||||
|
Promoted from two identical scoped copies in #2903 (milestone 299). */
|
||||||
|
.dup-panel {
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
padding: 0.85rem 1rem;
|
||||||
|
border: 1px solid var(--fs-border-color);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: var(--fs-surface-hover);
|
||||||
|
}
|
||||||
|
.dup-empty,
|
||||||
|
.dup-head {
|
||||||
|
margin: 0 0 0.5rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: var(--fs-text-tertiary);
|
||||||
|
}
|
||||||
|
.dup-empty { margin-bottom: 0; }
|
||||||
|
.dup-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
border-top: 1px solid var(--fs-border-color);
|
||||||
|
}
|
||||||
|
.dup-members {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.4rem;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex: 1 1 20rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.dup-member {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
padding: 0.1rem 0.45rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
||||||
|
color: var(--fs-text-primary);
|
||||||
|
text-decoration: none;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
.dup-member:hover { background: var(--fs-surface-hover); }
|
||||||
|
.dup-score {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: var(--fs-text-tertiary);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
@@ -574,6 +574,7 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style src="@/assets/dup-report.css" />
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* ── Root layout ─────────────────────────────────────────── */
|
/* ── Root layout ─────────────────────────────────────────── */
|
||||||
.knowledge-root {
|
.knowledge-root {
|
||||||
@@ -1042,56 +1043,6 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ── Near-duplicate report ──────────────────────────────────────────────────
|
|
||||||
Mirrors SnippetListView's panel so the two reports read as one feature.
|
|
||||||
Scoped styles can't be shared across SFCs; if a third view ever grows this
|
|
||||||
panel, promote the family to components.css and record it (#2464's rule:
|
|
||||||
two-or-more is when a recipe earns the shared sheet). */
|
|
||||||
.dup-panel {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
padding: 0.85rem 1rem;
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--fs-surface-hover);
|
|
||||||
}
|
|
||||||
.dup-empty,
|
|
||||||
.dup-head {
|
|
||||||
margin: 0 0 0.5rem;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
.dup-empty { margin-bottom: 0; }
|
|
||||||
.dup-group {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.75rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0.5rem 0;
|
|
||||||
border-top: 1px solid var(--fs-border-color);
|
|
||||||
}
|
|
||||||
.dup-members {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.4rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
flex: 1 1 20rem;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
.dup-member {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
padding: 0.1rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
text-decoration: none;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
}
|
|
||||||
.dup-member:hover { background: var(--fs-surface-hover); }
|
|
||||||
.dup-score {
|
|
||||||
font-size: 0.75rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
/* A set someone already ruled on — quiet, not celebratory: it means "skip". */
|
/* A set someone already ruled on — quiet, not celebratory: it means "skip". */
|
||||||
.dup-claimed {
|
.dup-claimed {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
|
|||||||
@@ -517,6 +517,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style src="@/assets/dup-report.css" />
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.page-header {
|
.page-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -757,59 +758,6 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
color: var(--fs-text-tertiary);
|
color: var(--fs-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Near-duplicate report */
|
|
||||||
.dup-panel {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
padding: 0.85rem 1rem;
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--fs-surface-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-empty,
|
|
||||||
.dup-head {
|
|
||||||
margin: 0 0 0.5rem;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-empty {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-group {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.75rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0.5rem 0;
|
|
||||||
border-top: 1px solid var(--fs-border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-members {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.4rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
flex: 1 1 20rem;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-member {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
padding: 0.1rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
|
||||||
/* Long snippet names must not push the row into a horizontal scroll. */
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-score {
|
|
||||||
font-size: 0.75rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dup-action {
|
.dup-action {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user