Skip to content

Commit a4167ed

Browse files
committed
feat(studio): default the flat inspector on
Flip STUDIO_FLAT_INSPECTOR_ENABLED's default from false to true — the bug-fix pass on the flat inspector is complete (right-aligned values, Stroke width/style split, promote-badge overlap, Layout/Style section gating for non-visual elements like audio). VITE_STUDIO_FLAT_INSPECTOR_ENABLED=false still opts back into the legacy panel. Updates the two tests that asserted the old false default: the flag's own default test, and the "classic PropertyPanel input coverage" suite, which relied on that default to reach the legacy panel and now mocks it explicitly (mirroring the adjacent "flat" suite's existing pattern).
1 parent 67696cd commit a4167ed

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

‎packages/studio/src/components/editor/manualEditingAvailability.test.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ describe("manual editing availability", () => {
106106
expect(resolveStudioBooleanEnvFlag({ UNKNOWN: "maybe" }, ["UNKNOWN"], false)).toBe(false);
107107
});
108108

109-
it("defaults the flat inspector flag to false and honors an explicit override", async () => {
110-
const off = await loadAvailabilityWithEnv({});
111-
expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false);
109+
it("defaults the flat inspector flag to true and honors an explicit override", async () => {
110+
const on = await loadAvailabilityWithEnv({});
111+
expect(on.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(true);
112112

113-
const on = await loadAvailabilityWithEnv({
114-
VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "true",
113+
const off = await loadAvailabilityWithEnv({
114+
VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "false",
115115
});
116-
expect(on.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(true);
116+
expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false);
117117
});
118118
});

‎packages/studio/src/components/editor/manualEditingAvailability.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,14 @@ export const STUDIO_SDK_RESOLVER_SHADOW_ENABLED = resolveStudioBooleanEnvFlag(
9898
);
9999

100100
// Studio inspector redesign ("Ledger, flat" — design_handoff_studio_inspector):
101-
// flat identity header/footer/groups behind a flag for incremental review.
102-
// Default false; enable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=true.
101+
// flat identity header/footer/groups. Default true as of v0.7.59+ bug-fix pass
102+
// (right-aligned values, Stroke select-only, promote-badge overlap, Layout/
103+
// Style section gating); disable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=false
104+
// to fall back to the legacy panel.
103105
export const STUDIO_FLAT_INSPECTOR_ENABLED = resolveStudioBooleanEnvFlag(
104106
env,
105107
["VITE_STUDIO_ENABLE_FLAT_INSPECTOR", "VITE_STUDIO_FLAT_INSPECTOR_ENABLED"],
106-
false,
108+
true,
107109
);
108110

109111
export const STUDIO_MANUAL_EDITING_DISABLED_TITLE = "Manual editing is temporarily disabled";

‎packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,13 @@ function representativeElement() {
455455

456456
describe("classic PropertyPanel input coverage", () => {
457457
it("emits only named, known-section events across body inputs and header/footer chrome", async () => {
458+
vi.resetModules();
459+
vi.doMock("./manualEditingAvailability", async () => {
460+
const actual = await vi.importActual<typeof import("./manualEditingAvailability")>(
461+
"./manualEditingAvailability",
462+
);
463+
return { ...actual, STUDIO_FLAT_INSPECTOR_ENABLED: false };
464+
});
458465
const { PropertyPanel } = await import("./PropertyPanel");
459466
const host = render(
460467
<PropertyPanel

0 commit comments

Comments
 (0)