From a8f80a02b88055cfcb45664ce3a3d24c2b2da98c Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 10 Jul 2022 23:41:20 +1000 Subject: Update project-level and client-side documentation --- src/App.vue | 6 +++--- src/README.md | 41 ++++++++++++++++++----------------- src/components/AncestryBar.vue | 2 +- src/components/HelpModal.vue | 4 ++-- src/components/LoadingModal.vue | 4 +--- src/components/SButton.vue | 3 +-- src/components/SearchModal.vue | 4 ++-- src/components/SettingsModal.vue | 4 +--- src/components/Tile.vue | 3 ++- src/components/TileInfoModal.vue | 3 +-- src/components/TutorialPane.vue | 8 +++---- src/index.css | 46 +++++++++++++++++++++------------------- src/lib.ts | 4 ++-- src/main.ts | 8 +++---- src/tol.ts | 6 +++--- 15 files changed, 72 insertions(+), 74 deletions(-) (limited to 'src') diff --git a/src/App.vue b/src/App.vue index f26e1fb..4285f6a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -101,6 +101,9 @@ import {queryServer, InfoResponse, Action, UiOptions, getDefaultLytOpts, getDefaultUiOpts, OptionType} from './lib'; import {arraySum, randWeightedChoice, timeout} from './util'; +// Constants +const SERVER_WAIT_MSG = 'Loading data'; +const PROCESSING_WAIT_MSG = 'Processing'; // Type representing auto-mode actions type AutoAction = 'move across' | 'move down' | 'move up' | Action; // Function used in auto-mode to reduce action cycles @@ -117,9 +120,6 @@ function getReverseAction(action: AutoAction): AutoAction | null { return null; } } -// Constants -const SERVER_WAIT_MSG = 'Loading data'; -const PROCESSING_WAIT_MSG = 'Processing'; export default defineComponent({ data(){ diff --git a/src/README.md b/src/README.md index 23f05ee..5c88b2e 100644 --- a/src/README.md +++ b/src/README.md @@ -1,21 +1,22 @@ # Files -- main.ts: Included by ../index.html. Creates the main Vue component. -- App.vue: The main Vue component. -- components: - - Tile.vue: Displays a tree-of-life node. - - TileInfoModal.vue: Modal displaying info about a Tile's node. - - SearchModal.vue: Modal providing a search bar. - - SettingsModal: Modal displaying configurable settings. - - HelpModal.vue: Modal displaying help info. - - AncestryBar.vue: Displays ancestors of the outermost Tile. - - TutorialPane.vue: Displays tutorial content. - - LoadingModal.vue: Displays a loading indicator. - - SButton.vue: Simple button component. - - IconButton.vue: Simple button component containing an SVG icon. - - SCollapsible.vue: Simple collapsible-content component. - - icon: Contains components that display SVG icons. -- lib.ts: Contains classes/types and utility functions. -- layout.ts: Contains code for laying out Tiles. -- util.ts: Contains utility functions. -- index.css: Included by main.ts. Provides Tailwind's CSS classes. -- env.d.ts: From Vite's template files. +- **main.ts**: Included by ../index.html. Creates the main Vue component. +- **App.vue**: The main Vue component. +- **components**: + - **Tile.vue**: Displays a tree-of-life node. + - **TileInfoModal.vue**: Modal displaying info about a Tile's node. + - **SearchModal.vue**: Modal providing a search bar. + - **SettingsModal**: Modal displaying configurable settings. + - **HelpModal.vue**: Modal displaying help info. + - **AncestryBar.vue**: Displays ancestors of the outermost Tile. + - **TutorialPane.vue**: Displays tutorial content. + - **LoadingModal.vue**: Displays a loading indicator. + - **SButton.vue**: Simple button component. + - **IconButton.vue**: Simple button component containing an SVG icon. + - **SCollapsible.vue**: Simple collapsible-content component. + - **icon**: Contains components that display SVG icons. +- **tol.ts**: Holds types for tree-of-life data. +- **layout.ts**: Holds code for laying out tiles. +- **lib.ts**: Holds project-wide globals. +- **util.ts**: Holds utility functions. +- **index.css**: Included by main.ts. Provides Tailwind's CSS classes. +- **env.d.ts**: From Vite's template files. diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue index fcf9933..6f2d37c 100644 --- a/src/components/AncestryBar.vue +++ b/src/components/AncestryBar.vue @@ -75,7 +75,7 @@ export default defineComponent({ }, }, watch: { - // Used to scroll to end of bar upon node/screen changes + // For scrolling-to-end upon node/screen changes nodes(){ this.$nextTick(() => this.scrollToEnd()); }, diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 7375584..cc11afb 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -358,14 +358,14 @@