TLDR: Good riddance!
1. First and foremost, this patch replaces the unusual widget for selecting tag resources in Pontoon Admin with the multiple item selector that is more commonly used in Pontoon.
2. Secondly, the last bits of the old Tags Django code are now finally removed. It should now be much simpler to fix issues like #2122 and #2131.
3. Finally, the odd tag-admin frontend, which was only powering the old widget for selecting tag resources in Pontoon Admin, is now removed.
In total, the same (actually, I think it's much better) functionality uses some 95% smaller footprint.
Also included are a few smaller Pontoon Admin improvements:
- Unify dropdown style with the rest of the UI
- Use native date selector widget for target date
- Fix large margin in the external resources form
- Make multi item selector widget more semantic, which fixes the second part of #3368.
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
* 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