Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 #85

Open
wants to merge 79 commits into
base: master
Choose a base branch
from
Open

V3 #85

wants to merge 79 commits into from

Conversation

felixgirault
Copy link
Contributor

No description provided.

@felixgirault felixgirault self-assigned this May 11, 2022
@felixgirault felixgirault marked this pull request as ready for review December 21, 2022 16:48
This was referenced Apr 11, 2023
@felixgirault felixgirault force-pushed the v3 branch 2 times, most recently from e8025d6 to 8ceb717 Compare June 13, 2023 08:18
@dtrucs
Copy link

dtrucs commented Oct 2, 2023

Hello,
There are a lot of promising changes here, can we help move this new version forward?

@felixgirault
Copy link
Contributor Author

Hi,
Yes there is, it's a shame I can't do much right now...
I talked about releasing an alpha v3 version here, would you want to try it if I did?

@felixgirault felixgirault force-pushed the v3 branch 4 times, most recently from 48b3072 to 0b4c213 Compare September 12, 2024 11:55
@felixgirault felixgirault force-pushed the v3 branch 3 times, most recently from b5d6f9a to dc28fdd Compare September 13, 2024 16:44
* preact
* react-modal
Another option would have been to make every class name fully
configurable (the whole class name instead of just the prefix), but the
cost of it would outweigh the gain.
Also, the `stylePrefix` option wasn't even documented, so we're betting
on the fact that very few people are actually using it, if any.
This change is to better align with CNIL's recommendations.
For now, the change has been made kind of brutally, so some things don't
make sense (i.e. purposes can have purposes...).
Further changes will fix the remaining problems.
This seems to be the most broadly used naming.
For now, they are just set to empty strings, but this allows to see
what's missing at a glance.
The previous mechanics were overly complicated for such a small app, and
pretty unlegible.
This pages allow one to migrate a config from v2 to v3 to ease the
transition.
Particularly, "Content Management Platform" was missing, despite being
the common name for such an app.
Typings provided by the module were breaking the build because of type
errors.
We're using a much simpler version that just covers our use case, while
being typesafe.
Dynamic imports were not typed correctly, so there were no type checks
on imported code usage.
When loading, the modal would always be showned, regardless of the
configuration.
Now the UI is properly loaded, showing components only when needed.
It is still possible to open the modal directly with `prompt()`
(previously `show()`), as it was originally intended.
When the modal is forced open on startup, this message should only be
shown if the purposes were updated since the last visit.
Using Empreinte Digitale's new visual identity.
Mainly with preact and its compat layer.
react-modal was way too heavy for the needs of Orejime.
Switching to micromodal takes the uncompressed UI bundles from ~110ko to
~60ko.
Using swc cuts down the execution time by a factor of 10.
This allows using the lib within a bundler, while still providing an
autoloading mechanism for standard usage.
Translations are migrated from yaml to ts to simplify the build and
import process, as there is no real advantage to using yaml here.
The preloading mechanism is removed, as there is a 99% chance that the
UI will be shown on a first visit.
Using tsup simplifies and speeds up the process.
`tsup` was generating a custom type for each and every translation
object, with all of their properties, resulting in a huge declaration.
It turns out that `satisfies` does not impact the output, whereas `as`
forces the `Translation` type to be used.
We're still keeping the `satisfies` part, as it provides better
typechecking (i.e. warning about missing or unknown properties).
* Folded the annotated configuration by default
* Added details on theming
* fixed page markup
* added missing styles
* added a section in the doc
When running a dev server, renaming chunks doesn't work as expected.
HTML elements require dataset props to be camelCased.
When using React 18+, the app must be rendered using createRoot.
Events added by micromodal weren't properly unregistered, causing errors
after closing a modal.
Also, hiding the banner with `display: none` was preventing focus to be
moved back to it after closing the modal.
* harmonized color names
* fixed issues when closing modals by clicking the backdrop
* fixed focus issue on toggle buttons (using `aria-disabled` instead of
`disabled` prevents losing focus when the state changes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants