Unify gem and docs into a monorepo#358
Merged
djalmaaraujo merged 752 commits intomainfrom May 7, 2026
Merged
Conversation
* Add MaskedInput component * Update ruby ui version
* Fix menu scroll position * Move js to stimulus controller
* Remove RBUI mentions * change assets
Co-authored-by: Seth Horsley <github.dvxhi@sl.isethi.com>
* upgrade phlex and phlex-rails to 2.0.2 * fix missing keyword "component_name" error
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.27.4 to 0.28.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.27.4...v0.28.0) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.28.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [propshaft](https://github.com/rails/propshaft) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/rails/propshaft/releases) - [Commits](rails/propshaft@v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: propshaft dependency-version: 1.3.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.27 to 10.5.0. - [Release notes](https://github.com/postcss/autoprefixer/releases) - [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md) - [Commits](postcss/autoprefixer@10.4.27...10.5.0) --- updated-dependencies: - dependency-name: autoprefixer dependency-version: 10.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.41.0 to 4.43.0. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES) - [Commits](SeleniumHQ/selenium@selenium-4.41.0...selenium-4.43.0) --- updated-dependencies: - dependency-name: selenium-webdriver dependency-version: 4.43.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rss](https://github.com/ruby/rss) from 0.3.1 to 0.3.2. - [Release notes](https://github.com/ruby/rss/releases) - [Changelog](https://github.com/ruby/rss/blob/master/NEWS.md) - [Commits](ruby/rss@0.3.1...0.3.2) --- updated-dependencies: - dependency-name: rss dependency-version: 0.3.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 2.9.2 to 2.9.3. - [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases) - [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/main/CHANGELOG.md) - [Commits](sparklemotion/sqlite3-ruby@v2.9.2...v2.9.3) --- updated-dependencies: - dependency-name: sqlite3 dependency-version: 2.9.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [fuse.js](https://github.com/krisk/Fuse) from 7.1.0 to 7.3.0. - [Release notes](https://github.com/krisk/Fuse/releases) - [Changelog](https://github.com/krisk/Fuse/blob/main/CHANGELOG.md) - [Commits](krisk/Fuse@v7.1.0...v7.3.0) --- updated-dependencies: - dependency-name: fuse.js dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prepares the repo for unification with the docs Rails app. All gem source, tests, generators, devcontainer, and existing docs now live under gem/ so docs/ can be added as a sibling in a follow-up commit. Root-level README, CONTRIBUTING, LICENSE, and unified CI workflow will be re-created from scratch in later commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Switch docs/Gemfile to gem "ruby_ui", path: "../gem". - Drop the docs/app/components/ruby_ui/ mirror entirely; the docs Rails app now resolves RubyUI::* from the gem's lib path via Zeitwerk. - Configure docs/config/initializers/ruby_ui.rb to push the gem's lib/ruby_ui into the RubyUI namespace, ignoring *_docs.rb files and the lib/ruby_ui/docs/ scaffolding (the docs app keeps its own richer Components::Docs::* and Views::Docs::* implementations). - Update hardcoded "blob/main/lib/ruby_ui/..." source URLs to point at the new "blob/main/gem/lib/ruby_ui/..." location. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New .github/workflows/ci.yml runs three jobs: gem (Ruby 3.3 + 3.4 matrix in gem/), docs (Rails app in docs/), and docker-build (only on main, builds the docs devcontainer image into ghcr.io). - Drops the old per-subdir CI workflows (gem/.github/workflows/ci.yml and docs/.github/workflows/ci.yml) — GitHub Actions only looks at .github/ at the repo root. - Move CODEOWNERS, pull_request_template.md, and dependabot.yml to the root .github/. The dependabot.yml is consolidated to cover bundler in /gem and /docs, npm in /docs, github-actions at /, and devcontainers in both subdirs. - Drops the verify_components job that previously regenerated the gem mirror in docs/ — no longer needed since docs consumes the gem directly via path: "../gem". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Build context for docs/Dockerfile is now the monorepo root, so the gem/ subtree is visible to bundle install and `path: "../gem"` in docs/Gemfile resolves correctly. Run from the repo root: docker build -f docs/Dockerfile . flyctl deploy --config docs/fly.toml --dockerfile docs/Dockerfile . Changes: - COPY gem /gem before `bundle install`, then COPY docs/Gemfile and docs/Gemfile.lock into /rails/. - COPY docs/package.json + docs/pnpm-lock.yaml separately, then COPY docs/ into /rails/ for the rest of the app code. - Final stage copies /gem too so the running container resolves the gem path at boot. - Move .dockerignore to repo root with paths rewritten to /docs/... and /gem/...; drop docs/.dockerignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- New root README.md describes the monorepo layout (gem/ + docs/) and links the per-subproject READMEs. - New root CONTRIBUTING.md covers the unified workflow: a single PR can touch the component (gem/) and its docs example (docs/) since the docs app consumes the local gem via path: "../gem". - gem/AGENTS.md gains a "Monorepo context" section noting that component changes should be paired with docs/app/views/docs/ updates in the same PR. - gem/CONTRIBUTING.md drops the obsolete instruction to also open a PR on ruby-ui/web — that repo is being archived. - gem/test/gemspec_test.rb is a new regression test that builds the .gem and verifies its contents are limited to README, LICENSE, and lib/. Catches accidental changes to s.files that would leak docs/, test/, or .github/ into the published gem. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Gem::Package#each isn't a public iteration API in modern rubygems; #contents returns the full list of relative paths in the .gem and matches what we need for the allowlist assertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the GIT block (github.com/ruby-ui/ruby_ui revision pin) with a PATH block pointing at ../gem, matching the new Gemfile entry. Re-resolved with `bundle lock`; no other dependency versions move. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ec47981 to
158cb70
Compare
djalmaaraujo
pushed a commit
that referenced
this pull request
Apr 30, 2026
Bumps [esbuild](https://github.com/evanw/esbuild) from 0.25.11 to 0.27.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.25.11...v0.27.0) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.27.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
03707fb to
ec47981
Compare
01e1baf to
4a9addf
Compare
Member
|
Did it not make more sense to just have the gem be inside the |
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
Consolidates
ruby-ui/ruby_ui(the gem) andruby-ui/web(the docs Rails app at rubyui.com) into a single repository with a symmetric layout:The motivating problem: every component change required two coordinated PRs (one in the gem, one in
web), and the docs app already mirrored the entire gem underapp/components/ruby_ui/. With this change, a single PR can touch both the component and its documentation example, and the docs app reads fromgem/lib/directly — no copy step, no version skew.Key decisions
ruby-ui/ruby_uiso the gem URL, issues, and stars stay put.ruby-ui/webwill be archived after cutover.web/imported viagit subtree add(no squash).git log -- docs/preserves the original commits, authors, and dates fromweb.docs/app/components/ruby_ui/entirely. The docs app's autoloader pushes the gem'slib/ruby_ui/directory into theRubyUInamespace;*_docs.rbandlib/ruby_ui/docs/are ignored to avoid Zeitwerk namespace conflicts (the docs app keeps its own richerComponents::Docs::*andViews::Docs::*implementations)..github/workflows/ci.ymlat the root runs three jobs — gem (Ruby 3.3 + 3.4 matrix), docs (Rails app), and docker-build for the devcontainer image. The previousverify_componentsjob is deleted (no mirror to verify).gem/is visible tobundle install(resolvespath: "../gem"from inside/rails/). Run from the repo root:flyctl deploy --config docs/fly.toml --dockerfile docs/Dockerfile ..s.files = Dir["README.md", "LICENSE.txt", "lib/**/*"]continues to be the explicit allowlist.gem buildfromgem/still ships exactly the same 289 files (onlylib/, README, LICENSE) — nothing fromdocs/leaks. A newgem/test/gemspec_test.rbregression test guards this.What changed
lib/,test/,bin/,Gemfile*,ruby_ui.gemspec,Rakefile,.devcontainer/,.tool-versions, etc.) →gem/(preserves per-file blame).ruby-ui/webhistory merged in underdocs/.docs/Gemfile:gem "ruby_ui", github: ...→gem "ruby_ui", path: "../gem".docs/config/initializers/ruby_ui.rb: push the gem's lib path into the autoloader, ignore*_docs.rbanddocs/subfolder.github.com/ruby-ui/ruby_ui/blob/main/lib/ruby_ui/...updated togem/lib/ruby_ui/...in views and theme grids (externalruby_ui_pro/ruby_ui_stimulusrefs left alone).README.md(monorepo overview), newCONTRIBUTING.md(unified workflow),.github/CODEOWNERS,.github/dependabot.yml(covering bundler in/gemand/docs, npm in/docs, github-actions, devcontainers in both),.github/pull_request_template.md.gem/AGENTS.md/gem/CONTRIBUTING.md: updated to describe the monorepo context; dropped the obsolete instruction to also open a PR onruby-ui/web.Verified locally
cd gem && bundle exec rake→ 106 runs, 469 assertions, 0 failures, 0 errors. Standardrb: 309 files, no offenses.cd gem && gem build ruby_ui.gemspec→ 289 files in the .gem; onlyREADME.md,LICENSE.txt, andlib/**/*. Nothing fromdocs/,test/, or.github/leaks.cd docs && bundle lock→ resolvesPATH remote: ../gemcorrectly. (Fullbundle installfailed locally on sqlite3 native build due to host env — CI will exercise this with proper system deps.)Test plan
cd docs && bin/devrenders the documentation site locally; spot-check/docs/button,/docs/combobox,/docs/changelog,/docs/getting_started/*.docker build -f docs/Dockerfile -t rubyui-docs .from the repo root completes successfully.flyctl deploy --config docs/fly.toml --dockerfile docs/Dockerfile . --build-only.Cutover (post-merge, separate steps)
docs/to Fly (rubyui.com) and verify production.v1.2.0of the gem fromgem/:cd gem && bundle exec rake release.ruby-ui/webon GitHub and update its README to point here. Don't delete — preserves external links, issues, and PRs as read-only.ruby-ui/web(offer rebase paths intodocs/).🤖 Generated with Claude Code