Skip to content

Conversation

@louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Oct 7, 2024

Related issues

Closes #2605.

Description

Remaining tasks and questions

Questions:

  • Should we introduce an easy way to get all utilities in px and in rem. I mean not only a function px-to-rem but an option like $enable-rem-utilities that make a dupe of each utility but in rem? IMO, we should but it will probably make the bundle size raise a lot. Not done yet.
  • What scenario to follow inside the _utilities.scss for utilities priority? IMO we should stick to the one proposed for the doc implementation.
  • What to do with the $spacer and $spacers variables? IMO, $spacer should take the value $ouds-dimension-base * 5. Not done yet. It's the base of many calculations inside Boosted/Bootstrap. Do we replace them with our $ouds-dimension-base and $ouds-dimension-space-fixed? IMO, we should keep the Bootstrap ones.
  • Do we keep the same size utilities .w-100, etc.. ? IMO, we should since the tokens don't look like they are done for it.

Done list

The following was done in the PR:

  • Revert [OUDS] feat: Add "Elevation" tokens, utilities and documentation - new version #2741 changes about _ouds-maps.scss and rather introduce tokens/_composite.scss. Change all the related files.
  • Introduce new Sass maps that contain all the fixed and scaled values for utilities.
  • Introduce new CSS variables in the _root.scss file for the scaled utilities.
  • Introduce all the new utilities (fixed and scaled).
  • Introduce all new design tokens in tokens/_raw.scss and in tokens/_semantic.scss
  • Checked all the new provided options.
  • Quite complete migration guides.
  • Introduce the documentation of sizing.md and spacing.md utilities.
  • Introducing the tests of the spacings.

To be done after the PR is merged

  • .

Motivation & Context

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch from 6b7eec8 to 05f8527 Compare October 14, 2024 14:56
@louismaximepiton louismaximepiton force-pushed the ouds/main-his-tokens-grid branch from 373e453 to f2a2a25 Compare October 22, 2024 12:58
@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch from 05f8527 to 75dc727 Compare October 22, 2024 15:20
@louismaximepiton louismaximepiton force-pushed the ouds/main-his-tokens-grid branch from 70308ad to 33c6ba1 Compare October 22, 2024 15:31
@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch 2 times, most recently from a70db7f to eec9a1b Compare October 23, 2024 10:10
@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch 2 times, most recently from 2f78431 to a378e58 Compare October 23, 2024 13:49
@julien-deramond julien-deramond force-pushed the ouds/main-his-tokens-grid branch from 5656e5b to 394082a Compare October 24, 2024 12:48
Base automatically changed from ouds/main-his-tokens-grid to ouds/main October 24, 2024 12:55
@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch from a378e58 to 005f07b Compare October 24, 2024 21:32
@netlify
Copy link

netlify bot commented Oct 24, 2024

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 7c95b64
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/67335e884cc8d7000758886f
😎 Deploy Preview https://deploy-preview-2754--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch 2 times, most recently from 33dc6ce to fdab9a8 Compare October 25, 2024 08:02
@louismaximepiton louismaximepiton marked this pull request as ready for review October 25, 2024 10:03
@louismaximepiton louismaximepiton force-pushed the ouds/main-lmp-tokens-spacing branch from f0847dd to 5671e80 Compare October 29, 2024 07:24
<div class="z-1 position-absolute p-5"><span>z-1</span></div>
<div class="z-0 position-absolute p-5"><span>z-0</span></div>
<div class="z-n1 position-absolute p-5"><span>z-n1</span></div>
<div class="z-3 position-absolute p-spacious"><span>z-3</span></div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't take this comment for granted and don't modify the PR. This is a complex one to review, so I'll put some comments here and there with my 2 cents. Hopefully, in the end, with your rules, some comments, and the designers inputs, we might create a cool mapping table for usage, but also for migrations.

Here, the previous value is 60px. So I would rather use as a real project "huge" (56px) or "jumbo" (64px) to have the same rendering.
The previous rule is that the values doubled between 0,1, 2, 3, 4, 5 → 0, 5px, 10px, 20px, 30px, 60px.
If we keep this rule I would rather use for equivalent usages and easier migration none, shortest, shorter, medium, taller, jumbo instead of the current none, shortest, shorter, medium, tall, spacious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rule that was set as follows;
0: none,
1: shortest, (4px)
2: short, (12px)
3: tall, (24px)
4: tallest, (40px)
5: huge (56px)

@julien-deramond
Copy link
Contributor

Should we introduce an easy way to get all utilities in px and in rem. I mean not only a function px-to-rem but an option like $enable-rem-utilities that make a dupe of each utility but in rem? IMO, we should but it will probably make the bundle size raise a lot. Not done yet.

In most cases, while building a page with the layouts, it makes more sense most of the time to use pixels for paddings and margins as we don't want them to change while zooming out. In the components, we might use both depending on the use cases, but we're not supposed to use utilities to build components.
So I'd say, we should be fine with utilities in pixels by default, and having them in rem might be something done on the projects' side. We could start without this $enable-rem-utilities and wait for projects' feedback.

@julien-deramond
Copy link
Contributor

What to do with the $spacer and $spacers variables? IMO, $spacer should take the value $ouds-dimension-base * 5. Not done yet. It's the base of many calculations inside Boosted/Bootstrap. Do we replace them with our $ouds-dimension-base and $ouds-dimension-space-fixed? IMO, we should keep the Bootstrap ones.

IMO, $spacer(s) should be defined from the $ouds-dimension-* Sass variables. And $spacers values should correspond to the migration matching table from Boosted. For instance, if we consider that p-1 must be p-shortest, then $spacers[1] should be defined with $ouds-space-fixed-shortest, etc.
Then, for all OUDS Web utilities, components, layouts, etc. we should use values depending on $ouds-space or $ouds-dimension semantic variables. In the end, $spacer(s) would be used only to define the Bootstrap compatibility utilities, and be ther for plugins and libraries depending on that.

@julien-deramond
Copy link
Contributor

Do we keep the same size utilities .w-100, etc.. ? IMO, we should since the tokens don't look like they are done for it.

It concerns only icons and typos, so let's postpone it.

louismaximepiton and others added 5 commits November 12, 2024 13:39
Co-authored-by: Hannah Issermann <[email protected]>
Co-authored-by: Vincent Prothais <[email protected]>
@julien-deramond julien-deramond merged commit dcdbec7 into ouds/main Nov 12, 2024
@julien-deramond julien-deramond deleted the ouds/main-lmp-tokens-spacing branch November 12, 2024 13:59
@louismaximepiton louismaximepiton mentioned this pull request Nov 22, 2024
1 task
nilloq pushed a commit that referenced this pull request Feb 5, 2025
Co-authored-by: Julien Déramond <[email protected]>
Co-authored-by: Louis-Maxime Piton <[email protected]>

chore: update tokens (#2777)

Co-authored-by: boosted-bot <[email protected]>
Co-authored-by: Julien Déramond <[email protected]>

chore(merge main): patched Boosted commit → be8268e (#2778)

chore: update tokens (#2780)

Co-authored-by: boosted-bot <[email protected]>

feat: add Dimension tokens, utilities and documentation (#2754)

Co-authored-by: Julien Déramond <[email protected]>
Co-authored-by: Hannah Issermann <[email protected]>
Co-authored-by: Vincent Prothais <[email protected]>

tmp

changed display classname and reordering of tables and small definition

Some modifs + some OUDS mods

Add some OUDS mod, remove .initialism, add some documentation

Thiner handle of OUDS mod + small tweaks of the doc.

Adapting documentation with `px` and right values.

First version with icon, missing links and the end of the icon page

Remove '-web' from tokens, use mixin rather than extend, handle the icon size a bit differently and add documentation

------------

Co-authored-by: Julien Déramond <[email protected]>
Co-authored-by: Hannah Issermann <[email protected]>
Co-authored-by: Vincent Prothais <[email protected]>

Fix ci

chore: update tokens (#2790)

Co-authored-by: boosted-bot <[email protected]>
Co-authored-by: Julien Déramond <[email protected]>

Remove useless classes, Add font references everywhere, Add doc about the new mixin, Remove all `_config.scss` references, Add `.mw-none` utility, Update Scss tests

chore: update tokens (#2793)

Co-authored-by: boosted-bot <[email protected]>

Small tweaks of font-stack

Fix CI

migration guide (from v0.0.3)

fix(review)

------------

Co-authored-by: Hannah Issermann <[email protected]>

chore: update tokens (#2794)

Co-authored-by: boosted-bot <[email protected]>

Align with mobile apps presentation

css and sass vars and maps and mixins in both guides + first version of migration guide from Boosted

last fixes about bootstrap-compat migration doc

fix docs job (indentation)

Review migration guides and doc with LM

Update site/content/docs/0.0/helpers/icon.md

Remove Label font-size classes

Adding examples inside the doc, and small css tweaks

New ways to architect the icon + text

Adding migration guides

fix(ci)

Start button component

Add minimal, strong and negative variants

Fix css-test

All btn color variants

fix(design): after design review

Small tweak for forgotten `.text-*` and some spacings.

Add color tokens in OUDS Web

Align bootstrap compat buttons strictly to designed buttons

Add icon buttons

feat: add Typography tokens, utilities and documentation (#2774)

------------

Co-authored-by: Julien Déramond <[email protected]>
Co-authored-by: Hannah Issermann <[email protected]>
Co-authored-by: Vincent Prothais <[email protected]>

First try for loading button

Add color tokens in OUDS Web

Restore all custom examples from Bootstrap

Add Bootstrap basic logo for examples

Rewrite all button documentation. Determinate loading, skeleton and buttons on colored background must still be implemented

remove unused button-outline-variant

fix(CI)

fix(docs): add the forgotten `.border-*`, `.opacity-*` and a `.ms-auto` misplaced in the previous PRs (#2806)

fix(docs): change the font example thumbnails (#2806)

chore: update tokens (#2805)

Co-authored-by: boosted-bot <[email protected]>
Co-authored-by: louismaxime.piton <[email protected]>

chore: update tokens (#2816)

---------

Co-authored-by: boosted-bot <[email protected]>
Co-authored-by: louismaxime.piton <[email protected]>

First draft on new colors

fix(ci)

fix merge issues + enhance color palette

Use new color tokens + add mono (on colored bg) variants

Check mono tokens against bad values + implement loading button example

comment mixin button-outline-variant since vars are not defined

use $ouds-button-size-loader token

fix css-lint

continue doc and laoding/skeleton states

fix btn ids

start migration guides, enhance doc, bootstrap-compat

fix(review)

Adapt to some of the new decisions made on buttons (to be finalized), variant loader-indeterminate with span

chore: update tokens (#2829)

---------

Co-authored-by: boosted-bot <[email protected]>
Co-authored-by: louismaxime.piton <[email protected]>

Add elevation color

[OUDS] Add background utilities to the Colors tokens PR (#2807)

change  $ouds-button-space-inset-icon-alone to $ouds-button-space-inset-icon-only

tokens: use new token $ouds-button-border-width-default-interaction-mono

tokens: $ouds-button-color-border-default-disabled-mono well synchronized, so remove comment

tokens: use new token $ouds-button-border-width-default-interaction-mono

tokens: use --#{$prefix}color-opacity-transparent instead of --#{$prefix}color-opacity-invisible-black and  --#{$prefix}color-content-on-status-emphasized-alt instead of --#{$prefix}color-content-on-action-negative

For now, we chose to use two classes for variants on colored bg, e.g. `.btn-default.btn-on-colored-bg`

Negative and colored bg

Negative and colored bg

Loading buttons!!!

fix CI (ids)

fix CI (cspell)

Add border color utilities to the Colors tokens PR (#2823)

Finalize loading buttons doc and example

Fixes after first comments (review)

Fixes after first comments (review)

Fixes after first comments (review)

Fixes after first comments (review)

- change colored-bg with utility and add data-bs-theme + ex

- change colored-bg with utility and add data-bs-theme + example with negative bg
- replace old boosted btn-* by new classes in docs

Replace old boosted btn-* by new classes everywhere

btn-primary => btn-strong and btn-secondary and btn-outline-secondary => btn-default

update tarteaucitron styles (buttons and modal size)

revert examples

Move Bootstrap examples into the right category

after loading, put the focus back on the button

Handle Bootstrap examples correctly

chore(merge main): patched Boosted commit → 7bde599 (#2827)

chore: update tokens (#2834)

Add text color utilities to the Colors tokens PR

Add color background helpers to the Colors tokens PR (#2831)

changes after merge + add link to buttons guidelines

First reviews from LM

Proposal for new CSS Animation, closer to the previous DS one

Update scss/_buttons.scss

Co-authored-by: Louis-Maxime Piton <[email protected]>

fix: several updates to take PR review comments into account

fix: additional fixes on PR Buttons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

css 📖 documentation Improvements or additions to documentation 🗳️ feature

Projects

Development

Successfully merging this pull request may close these issues.

4 participants