Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the first version of Corex generators and several improvements across the library.
Corex Generators
Adds project and code generators built on top of the Phoenix installer and
mix phx.gen.*tasks.mix corex.newExtends
mix phx.newwith additional options to quickly scaffold a Phoenix + Corex application:--mode– adds light/dark mode switching usingCorex.ToggleGroup--theme– adds theme switching usingCorex.Select--lang– adds language switching--rtl– enables RTL support for selected languages--design– includes Corex design tokens and component CSS (optional)--designex– generates tokens using Designex, Style Dictionary, and Tokens Studio--a11y– adds accessibility testing (Wallaby + a11y_audit)--tidewave– includes Tidewave development toolingThe installer keeps Phoenix’s integration test approach to ensure generated apps compile, format, and pass tests in real usage.
mix corex.gen.html/mix corex.gen.liveExtensions of the Phoenix generators with built-in Corex component support.
Generated forms use Corex components such as:
SelectCheckboxPasswordInputDatePickerThey also respect project configuration (mode, theme, and languages).
New Components
The following components were added:
Unified Translations
Components that require accessible text now use a single
translationsattribute with English defaults and full Gettext support.This removes the need to manually provide common accessibility labels while still allowing full customization.
Phoenix Stream Support
Corex components that accept item lists can now work directly with Phoenix Streams.
Lists update dynamically while preserving component state and accessibility behavior (for example keyboard focus).
Form components were also updated to resolve a controlled-mode issue related to ZagJS machine bindings.
Corex Design
Updated default themes demonstrate that any design token (not only colors) can vary per theme or mode, including spacing, border radius, and more.
Corex Design remains fully optional. All components are unstyled and can be used independently within existing design systems.
Upgrade Notes
Corex is still alpha. Some undocumented breaking changes may exist (for example attribute renames such as
collection→items).If you encounter issues during upgrade, feedback is welcome.