Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Matjaž Horvat b97cbb7fc2
Add light theme CSS file (#2997)
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.
2023-10-26 18:09:28 +02:00
ayanaar ec89c38bc4
Replace hard-coded color values with CSS variables stored in a theme file (#2957)
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.
2023-09-21 17:58:47 +02:00
Eemeli Aro 413c8c50fb
Update JS dependencies (#2754)
* chore: Refresh lockfile

* chore: Update to rollup@3

* style: Apply updated Prettier styling
2023-02-15 17:21:20 +02:00
Eemeli Aro fdf94d3e1b
Update to jest 29 & refresh npm lockfile (#2673) 2022-12-07 15:51:24 +02:00
Eemeli Aro c86e0ed7dd
Add `curly: error` to ESLint configs (#2452)
* chore: Add `curly: error` to ESLint configs

* style: Apply updated linter rules
2022-04-25 17:16:01 +02:00
Eemeli Aro 9faea69c20
Set `tabWidth: 2` in Prettier config (#2438)
* 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
2022-03-03 09:46:35 +01:00
Eemeli Aro 9fc9430cc7
Refactor the frontend build (#2437)
* 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/
2022-03-02 16:10:42 +01:00
Eemeli Aro 8d2714d5db
Refactor tag-admin to use functional components, stop testing its internals, replace webpack with rollup (#2432)
* 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
2022-02-21 19:28:25 +01:00
Eemeli Aro ff5fcf81c9
Update JavaScript dependencies (#2431)
* chore: Refresh root lockfile

* chore: Update to prettier@2.5 & eslint@8

* style: Apply updated Prettier styles

* chore(tag-admin): Update to jest@27

* chore(frontend): Refresh lockfile

* chore(tag-admin): Mark react, react-dom & react-table as non-dev dependencies
2022-02-16 16:05:13 +01:00
Eemeli Aro d26c91487e
Handle the `tags/admin/` client as an npm workspace at `/tag-admin/` (#2430)
* 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
2022-02-16 16:47:32 +02:00