-
Top-level views now get an initializer (or
props with--literal) built
from the controller instance variables they reference (@products→
initialize(products: nil)), so they can be rendered with
render Views::Products::Index.new(products: ...). -
Form-builder mapping: inside a model-bound
form_with/form_for, field
calls become RubyUI components —form.text_field/typed fields →Input,
form.textarea→Textarea,form.checkbox→Checkbox,
form.collection_select→NativeSelectwith an option loop,form.label→
FormFieldLabel,form.submit→Button— reconstructingname/idas
"model[attr]"andvalueasmodel.attr.to_s, appending aFormFieldError
per field, and dropping the|form|block var when every call maps. -
Rails flash paragraphs map to RubyUI
Alert:<p id="notice">→
Alert(variant: :success),<p id="alert">→Alert(variant: :destructive),
each with anAlertTitle+AlertDescription. -
Phlex 2 raw output uses
raw(safe(...))(Phlex 1 keepsunsafe_raw(...)) via
Configuration#raw_call. Unmapped HTML output helpers and object/collection
renderare emitted as bare calls (phlex-rails writes to the buffer);
only string-returning helpers (sanitize,safe_join, ...) are wrapped. -
Doctoremits onebin/rails generate ruby_ui:component <Name>command per
missing component (the generator takes a single component per invocation). -
RubyUI element mapping enabled by default: basic HTML elements are
converted to RubyUI kit components —a[href]→Link,button→Button,
input→Input/Checkbox/RadioButton,textarea→Textarea,
select/option→NativeSelect/NativeSelectOption, thetablefamily,
hr→Separator, plus class-basedBadge/Card;link_tobecomes
Link(href: ...). Disable with--no-ruby-ui/ruby_ui: false. -
New
Transformer#kit_componenthelper for kit-style component emission;
built-in rules are fallbacks, so customcomponent_map.registerrules
always take precedence. -
Removed
--starter-rules/enable_starter_rubyui_rules!(replaced by the
default mapping above andenable_rubyui_rules!). -
Fix:
--outputnow creates missing directories in the output tree. -
New
--literalflag (literal: true): partials declare
Literal::Propertiesprops (prop :user, _Nilable(User)) instead of
initialize/attr_reader, and the template body references locals as
@ivars (rewritten safely via Ripper token-level pass). The local matching
the partial name gets an inferred model type; others get_Any?. -
Fix:
LocalsDetectorno longer treatsrenderas a partial local. -
Namespaces are now anchored at the nearest
app/viewsancestor: converting
app/views/users(or a single file inside it) generatesViews::Users::*,
matching the Zeitwerk/phlex-rails layout regardless of which subfolder was
converted.--outputmirroring follows the same root. Outside anapp/views
tree the previous relative behavior is kept;--root DIRsets the anchor
explicitly (passing the converted folder itself restores the old behavior). -
Prerequisite check after each CLI run (
Doctor): detects missing
phlex-rails/ruby_ui/literalgems, ungenerated RubyUI components
referenced by the converted code, and a missingextend Literal::Properties,
then offers to install them (prompt; warn-only on--dry-run/non-TTY).
After installing, a follow-up diagnosis fixes problems that only appear
post-install — notably the brokentw-animate-cssimport that
ruby_ui:installleaves on importmap apps (the jspm pin fails for this
CSS-only package): the real CSS is vendored next toapplication.cssand
the import is rewritten. -
Fix: whole-value ERB attribute expressions with unparenthesized arguments
(e.g.id="<%= dom_id user %>") are now wrapped in parens so they parse
correctly inside the attribute list. -
Fix:
link_totargets that are not strings or route helpers (e.g.
link_to "Show", user) are now wrapped inurl_for(...). -
Fix:
LocalsDetectorno longer treats common Rails helpers (dom_id,
dom_class,notice,alert,content_for,cycle) as partial locals. -
Initial release.
-
Recursive conversion of
.erbviews into Phlex/RubyUI.rbcomponents. -
Conversion of Rails partials (
_partial.html.erb) into dedicated Phlex component classes. -
Pure-Ruby ERB + HTML lexer/parser (no native dependencies).
-
Best-effort mapping of common Rails helpers (
render,link_to,image_tag,content_tag,yield). -
Configurable, conservative RubyUI component mapping via
ComponentMap. -
ruby_ui_converter convert PATHCLI.