Conversation
|
Fixes #464 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@AdrianDAlessandro I moved the node documentation to a separate README.md inside the node directory. This seems to have broken the mkdocs build. I tried looking through the code and docs but I can't see how to add this file. |
| ```bash | ||
| npm run styles:expanded | ||
| ``` | ||
| See [node/README.md](https://github.com/direct-framework/direct-webapp/blob/main/node/README.md) for details on working with the NPM-based frontend asset pipeline. |
There was a problem hiding this comment.
🚫 [linkspector] reported by reviewdog 🐶
Cannot reach https://github.com/direct-framework/direct-webapp/blob/main/node/README.md Status: 404
f62472c to
053c4be
Compare
|
@AdrianDAlessandro FYI I've rebased this onto the main branch. |
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
I'll be happy to review and merge this if you can rebase it onto main. Would be good to merge this before looking at moving the node configs into a sub-directory
Co-authored-by: Adrian D'Alessandro <a.dalessandro@imperial.ac.uk>
053c4be to
f7a61a7
Compare
|
@AdrianDAlessandro this is rebased back onto main and should be ready to merge |
AdrianDAlessandro
left a comment
There was a problem hiding this comment.
Overall, this looks really good. I've run the tests and see that they pass. I haven't individually reviewed the tests because I am not likely to understand them. My only concern is that they might be too prescriptive. So if we make changes to the radial plots, it might cause many failures and make it difficult to update them all.
I've made some other comments, but they might be out of my naivety of best practice with node/npm/vitest, so please take it all with a grain of salt.
| ```bash | ||
| npm run styles:expanded | ||
| ``` | ||
|
|
There was a problem hiding this comment.
I think these lines are not necessary
| ```bash | |
| npm run styles:expanded | |
| ``` |
There was a problem hiding this comment.
This was copied from master README.md so happy to remove if no longer needed.
| "test": "vitest", | ||
| "test-ui": "vitest --ui", | ||
| "test-ci": "vitest --run" |
There was a problem hiding this comment.
Having the default test version be the interactive one is slightly confusing. I think maybe we should have the --run option be the default one and then have something like test-interactive be the one that persists and waits for file changes.
Also, the test-ui one failed for me because '@vitest/ui' is not installed. Not sure if we want to include it by default or not.
There was a problem hiding this comment.
I think perhaps this is just a node default. I'm happy to change but I normally use the watch mode by default and have --run just for the CI.
There was a problem hiding this comment.
Makes sense. Fine with me
| To build all styles, scripts, and vendor files, run: | ||
|
|
||
| ```bash | ||
| npm run build |
There was a problem hiding this comment.
I got some linting failures and a few file changes when I ran this.
Linting error:
$ npm run build
> direct-webapp@0.1.0 build
> npm-run-all --silent -p styles:expanded styles:minified scripts:expanded scripts:minified vendor --silent
Vendor Info Bundling vendor scripts...
StylesStyles InfoInfo Linting SCSS...Linting SCSS...
Scripts Info Linting JavaScript...
Scripts Info Linting JavaScript...
Scripts Error!
Scripts Error! /Users/adalessa/Projects/DIRECT/direct-webapp/node/src/js/dataviz/radial-plot-dataprocessing.js
Scripts Error! 92:11 error Delete `··` prettier/prettier
Scripts Error! 93:1 error Delete `··` prettier/prettier
Scripts Error!
Scripts Error! ✖ 2 problems (2 errors, 0 warnings)
Scripts Error! 2 errors and 0 warnings potentially fixable with the `--fix` option.
Scripts Error!
Scripts ScriptsError! Linting errors found
Error!
Scripts Error! /Users/adalessa/Projects/DIRECT/direct-webapp/node/src/js/dataviz/radial-plot-dataprocessing.js
Scripts Error! 92:11 error Delete `··` prettier/prettier
Scripts Error! 93:1 error Delete `··` prettier/prettier
Scripts Error!
Scripts Error! ✖ 2 problems (2 errors, 0 warnings)
Scripts Error! 2 errors and 0 warnings potentially fixable with the `--fix` option.
Scripts Error!
Scripts Error! Linting errors found
Vendor Success Bundled vendor scripts successfully
Vendor Info Bundling vendor styles...
Vendor Success Bundled vendor styles successfully
Styles Success Lint SCSS
Styles Info Building compressed CSS...
Styles Success Lint SCSS
Styles Info Building expanded CSS...
Styles Success Compile SCSS to CSS (compressed):
Styles Success Compile SCSS to CSS (expanded):
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
Styles Success Added vendor prefixes (Autoprefixer)
Styles Success Added vendor prefixes (Autoprefixer)
Many of the changes were of this nature:
[data-bs-theme=dark] body.bg-secondary {
- background-color: rgb(25.11, 28.02, 31.9) !important;
+ background-color: #191c20 !important;
}There was a problem hiding this comment.
I think there is an issue with how it was set up first so I'll compare against a fresh install and see what is going on.
Thanks @AdrianDAlessandro I'll take a look. |
Description
Some tidying up of the frontend node code related to #529
Fixes #464
Type of change
Key checklist
python -m pytest)mkdocs serve)pre-commit run --all-files)Further checks