Skip to content

Clarify hero text: Vident builds components, not provides them - #30

Merged
stevegeek merged 6 commits into
mainfrom
claude/fix-hero-text-clarity-XV8yZ
Apr 26, 2026
Merged

Clarify hero text: Vident builds components, not provides them#30
stevegeek merged 6 commits into
mainfrom
claude/fix-hero-text-clarity-XV8yZ

Conversation

@stevegeek

Copy link
Copy Markdown
Owner

The previous wording "Type-safe Rails components with first-class
Stimulus" implied the gem ships a library of components, when in fact
it's a toolkit for building your own.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr

claude added 5 commits April 25, 2026 12:35
The previous wording "Type-safe Rails components with first-class
Stimulus" implied the gem ships a library of components, when in fact
it's a toolkit for building your own.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr
"Pick the engine that fits the file" was awkward — clarify that the
choice is per-app or framework preference.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr
vident:install now generates app/components/application_phlex_component.rb
and/or application_view_component.rb based on which engine gems are loaded,
matching the ApplicationRecord/ApplicationController pattern.

New per-engine scaffold generators:
  bin/rails g vident:phlex:component Dashboard::TaskCard
  bin/rails g vident:view_component:component Dashboard::TaskCard

Each emits the .rb component (with one example prop and a stimulus block),
a Stimulus controller sidecar, and a unit test. ViewComponent also gets
the .html.erb template. Flags: --skip-stimulus, --skip-controller,
--skip-test, --typescript/-t, --parent.

Plus a vident:component umbrella dispatcher: dispatches to the right
engine when only one is loaded, or requires --engine=phlex|view_component
when both are present.

Per-engine generators ship with their respective gems via gemspec
file-glob updates.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr
The deploy-dashboard release card was esoteric. Replaced with a more
relatable task card example that exercises the same DSL features —
typed unions, dynamic classes proc, values_from_props, child_element
with stimulus_target/action/params, plus an _Array(String) tags prop
to demo array props.

The card has a Phlex twin (Phlex::TaskCardComponent) and a
ViewComponent twin (ViewComponent::TaskCardComponent + .html.erb),
both locked to the same stimulus_identifier_path so they emit
equivalent HTML and one Stimulus controller drives both.

Demo include now renders both engine sources into the DOM and the
Source tab hosts an inline Phlex / ViewComponent toggle. The choice
is synced across all demos on the page and persisted in
localStorage. Default engine: ViewComponent. Both source code blocks
stay crawlable; the Live and Rendered HTML panels render once
(Phlex's output is the canonical bytes).

Old release_card demo fragments removed. The dummy app's
Dashboard::ReleaseCardComponent is unchanged — it's still used by
the broader dashboard tests and the Claude skill examples.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr
Five small follow-ups from the reviewer pass:

- Strip a trailing `Component` from generator input names so
  `g vident:component TaskCardComponent` produces the same files as
  `g vident:component TaskCard` rather than `TaskCardComponentComponent`.
  Matches ViewComponent's own generator behaviour.

- `vident:install` no longer overwrites an existing
  `application_phlex_component.rb` / `application_view_component.rb`
  on re-run; the existing file is preserved unless `--force` is passed,
  mirroring the same semantics as the Claude skill file.

- CHANGELOG: document the new component scaffold generators, the
  umbrella dispatcher, and the Application*Component install behaviour.

- README: explain how to scaffold a component and what flags are
  available, alongside the existing `vident:install` section.

- SKILL.md: lead the "Component scaffolding" section with the new
  generator commands so Claude Code uses them by default.

- Drop a stray `require "vident"` from the ViewComponent task card
  twin for consistency with the Phlex twin.

Generator tests grow accordingly: 26 runs / 162 assertions across
all four generator test files.

https://claude.ai/code/session_01DFmrJHuYK2ybJ9WAEqzzzr
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 25, 2026

Copy link
Copy Markdown

Deploying vident with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6b7213a
Status:⚡️  Build in progress...

View logs

- Move WEBSITE_DIR out of the namespace block (Lint/ConstantDefinitionInBlock)
  and drop a redundant `+"..."` interpolation unfreeze in lib/tasks/website.rake.
- Ignore website/_includes/demos/* in standardrb. The
  task_card_view_component_source.rb fragment concatenates a `.rb` and a
  `.erb` for display, so it isn't valid Ruby.
- Drop a self-evident SKILL_SOURCE comment and two scenario-restating
  comments in install_generator_test.rb.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stevegeek
stevegeek merged commit d3c2a2c into main Apr 26, 2026
12 of 13 checks passed
@stevegeek
stevegeek deleted the claude/fix-hero-text-clarity-XV8yZ branch April 26, 2026 08:14
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