Also included:
* Consistency changes on the dark theme
* De-hardcode Progress Chart colors in Translate view
* De-hardcode Time Chart colors
* Fix profile image anchor size (image-only rather than the whole block)
* Darker inactive toggle buttons
Note: after deployment, a small change is required to the homepage contents stored in the database, because a Mozilla logo in the footer has been moved from HTML to CSS. I've already done it on stage to where this patch is currently deployed.
This PR addresses two key steps in the process of implementing theme support for Pontoon:
1. CSS Variable Introduction (Issue #2933): All hard-coded color values in Pontoon have been replaced with CSS variables.
2. Consolidation of CSS Variables (Issue #2934): All the extracted CSS variables have been consolidated and stored in a dedicated dark-theme.css file.
* chore: Update Prettier config, setting tabWidth:2
* style: Apply updated Prettier styles
If you need to rebase work past this style change, do as follows:
0. Consider this to be commit `commitA`, replacing that with its id in the following.
1. To make sure mistakes aren't fatal, assign a second branch to your current work.
2. Rebase your branch on the commit immediately before this one, commitA~
3. Run the following command at the root of the repo:
git rebase --strategy-option=theirs \
--exec 'npx prettier --write . && git add -u && git commit --amend --no-edit' \
commitA
That will take a short while esp. if you have multiple commits,
as it runs Prettier on everything for every commit.
If you've deleted files, the rebase may drop down to interactive mode
and have you `git rm` as appropriate, then `git rebase --continue`.
You should end up with just your changes in your branch,
prettily formatted. To validate that,
apply the same Prettier config change to your original branch,
reformat the files with `npm run prettier`,
and then compare the results with the rebased branch.
* chore: Clean up lint configs
* feat!(frontend): Drop react-scripts
* chore(frontend): Add missing dependency on escape-html
* refactor(frontend): Use ~ to prefix paths from src/ root
* chore(frontend): Add & configure jest & ts-jest
* chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails
* chore(frontend): Add ESLint as explicit dev dependency; satisfy linter
* chore(frontend): Clean up dependencies, using caret ^ range for all
* chore(frontend): Switch from yarn to npm & configure as a workspace
Prettier & ESLint dependencies are now defined in the root package.json
Changing package management means that many path & minor updates are
simultaneously applied via the caret ^ ranges.
The local/pontoon-frontend Docker image now uses node:16 as a base
and /app/frontend rather than /frontend for its contents & workdir,
in order to accommodate the changed topography.
* chore: Collect devDependencies in root package.json
* chore(tag-admin): Move Babel config to repo root
* feat(frontend): Adjust public/ for being served as Django static files
* chore(frontend): Add build with Rollup
* feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend
* chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile
* chore: Add build:prod targets for frontend & tag-admin
frontend image droapped from Dockerfile as unused
styled-components updated to v5 to avoid a broken import in v4.
* chore: Add watch targets for workspaces & root, using concurrently
* chore: Code review & CI-identified fixes
* chore: Refresh lockfiles, dropping frontend/yaml.lock
* chore: Add /bin/watch.sh to watch all builds; refactor `make run`
* ci: Fix frontend TS test CLI args due to yarn -> npm change
* chore: Use `npm start` rather than `npm run watch`
* chore(pontoon): Mark django-pipeline JS dependencies as devDependencies
* refactor: Rename frontend/ as translate/
* refactor(tag-admin): Use functional components, stop testing internals
* style(tag-admin): Satisfy Prettier
* chore(tag-admin): Add & configure build with Rollup
* chore: Drop webpack dependencies as unused
terser is included in the root package.json to ensure its availability
for pipeline during the Django build via TERSER_BINARY.
* chore(tag-admin): Add npm install & build targets to Makefile
Also sets engine-strict = true in .npmrc, so attempts to use
npm cli versions which do not support workspaces will fail.
* chore(tag-admin): Update from rollup-plugin-replace to @rollup/plugin-replace
* docs: Update prerequisites
* Move tag-admin sources & tests to /tag-admin/src/
Import paths are modified to use relative, fully qualified file names.
* Configure tag-admin as an npm workspace
* Fix build & CI issues
Consistently call 'npm ci' and 'npm run build' where appropriate
* Apply lint & style rules to tag-admin/webpack.config.js
* Fix permissions for /tag-admin/ in Dockerfile
* ci: Rename "non-frontend-js" action as "tag-admin"
* docs(tag-admin): Add README