mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Theme Builder: accordion panels across the full config surface, vertical-tab nav, reflective gallery
This commit is contained in:
@@ -155,4 +155,34 @@ describe('THEME_PREVIEW_SPECS', () => {
|
||||
);
|
||||
expect(colors.some((c) => c?.scale?.domainMid !== undefined)).toBe(true);
|
||||
});
|
||||
|
||||
it('uses bare marks so config controls are not shadowed in the preview', () => {
|
||||
// A visual mark property hard-coded in a card overrides the same key in the
|
||||
// injected config, making the matching Marks control a no-op in the gallery.
|
||||
// Mark styling belongs in the config (a theme), never inline here.
|
||||
const SHADOWING = [
|
||||
'size',
|
||||
'filled',
|
||||
'point',
|
||||
'innerRadius',
|
||||
'outerRadius',
|
||||
'cornerRadius',
|
||||
'cornerRadiusEnd',
|
||||
'opacity',
|
||||
'interpolate',
|
||||
'shape',
|
||||
'strokeWidth',
|
||||
'padAngle',
|
||||
'discreteBandSize',
|
||||
'continuousBandSize',
|
||||
];
|
||||
for (const card of THEME_PREVIEW_SPECS) {
|
||||
const mark: unknown = card.spec.mark;
|
||||
if (mark && typeof mark === 'object') {
|
||||
for (const key of SHADOWING) {
|
||||
expect(mark, `${card.id} hard-codes mark.${key}`).not.toHaveProperty(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user