[compiler:playground] JS tab is expanded by default
When using the playground you typically want to see what it outputs, so let's make the JS tab expanded by default. ghstack-source-id: 721bc4c381c50db008058b31e1f976e92eab8548 Pull Request resolved: https://github.com/facebook/react/pull/29203
Lauren Tan committed
May 21, 2024 at 17:51 UTC
b759b71eaded884d61dc2b5e97e73f219ef6a4f5
2 files changed
+1
-2
compiler/apps/playground/__tests__/e2e/page.spec.ts
-1
@@ -28,7 +28,6 @@ test("editor should compile successfully", async ({ page }) => {
28
});
29
30
// User input from hash compiles
31
- await page.getByRole("button", { name: /JS/ }).click();
31
await page.screenshot({
32
fullPage: true,
33
path: "test-results/01-show-js-before.png",
compiler/apps/playground/components/Editor/Output.tsx
+1
-1
@@ -177,7 +177,7 @@ function getSourceMapUrl(code: string, map: string): string | null {
177
}
178
179
function Output({ store, compilerOutput }: Props) {
180
- const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set());
180
+ const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set(['JS']));
181
const [tabs, setTabs] = useState<Map<string, React.ReactNode>>(
182
() => new Map(),
183
);