mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
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).
This commit is contained in:
@@ -106,13 +106,13 @@ describe("manual editing availability", () => {
|
||||
expect(resolveStudioBooleanEnvFlag({ UNKNOWN: "maybe" }, ["UNKNOWN"], false)).toBe(false);
|
||||
});
|
||||
|
||||
it("defaults the flat inspector flag to false and honors an explicit override", async () => {
|
||||
const off = await loadAvailabilityWithEnv({});
|
||||
expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false);
|
||||
|
||||
const on = await loadAvailabilityWithEnv({
|
||||
VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "true",
|
||||
});
|
||||
it("defaults the flat inspector flag to true and honors an explicit override", async () => {
|
||||
const on = await loadAvailabilityWithEnv({});
|
||||
expect(on.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(true);
|
||||
|
||||
const off = await loadAvailabilityWithEnv({
|
||||
VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "false",
|
||||
});
|
||||
expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -98,12 +98,14 @@ export const STUDIO_SDK_RESOLVER_SHADOW_ENABLED = resolveStudioBooleanEnvFlag(
|
||||
);
|
||||
|
||||
// Studio inspector redesign ("Ledger, flat" — design_handoff_studio_inspector):
|
||||
// flat identity header/footer/groups behind a flag for incremental review.
|
||||
// Default false; enable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=true.
|
||||
// flat identity header/footer/groups. Default true as of v0.7.59+ bug-fix pass
|
||||
// (right-aligned values, Stroke select-only, promote-badge overlap, Layout/
|
||||
// Style section gating); disable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=false
|
||||
// to fall back to the legacy panel.
|
||||
export const STUDIO_FLAT_INSPECTOR_ENABLED = resolveStudioBooleanEnvFlag(
|
||||
env,
|
||||
["VITE_STUDIO_ENABLE_FLAT_INSPECTOR", "VITE_STUDIO_FLAT_INSPECTOR_ENABLED"],
|
||||
false,
|
||||
true,
|
||||
);
|
||||
|
||||
export const STUDIO_MANUAL_EDITING_DISABLED_TITLE = "Manual editing is temporarily disabled";
|
||||
|
||||
@@ -455,6 +455,13 @@ function representativeElement() {
|
||||
|
||||
describe("classic PropertyPanel input coverage", () => {
|
||||
it("emits only named, known-section events across body inputs and header/footer chrome", async () => {
|
||||
vi.resetModules();
|
||||
vi.doMock("./manualEditingAvailability", async () => {
|
||||
const actual = await vi.importActual<typeof import("./manualEditingAvailability")>(
|
||||
"./manualEditingAvailability",
|
||||
);
|
||||
return { ...actual, STUDIO_FLAT_INSPECTOR_ENABLED: false };
|
||||
});
|
||||
const { PropertyPanel } = await import("./PropertyPanel");
|
||||
const host = render(
|
||||
<PropertyPanel
|
||||
|
||||
Reference in New Issue
Block a user