Commit Graph

24 Commits

Author SHA1 Message Date
Brian Smith 742704416d
test: fix silent failures by moving some scripts to makefile (#3833) 2025-10-01 16:38:52 -04:00
Adam Stankiewicz be634dc31a feat: --output-references CLI arg, registers filters, updates CSS vars format (#3203)
* feat: --output-references CLI arg for build-tokens, registers filters, and updates CSS vars format

* Exposes `--output-references` CLI argument for `build-tokens` command. Defaults to `true`. Ensures brand package output with the CLI includes references in build output out-of-the-box.

* Registers filter(s) `isThemeVariant.{'light'}`, handling future theme variants when implemented (e.g., `isThemeVariant.dark`).
* Migrates `createCustomCSSVariables` to use `formattedVariables` to rely on out-of-the-box CSS variable formatting. The formatter still supports token-specific overrides of `outputReferences`. If a token has modifications via `modify`, the modified base reference is not included in the output.
* Updates custom fileHeader implementation, including a relative path to design tokens documentation.
* Fixes bug with line-height tokens, switching their `$type` from `dimension` to `number` to resolve typography style regressions.
* Updates typography tokens related to font size, font weight, and line-height for more consistent naming structure when taking into account mobile.
* Updates `@mobile-type` SCSS mixin to support level-specific customization of mobile typography styles for display 1-4.
* Renames `"description"` field in tokens to `"$description""` per the DTCG format.

* Ensures the "Typography" foundations page properly previews the correct font size for regular "Body" text and includes the missing "HEADING LABEL" example.
* Updates to "Colors" page in docs site:
  * Displays token name instead of CSS variable in the color swatch previews (see screenshot below).
  * Include `accent-a` and `accent-b` alongside other color names, rather than manually rendering `Swatch` for the accents.
  * Modifies the grid styles for color swatch preview to be more responsive.
* Resolves `NaNpx` bug in `MeasuredItem` component on docs site, while computing the measurements to display for an element (e.g., font size). Instead, it renders an empty block while measurements are resolved.
* Updates `CodeBlock` styles on docs site to add its border and background color only to the `LivePreview`, not the entire `CodeBlock` example.
* Reduces whitespace on docs site homepage.
* Simplifies columns on docs site header, ensuring `SiteTitle` is horizontally aligned in the center.
2024-11-26 12:15:31 +02:00
PKulkoRaccoonGang 01c702f73c Merge remote-tracking branch 'origin/master' into Peter_Kulko/alpha-branch-updating 2024-05-07 19:38:07 +03:00
Braden MacDonald 0983219800
feat: working typings for Paragon, better types for <Icon> component (#3016)
* feat: better types for <Icon> component

* fix: TypeScript rootDir now that it's checking '../src' files too

* chore: fix eslint 'import/order' & 'import/no-unresolved' issues in www

* fix: build wasn't including types properly

* fix: <Icon/> types still weren't correct

* fix: explicitly define other exports as having 'any' type

* fix: changing www/tsconfig.json is no longer needed

* fix: warning seen when gatsby parses index.d.ts during 'npm run start'
2024-03-25 11:57:53 -04:00
monteri 75580fdca6
feat: move design tokens CLI commands to paragon CLI (#2609)
* feat: move cli design tokens to paragon cli

* feat: update paths for build-tokens.js

* feat: added descriptions for CLI commands

* refactor: removed commander implementation

* refactor: added build-scss process status

* feat: added ora compilation status

* refactor: code refactoring

* feat: added help description for single command

* refactor: after review

* refactor: refactoring after review

* chore: update docs and cli params parsing

---------

Co-authored-by: monteri <lansevermore>
Co-authored-by: PKulkoRaccoonGang <peter.kulko@raccoongang.com>
Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
2023-10-30 15:05:50 +02:00
Ivo Branco ee4daa0952
feat(i18n): add new languages (#2230)
Add languages: es-AR, es-ES, it-IT, pt-PT, tr-TR
2023-05-02 12:36:18 +03:00
edX requirements bot 64ec73e490
chore: -t flag added in pull translation command (#1793) 2022-11-23 07:58:20 -05:00
Viktor Rusakov a31591e51d
feat: add typescript support (#1267) 2022-08-05 08:32:39 -04:00
Viktor Rusakov af5ef00c5f
chore: remove reactifex dependency (#1410) 2022-06-22 11:44:46 -04:00
Adam Stankiewicz 9c6872fb4c build: install requirements during pull_translations 2022-06-22 10:50:23 -04:00
Viktor Rusakov 1402888908
build: update i18n script to compile messages pulled from transifex (#1405) 2022-06-22 09:52:09 -04:00
Adam Stankiewicz c9af266e93 build: temporarily use -f on tx command in push_translations 2022-06-19 11:38:57 -04:00
Adam Stankiewicz 85e8193d9a build: use v3 of get_hashed_strings and put_comments 2022-06-19 10:46:02 -04:00
Adam Stankiewicz 2ce9ae1464 build: print generated transifex_input.json file 2022-06-19 10:35:01 -04:00
Adam Stankiewicz 40e79565f6 build: print hash file for debugging 2022-06-19 10:09:20 -04:00
Adam Stankiewicz d6046f5b77 build: export TRANSIFEX_RESOURCE similar to frontend-component-header-edx 2022-06-19 09:51:09 -04:00
Adam Stankiewicz 678e170f89 build: use hyphen instead of underscore 2022-06-18 12:15:55 -04:00
Adam Stankiewicz ec3d72464c build: call transifex-utils with node 2022-06-18 12:02:22 -04:00
Adam Stankiewicz 3ce568a1b6
build: update i18n scripts (#1396) 2022-06-18 11:57:55 -04:00
Adam Stankiewicz d617584a20 [skip ci] build: add all supported languages to transifex_langs in Makefile 2022-06-17 14:52:21 -04:00
Adam Stankiewicz 838a28967d
build: replace language with languages in tx args (#1391) 2022-06-17 13:14:36 -04:00
Viktor Rusakov 53e0ac632b
feat!: implement i18n in Paragon components and in docs site (#1100)
Adds support for i18n translations in Paragon components, including the commands to push/pull translations from Transifex in an automated process. This change itself does not guarantee the components are truly translated yet as they may still need a translator and/or a reviewer to approve the translation in Transifex before a translation is pulled.

To upgrade, ensure you are using at least `react-intl@5.25.0` in your application.

BREAKING CHANGE: By adding i18n support to the Paragon design system, we are introducing a peer dependency on `react-intl@5.25.0` or greater. This may be a breaking change for some consumers, if your repository:
* Uses v1 of `@edx/frontend-platform`
* Uses older version of `react-intl` than v5.25.0 directly.
* Does not use `react-intl`.
2022-06-17 06:59:59 -04:00
Adam Butterworth bb781fdfc8
build: update travis doc site deployment and remove cruft (#513) 2019-08-27 09:08:16 -04:00
David Joy 2d7ef36dcf build: tighten up dist directory 2019-07-03 12:16:02 -04:00