Skip to content

Commit

Permalink
responding to PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfig committed Mar 11, 2024
1 parent 9ee8ea2 commit eac2817
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cargo install cargo-watch

## Local Environment Setup

Now that dependencies are installed, all you need to do is run `node dev` to
Now that dependencies are installed, all you need to do is run `node dev` to
bring up the all services. Invoke `node run --help` for information on how
to use this script, as you can use it to watch individual (or groups of)
services during development. See the [Using node dev](Using-node-dev) section
Expand All @@ -61,7 +61,7 @@ for more more information.

#### Docker Compose

Docker Compose is a utility that's built into Docker Desktop and is a compact
Docker Compose is a utility that's built into Docker Desktop and is a compact
infrastructure-as-code framework. Services (e.g. running Docker containers) are
defined, along with configuration information, in the `docker-compose.yml` file.
Services can talk to each other and can communicate with services in the user's host
Expand Down Expand Up @@ -200,7 +200,7 @@ See the README in each crate for more information.

#### Rust Coverage

In CI, coverage is automatically collected and sent to CodeCov.
In CI, coverage is automatically collected and sent to CodeCov.

For local coverage information, you'll need to install some dependencies first:

Expand All @@ -210,7 +210,7 @@ cargo install grcov
rustup component add llvm-tools-preview
```

To run coverage and generate HTML reports, bring up the docker network
To run coverage and generate HTML reports, bring up the docker network
(`npm run docker:up`) and navigate to the individual crate and enter:

```shell
Expand Down Expand Up @@ -242,7 +242,7 @@ Local load testing is performed by [JMeter](https://jmeter.apache.org/). First,
brew install jmeter
```

Load tests are located in the `/tests/load` directory. Run run jmeter:
Load tests are located in the `/tests/load` directory. Run run jmeter:

```shell
bash jmeter
Expand All @@ -262,4 +262,8 @@ bash jmeter -n -t PATH_TO_JMX_FILE
JAVA_HOME="/opt/homebrew/opt/openjdk" bash /opt/homebrew/Cellar/jmeter/5.6.3/libexec/bin/jmeter -n -t test/load/load-test-quadratic-multiplayer.jmx
```

Output will be located in the terminal.
Output will be located in the terminal.

# Prompting user after version change

The current version numbers are stored in `minVersion.json`. This JSON is ready by both the client and the multiplayer server. When the client has a lower version number then the multiplayer (the version is sent by the multiplayer server with the EnterFileRoom message), then the user is prompted to refresh with slightly different experience based on required vs. recommended changes.
4 changes: 2 additions & 2 deletions quadratic-client/src/ui/QuadraticUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { focusGrid } from '../helpers/focusGrid';
import { isEmbed } from '../helpers/isEmbed';
import CodeEditor from '../ui/menus/CodeEditor';
import TopBar from '../ui/menus/TopBar';
import { VersionControl } from './VersionControl';
import { VersionControlAlert } from './VersionControl';
import { useFileContext } from './components/FileProvider';
import { FileUploadWrapper } from './components/FileUploadWrapper';
import { Following } from './components/Following';
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function QuadraticUI() {
)}
{presentationMode && <PresentationModeHint />}
{!isEmbed && <PermissionOverlay />}
<VersionControl />
<VersionControlAlert />
</div>
);
}
2 changes: 1 addition & 1 deletion quadratic-client/src/ui/VersionControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RocketIcon } from '@radix-ui/react-icons';
import { useEffect, useState } from 'react';
import { FixedBottomAlert } from './components/PermissionOverlay';

export const VersionControl = () => {
export const VersionControlAlert = () => {
const [showDialog, setShowDialog] = useState<false | 'recommended' | 'required'>(false);
useEffect(() => {
const needRefresh = (message: any /* { detail: 'required' | 'recommended' } */) => setShowDialog(message.detail);
Expand Down

0 comments on commit eac2817

Please sign in to comment.