Skip to content

Commit

Permalink
[compiler:playground] JS tab is expanded by default
Browse files Browse the repository at this point in the history
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: facebook#29203
  • Loading branch information
poteto committed May 21, 2024
1 parent 9b3f909 commit b759b71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion compiler/apps/playground/__tests__/e2e/page.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ test("editor should compile successfully", async ({ page }) => {
});

// User input from hash compiles
await page.getByRole("button", { name: /JS/ }).click();
await page.screenshot({
fullPage: true,
path: "test-results/01-show-js-before.png",
Expand Down
2 changes: 1 addition & 1 deletion compiler/apps/playground/components/Editor/Output.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function getSourceMapUrl(code: string, map: string): string | null {
}

function Output({ store, compilerOutput }: Props) {
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set());
const [tabsOpen, setTabsOpen] = useState<Set<string>>(() => new Set(['JS']));
const [tabs, setTabs] = useState<Map<string, React.ReactNode>>(
() => new Map(),
);
Expand Down

0 comments on commit b759b71

Please sign in to comment.