fix: Apply chart/catalogNumber duplicate detection to all components

Extend the duplicate detection logic from PatternCanvas to ProgressMonitor and PatternInfo. Now all components only show the chart field when it differs from catalogNumber, preventing redundant information display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Henrik Bruhn 2025-12-22 11:54:30 +01:00
parent 6e38ba855c
commit 469d9860de
2 changed files with 12 additions and 2 deletions

View file

@ -117,7 +117,13 @@ export function PatternInfo({
.join(" "); .join(" ");
// Secondary metadata: chart and description // Secondary metadata: chart and description
const secondaryMetadata = [color.chart, color.description] // Only show chart if it's different from catalogNumber
const secondaryMetadata = [
color.chart && color.chart !== color.catalogNumber
? color.chart
: null,
color.description,
]
.filter(Boolean) .filter(Boolean)
.join(" "); .join(" ");

View file

@ -281,8 +281,12 @@ export function ProgressMonitor() {
.join(" "); .join(" ");
// Secondary metadata: chart and description // Secondary metadata: chart and description
// Only show chart if it's different from catalogNumber
const secondaryMetadata = [ const secondaryMetadata = [
block.threadChart, block.threadChart &&
block.threadChart !== block.threadCatalogNumber
? block.threadChart
: null,
block.threadDescription, block.threadDescription,
] ]
.filter(Boolean) .filter(Boolean)