From b01dd1de6e4179f4134b1aa0991c112f5b7e1bbe Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Sun, 10 Sep 2023 16:15:41 +0200 Subject: [PATCH] stuff --- DOCUMENTATION.md | 9 +++++---- client/src/components/infoview/main.tsx | 6 +++++- client/src/components/world_tree.css | 8 +++----- client/src/components/world_tree.tsx | 4 ++-- package.json | 3 +++ webpack.config.js | 2 +- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 4b1e21c..bfba6a8 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -213,7 +213,7 @@ Notation for naturals is `\\N`." The installation instructions are not yet tested on Mac/Windows. Comments very welcome! -## Using Dev Containers +## VSCode Dev Containers 1. **Install Docker and Dev Containers** *(once)*:
See [official instructions](https://code.visualstudio.com/docs/devcontainers/containers#_getting-started). @@ -225,13 +225,14 @@ The installation instructions are not yet tested on Mac/Windows. Comments very w * Open the games folder in VSCode: `cd NNG4 && code .` or "Open Folder" within VSCode * a message appears prompting you to install the "Dev Containers" extension (by Microsoft). -2. **Open Project in Dev Container** **(everytime)**:
+2. **Open Project in Dev Container** *(everytime)*:
Once you have the Dev Containers Extension installed, (re)open the project folder of your game in VSCode. A message appears asking you to "Reopen in Container". - * The first start will take a while, ca. 1-5 minutes. After the first + * The first start will take a while, ca. 2-10 minutes. After the first start this should be very quickly. - * Afterwards, go to your browser and open http://localhost:3000/#/g/local/game. + * Once built, it should open a tab "Simple Browser" inside VSCode displaying + the game. (Alternatively, open http://localhost:3000 in your browser). 3. **Editing Files** *(everytime)*:
After editing some files in VSCode, open VSCode's terminal (View > Terminal) and run `lake build`. diff --git a/client/src/components/infoview/main.tsx b/client/src/components/infoview/main.tsx index 2a6f32d..34b0918 100644 --- a/client/src/components/infoview/main.tsx +++ b/client/src/components/infoview/main.tsx @@ -335,7 +335,11 @@ export function CommandLineInterface(props: { world: string, level: number, data // Scroll to the end of the proof if it is updated. React.useEffect(() => { - proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0) + if (proof?.length > 1) { + proofPanelRef.current?.lastElementChild?.scrollIntoView() //scrollTo(0,0) + } else { + proofPanelRef.current?.scrollTo(0,0) + } }, [proof]) // Scroll to element if selection changes diff --git a/client/src/components/world_tree.css b/client/src/components/world_tree.css index f343eed..7835f56 100644 --- a/client/src/components/world_tree.css +++ b/client/src/components/world_tree.css @@ -51,15 +51,13 @@ svg .disabled { .world-selection-menu { padding: .5em 1em; position: absolute; - right: 0; + right: 1em; top: 1em; /* margin: 1em; */ /* border: 1px solid var(--clr-primary); */ - border-bottom: 1px solid var(--clr-primary); - border-left: 1px solid var(--clr-primary); - border-top: 1px solid var(--clr-primary); + border: 1px solid var(--clr-primary); background-color: #fff; - border-radius: .5em 0 0 .5em; + border-radius: .5em; filter: drop-shadow(4px 4px 5px rgba(0,0,0,0.5)); } diff --git a/client/src/components/world_tree.tsx b/client/src/components/world_tree.tsx index 93043a9..df75b77 100644 --- a/client/src/components/world_tree.tsx +++ b/client/src/components/world_tree.tsx @@ -193,7 +193,7 @@ export function WorldSelectionMenu() { const dispatch = useAppDispatch() function label(x : number) { - return x == 0 ? 'none' : x == 1 ? 'lax' : 'regular' + return x == 0 ? 'none' : x == 1 ? 'relaxed' : 'regular' } return