Skip to content

Commit b13bd15

Browse files
authored
Merge pull request #258 from JWWade/copilot/update-legend-color-spectrum
Legend: vertically-oriented color spectrum with micro-polygon glyphs
2 parents 0feff28 + 150ba4b commit b13bd15

2 files changed

Lines changed: 311 additions & 134 deletions

File tree

client/src/features/legend/components/VisualLegend.module.css

Lines changed: 90 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -28,59 +28,127 @@
2828
color: var(--color-text-secondary);
2929
}
3030

31-
/* ── Color list (quality swatches in a wrapping grid) ─────────────────────── */
32-
.colorList {
31+
/* ── Top two-column layout (Quality Spectrum + Opacity Gradient) ──────────── */
32+
.topRow {
33+
display: flex;
34+
gap: 12px;
35+
margin-bottom: 14px;
36+
align-items: flex-start;
37+
}
38+
39+
/* ── Quality Spectrum Column ──────────────────────────────────────────────── */
40+
.spectrumSection {
41+
flex: 1 1 auto;
42+
min-width: 0;
43+
}
44+
45+
.spectrumList {
3346
list-style: none;
3447
margin: 0;
3548
padding: 0;
3649
display: flex;
37-
flex-wrap: wrap;
38-
gap: 6px 10px;
50+
flex-direction: column;
51+
gap: 3px;
3952
}
4053

41-
.colorItem {
54+
.spectrumItem {
4255
display: flex;
4356
align-items: center;
44-
gap: 5px;
57+
gap: 8px;
4558
}
4659

47-
.colorSwatch {
48-
display: inline-block;
49-
width: 12px;
50-
height: 12px;
51-
border-radius: 50%;
60+
/** Colored band that contains the micro-polygon glyph. */
61+
.spectrumBand {
62+
display: flex;
63+
align-items: center;
64+
justify-content: center;
65+
width: 36px;
66+
height: 22px;
67+
border-radius: 4px;
5268
flex-shrink: 0;
5369
}
5470

55-
.colorLabel {
71+
.spectrumLabel {
5672
font-size: 11.5px;
5773
color: var(--color-text-primary);
5874
white-space: nowrap;
5975
}
6076

61-
/* ── Shape list ───────────────────────────────────────────────────────────── */
62-
.shapeList {
63-
list-style: none;
64-
margin: 0;
65-
padding: 0;
77+
/* ── Opacity Gradient Column ──────────────────────────────────────────────── */
78+
.opacitySection {
79+
flex: 0 0 auto;
80+
}
81+
82+
.opacityStrip {
83+
display: flex;
84+
gap: 6px;
85+
align-items: stretch;
86+
}
87+
88+
/** Narrow vertical bar that fades from opaque to translucent. */
89+
.opacityBar {
90+
width: 8px;
91+
border-radius: 4px;
92+
flex-shrink: 0;
93+
/* height is driven by sibling content via align-items: stretch */
94+
min-height: 60px;
95+
}
96+
97+
.opacityNodes {
6698
display: flex;
6799
flex-direction: column;
100+
justify-content: space-between;
68101
gap: 6px;
69102
}
70103

71-
.shapeItem {
104+
.opacityNodeRow {
72105
display: flex;
73106
align-items: center;
74-
gap: 8px;
107+
gap: 4px;
108+
}
109+
110+
.opacityNodeLabel {
111+
font-size: 10px;
112+
color: var(--color-text-secondary);
113+
white-space: nowrap;
114+
line-height: 1.3;
115+
}
116+
117+
/* ── Cardinality Stack ────────────────────────────────────────────────────── */
118+
.cardinalityRow {
119+
display: flex;
120+
gap: 16px;
75121
}
76122

77-
.shapeLabel {
123+
.cardinalityItem {
124+
display: flex;
125+
align-items: center;
126+
gap: 6px;
127+
}
128+
129+
.cardinalityLabel {
130+
font-size: 11.5px;
131+
color: var(--color-text-primary);
132+
}
133+
134+
/* ── Visual Keys (centroid + interval icons) ──────────────────────────────── */
135+
.iconRow {
136+
display: flex;
137+
gap: 20px;
138+
}
139+
140+
.iconItem {
141+
display: flex;
142+
align-items: center;
143+
gap: 6px;
144+
}
145+
146+
.iconLabel {
78147
font-size: 11.5px;
79148
color: var(--color-text-primary);
80-
line-height: 1.4;
81149
}
82150

83-
/* ── Intensity list ───────────────────────────────────────────────────────── */
151+
/* ── Color Intensity list ─────────────────────────────────────────────────── */
84152
.intensityList {
85153
list-style: none;
86154
margin: 0;
@@ -129,24 +197,3 @@
129197
font-size: 11.5px;
130198
color: var(--color-text-primary);
131199
}
132-
133-
/* ── Opacity list ─────────────────────────────────────────────────────────── */
134-
.opacityList {
135-
list-style: none;
136-
margin: 0;
137-
padding: 0;
138-
display: flex;
139-
flex-direction: column;
140-
gap: 6px;
141-
}
142-
143-
.opacityItem {
144-
display: flex;
145-
align-items: center;
146-
gap: 8px;
147-
}
148-
149-
.opacityLabel {
150-
font-size: 11.5px;
151-
color: var(--color-text-primary);
152-
}

0 commit comments

Comments
 (0)