inline_forms 8.0.4 → 8.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,93 +0,0 @@
1
- # Git-sourced installer dependencies — assessment
2
-
3
- **Date:** 2026-05-19
4
- **Context:** Generated apps from `inline_forms create` used three non-RubyGems pins: `tabs_on_rails` (git + branch), `i18n-active_record` (git), and a commented `will_paginate` fork. This doc records why they existed and what replaced them.
5
-
6
- **Related (risk callouts only):** `validation_hints/stuff/rails-7.2-zeitwerk-plan.md` (Track A3), `validation_hints/stuff/rails-8-checklist.md` (Phase 3).
7
-
8
- ---
9
-
10
- ## Summary (7.13.5+)
11
-
12
- | Gem | Was | Now | Reason |
13
- |-----|-----|-----|--------|
14
- | `will_paginate` | RubyGems + commented acesuares fork | RubyGems only | Fork never active; comment removed |
15
- | `tabs_on_rails` | `acesuares/tabs_on_rails` branch `update_remote_before_action` | `~> 3.0` (weppos, RubyGems) | Fork only added unused `:remote` on tab links; upstream 3.0.0 already uses `before_action` |
16
- | `i18n-active_record` | `acesuares/i18n-active_record` (2012) | **Removed** (7.13.18: no DB translation tables) | Never configured `I18n.backend`; DB tables/view and `extract_translations` removed |
17
-
18
- **No generated-app Gemfile should use `:git` for these anymore.**
19
-
20
- ---
21
-
22
- ## `will_paginate`
23
-
24
- - **Fork:** `https://github.com/acesuares/will_paginate.git` (commented out for years).
25
- - **Usage:** Nested/top-level list pagination in `_list.html.erb`; Turbo Frame nav since 7.5.x (no `:remote => true`).
26
- - **Verdict:** RubyGems `will_paginate` is sufficient. No acesuares-specific behavior required.
27
-
28
- ---
29
-
30
- ## `tabs_on_rails`
31
-
32
- ### Why the fork existed
33
-
34
- Branch `update_remote_before_action` on `acesuares/tabs_on_rails` (2019) did two things:
35
-
36
- 1. `before_filter` → `before_action` (Rails 4+ rename).
37
- 2. Optional `:remote => true` on `tab_for` links (`tabs_builder.rb`).
38
-
39
- ### What inline_forms actually uses
40
-
41
- - Controllers call **`set_tab :resource`** only (generator template + installer).
42
- - Top bar is **not** built with `tabs_tag` / `tab_for`; `_inline_forms_tabs.html.erb` is a Foundation top-bar with search + new button.
43
- - Turbo migration removed **`data-remote`** from inline UI; no code passes `:remote` into tabs.
44
-
45
- ### Upstream today
46
-
47
- - **RubyGems:** `tabs_on_rails` **3.0.0** (weppos, 2017).
48
- - **`set_tab`** already uses **`before_action`** in `lib/tabs_on_rails/action_controller.rb`.
49
- - **Missing vs fork:** `:remote` on tab links only — **unused by inline_forms**.
50
-
51
- ### Verdict
52
-
53
- **Use `gem 'tabs_on_rails', '~> 3.0'`.** No runtime dependency on the fork. Re-test on Rails 7.2+ / 8.0 when upgrading (gem is unmaintained but tiny).
54
-
55
- ---
56
-
57
- ## `i18n-active_record`
58
-
59
- ### History
60
-
61
- - Fork existed because MySQL reserves `KEY`; acesuares fork used **`thekey`**.
62
- - **7.13.5–7.13.17:** gem removed from Gemfile; installer still generated locale/key/translation tables + `translations` view; **`InlineForms::TranslationRecord`** read the view; **`extract_translations`** exported YAML (never routed by default).
63
- - **`I18n.backend` was never** `I18n::Backend::ActiveRecord` in generated apps.
64
-
65
- ### Verdict (7.13.18+)
66
-
67
- **No DB translation layer.** Generated apps use Rails I18n YAML only (`config/locales/inline_forms_local.en.yml`, etc.). If **I18n::Backend::ActiveRecord** is needed later, add **`i18n-active_record ~> 1.4`** and migrations separately—not via inline_forms installer.
68
-
69
- ---
70
-
71
- ## Previously removed forks (reference)
72
-
73
- | Gem | Removed in | Replacement |
74
- |-----|------------|-------------|
75
- | `devise-i18n` | 7.3.4 / 7.10+ | RubyGems `~> 1.16` |
76
- | `paper_trail` | 7.0.x | RubyGems `~> 16.0` |
77
- | `switch_user` | 7.2.x | Removed from installer |
78
-
79
- ---
80
-
81
- ## Verification
82
-
83
- After changing `installer_core.rb`:
84
-
85
- ```bash
86
- cd /home/code/inline_forms && rvm use . && gem build inline_forms.gemspec && gem build inline_forms_installer.gemspec
87
- cd /home/code/testInline && rvm use .
88
- gem install /home/code/inline_forms/inline_forms-*.gem /home/code/inline_forms/inline_forms_installer-*.gem
89
- rm -rf MyApp && inline_forms create MyApp -d sqlite --example
90
- cd MyApp && rvm use . && bundle exec rails test
91
- ```
92
-
93
- Expect **0 failures**; `Gemfile.lock` should list `tabs_on_rails (3.0.0)` and **no** `i18n-active_record` git source.
@@ -1,25 +0,0 @@
1
- # jQuery widget migration (Phase 4)
2
-
3
- UJS removal (7.8.0) is complete. These jQuery-based widgets remain in the Sprockets bundle:
4
-
5
- | Widget | Asset | Status |
6
- |--------|-------|--------|
7
- | Datepicker | `jquery.ui.all` | **Centralized** — `initInlineFormsWidgets` in `inline_forms.js`; helpers use `class="datepicker"` only |
8
- | Month/year picker | jQuery UI datepicker | **Centralized** — `class="datepicker datepicker-month-year"` |
9
- | Timepicker | `jquery.timepicker.js` | **Centralized** — `class="timepicker"` |
10
- | Autocomplete | `autocomplete-rails` + inline scripts in `dropdown_with_other` | Still inline / jQuery UI |
11
- | Foundation | `foundation` jQuery plugin | Required for layout chrome |
12
-
13
- ## Central init (7.9.8+)
14
-
15
- `initInlineFormsWidgets(root)` runs on:
16
-
17
- - DOM ready (after `$.datepicker.setDefaults`)
18
- - `turbo:load`
19
- - `turbo:frame-load`
20
-
21
- Form element `_edit` helpers must **not** emit per-field `<script>` tags; class hooks only.
22
-
23
- ## Future removal (not started)
24
-
25
- Replace with Stimulus or vanilla + `turbo:frame-load` one widget at a time; keep example-app tests green after each.
@@ -1,5 +0,0 @@
1
- # Keep this directory for checked-in prompt docs.
2
- # Ignore local scratch files by default.
3
- *
4
- !.gitignore
5
- !*.md
@@ -1,32 +0,0 @@
1
- You are in the inline_forms gem repo at /home/code/inline_forms.
2
-
3
- Goal:
4
- Build the current gem, install it into /home/code/testInline, recreate MyApp from scratch using --example, and verify it with Rails tests.
5
-
6
- Do all steps end-to-end without asking for confirmation unless a command fails.
7
-
8
- Steps:
9
- 1) In /home/code/inline_forms:
10
- - Ensure latest code is used.
11
- - Run: rvm use .
12
- - Build gems: gem build inline_forms.gemspec && gem build inline_forms_installer.gemspec
13
- - Confirm the built file names/versions (inline_forms-<version>.gem, inline_forms_installer-<version>.gem).
14
-
15
- 2) In /home/code/testInline:
16
- - Remove old app if present: /home/code/testInline/MyApp
17
- - Run: rvm use .
18
- - Install the freshly built gems from /home/code/inline_forms/inline_forms-<version>.gem and inline_forms_installer-<version>.gem
19
-
20
- 3) Still in /home/code/testInline:
21
- - Generate fresh example app:
22
- inline_forms create MyApp -d sqlite --example
23
-
24
- 4) In /home/code/testInline/MyApp:
25
- - Run: rvm use .
26
- - Run verification: bundle exec rails test
27
-
28
- Output requirements:
29
- - Briefly report each phase result (build, install, app generation, test run).
30
- - Include exact commands run.
31
- - Include test summary (runs/assertions/failures/errors/skips).
32
- - If anything fails, stop at the failing step and include the exact error and the next corrective command you recommend.
@@ -1,39 +0,0 @@
1
- # Rails 8 — Phase 4 audit (framework defaults & cleanup)
2
-
3
- **Date:** 2026-05-22
4
- **Scope:** Post–Phase 3 (`inline_forms` 8.0.2 installer + example app gate).
5
-
6
- ## 4.1 Framework defaults (`rails new` 8.0.5)
7
-
8
- Vanilla `rails _8.0.5_ new` (importmap, `--skip-bundle`):
9
-
10
- - `config/application.rb`: `config.load_defaults 8.0`, `config.autoload_lib(ignore: %w[assets tasks])`
11
- - Generator **removes** `config/initializers/new_framework_defaults_8_0.rb` (opt-in flags live only in the railties template until uncommented)
12
- - Optional 8.0 toggles (all commented in upstream template): `active_support.to_time_preserves_timezone`, `action_dispatch.strict_freshness`, `Regexp.timeout`
13
-
14
- **Installer decision:** Match vanilla Rails 8 — rely on `load_defaults 8.0` only; do **not** ship `new_framework_defaults_8_0.rb` in generated apps. Keep a belt-and-suspenders `gsub` to `load_defaults 8.0` if an older `rails new` left another minor.
15
-
16
- ## 4.2 Rails 8 API / deprecation grep
17
-
18
- | Area | Result |
19
- |------|--------|
20
- | `form_with` / `model: nil` | No engine usage; inline fields use custom helpers / Turbo, not `form_with` |
21
- | `form_for` | Devise templates only (upstream Devise 5) |
22
- | `ActiveRecord::Base.connection` | Unicorn `before_fork` template updated → `connection_pool.disconnect!` |
23
- | `ActionController` deprecated flags | None in `lib/` |
24
- | Generator migrations | `ActiveRecord::Migration[8.0]` (tests assert) |
25
-
26
- ## 4.3 Dart Sass / SCSS
27
-
28
- Foundation + engine SCSS still emit Dart Sass 1.x deprecation warnings during `dartsass:build`. Accepted for 8.0 ship; migrate to `@use` / `color.scale` before Dart Sass 3.0 (see `stuff/pipeline.md`).
29
-
30
- ## 4.4 bundler-audit
31
-
32
- | Lockfile | Result (2026-05-22) |
33
- |----------|---------------------|
34
- | `validation_hints/Gemfile.lock` | No vulnerabilities found |
35
- | Example app `MyApp/Gemfile.lock` | No vulnerabilities found (`bundler-audit` on default gemset) |
36
-
37
- ## 4.5 Example app gate (unchanged baseline)
38
-
39
- `inline_forms create MyApp -d sqlite --example` → **88 runs, 502 assertions, 0 failures, 0 errors, 0 skips** (Phase 3, Rails 8.0.5 stack).
@@ -1,56 +0,0 @@
1
- # Rails 8.0 release (8.0.x line)
2
-
3
- **Shipped:** 2026-05-22
4
- **Tags:** `v8.0.3` (inline_forms, inline_forms_installer, validation_hints)
5
-
6
- ## Stack
7
-
8
- | Component | Constraint |
9
- |-----------|------------|
10
- | Ruby | `>= 4.0` (generated apps: `ruby-4.0.4`) |
11
- | Rails | `>= 8.0`, `< 8.1` |
12
- | rails-i18n | `>= 8.0`, `< 9.0` |
13
- | validation_hints | `>= 8.0.2`, `< 9.0` (release **8.0.3** lockstep) |
14
-
15
- Install CLI:
16
-
17
- ```bash
18
- gem install inline_forms_installer
19
- inline_forms create MyApp -d sqlite --example
20
- ```
21
-
22
- Pre-release local builds: installer auto-installs `*.gem` from `~/inline_forms` / `~/validation_hints` when present (no `path:` in consumer Gemfiles).
23
-
24
- ## Verification gate (2026-05-22)
25
-
26
- | Check | Result |
27
- |-------|--------|
28
- | validation_hints `rake test` | 24 runs, 50 assertions, 0 failures |
29
- | inline_forms `rake test` | 24 runs, 89 assertions, 0 failures |
30
- | `inline_forms create MyApp -d sqlite --example` | OK (Rails 8.0.5) |
31
- | `bundle exec rails zeitwerk:check` | All is good! |
32
- | `bundle exec rails test` (MyApp) | **88 runs, 502 assertions, 0 failures, 0 errors, 0 skips** |
33
- | `bundler-audit` (validation_hints lockfile) | No vulnerabilities found |
34
-
35
- ## Migration phases (maintainer runbook)
36
-
37
- Canonical step-by-step: `stuff/rails8forReal.md` (local; gitignored in this repo). Mirror checklist: `validation_hints/stuff/rails-8-checklist.md`.
38
-
39
- | Phase | Status |
40
- |-------|--------|
41
- | 0 Baseline | Done |
42
- | 1 validation_hints → AR 8 | Done (8.0.1+) |
43
- | 2 inline_forms engine → Rails 8 | Done (8.0.1+) |
44
- | 3 Installer + example app | Done (8.0.2+) |
45
- | 4 Framework defaults + audit | Done (8.0.3) — [`rails-8-phase4-audit.md`](rails-8-phase4-audit.md) |
46
- | 5 Release + docs | Done (8.0.3) — this file |
47
-
48
- ## Zeitwerk
49
-
50
- See [`zeitwerk-and-load-paths.md`](zeitwerk-and-load-paths.md). No remaining active code on pre-Zeitwerk `app/helpers/form_elements/` paths.
51
-
52
- ## Deferred
53
-
54
- - Dart Sass 3.0 (`@import` removal) — not released; deprecations only on Dart Sass 1.x
55
- - [`stuff/towards_rails_8.md`](../stuff/towards_rails_8.md) product bets (auth, encryption, …) — post-ship
56
- - Asset pipeline (`stuff/pipeline.md`) — orthogonal
@@ -1,16 +0,0 @@
1
- # Turbo Stream audit (optional)
2
-
3
- Stock inline_forms flows use **`format.html`** inside matching `<turbo-frame>` ids. **`format.turbo_stream`** is used where a single response must update **multiple** frames (e.g. revert from the versions panel).
4
-
5
- ## Current turbo_stream usage
6
-
7
- | Action | Response | Notes |
8
- |--------|----------|-------|
9
- | `revert` | `turbo_stream.replace` row + versions frames | Required when POST originates inside `*_versions` frame |
10
-
11
- ## Candidates for future streams (not migrated)
12
-
13
- - Row destroy fade-out animation (today: HTML `row_destroyed` replaces frame)
14
- - Multi-field batch updates (no stock flow today)
15
-
16
- No change required for the example app; integration tests assert HTML frame contracts.
data/docs/ujs-to-turbo.md DELETED
@@ -1,207 +0,0 @@
1
- # UJS → Turbo migration checklist
2
-
3
- > **Decommissioned.** This checklist is frozen as of 2026-05-17.
4
- > **Use the combined roadmap instead:** [`stuff/roadmap.md`](../stuff/roadmap.md)
5
- > Canonical copy also at: `validation_hints/stuff/roadmap.md`
6
-
7
- **Steps 1–5 are complete** (inline_forms **7.9.6**). Remaining work (jQuery widget migration, optional `turbo_stream` audit, validation hint copy, Rails security bump) is tracked in **`roadmap.md`**.
8
-
9
- ---
10
-
11
- ## Historical reference (archived)
12
-
13
- <details>
14
- <summary>Original UJS → Turbo checklist (click to expand)</summary>
15
-
16
- Track progress toward full Turbo integration and removal of jQuery UJS from inline_forms generated apps.
17
-
18
- **Current gem version:** see `lib/inline_forms/version.rb` (**Step 5** — Turbo Drive on, jquery-ujs / remotipart removed in **7.8.0**)
19
-
20
- **Architecture today:** inline interactions use **`<turbo-frame>`** + **`format.html`** (and optional **`format.turbo_stream`**). Turbo loads as an ES module from the layouts; **Turbo Drive** uses the library default (**enabled**). No `*.js.erb` in active engine views; no `jquery_ujs` or `jquery.remotipart` in the Sprockets bundle.
21
-
22
- **Target end state:** Stock flows use Turbo Frames + HTML; optional `turbo_stream` where it simplifies a response. jQuery UJS and `*.js.erb` are gone from the engine.
23
-
24
- ---
25
-
26
- ## Step 1 — Turbo wired (DONE)
27
-
28
- - [x] `gem 'turbo-rails'` in installer Gemfile (`bin/inline_forms_installer_core.rb`)
29
- - [x] Turbo loaded as `<script type="module">` in `layouts/inline_forms.html.erb` and `layouts/application.html.erb`
30
- - [x] `Turbo.session.drive` uses the **default (enabled)** — **7.8.0** (was disabled while UJS coexisted)
31
- - [x] Turbo **not** in Sprockets bundle (`app/assets/javascripts/inline_forms/inline_forms.js`) — ESM parse-error lesson from 7.1.1
32
- - [x] Smoke test: `lib/installer_templates/example_app_tests/test/integration/example_app_turbo_layout_test.rb`
33
-
34
- ---
35
-
36
- ## Step 2 — Nested list + pagination as Turbo Frame (DONE)
37
-
38
- - [x] `_list.html.erb`: nested has_many container is `<turbo-frame id="…_list">` when `parent_class` present
39
- - [x] Nested pagination: no `:remote => true`; `update=` param matches frame id (`…_list` suffix)
40
- - [x] `InlineFormsController#index`: HTML for nested frame requests; `turbo_rails/frame` vs `inline_forms` layout negotiation
41
- - [x] **Nested rows (7.4.2):** per-row `<turbo-frame>` + Turbo presentation links; **`row_html_turbo_allowed?`** enables **`format.html`** row open/close for **`not_accessible_through_html?`** models when **`params[:update]`** is a nested associated row id (`apartment_<aid>_photo_<pid>`). Removed row-level **`data-turbo="false"`** (field cancel + pagination use Turbo inside nested frames).
42
- - [x] Top-level rows must **not** carry `data-turbo="false"` (would poison inner frames — 7.2.3)
43
- - [x] Smoke test: `example_app_apartment_photos_pagination_test.rb`
44
- - [x] Example seed data (Konferensha + photos) for pagination assertions
45
-
46
- **Explicitly deferred in this step:** top-level index lists (`/apartments`) stay full-page + UJS row open.
47
-
48
- ---
49
-
50
- ## Step 3 — Per-row / per-field inline-edit lifecycle
51
-
52
- Convert the **`show → edit → update → show_element → close`** cycle without UJS.
53
-
54
- ### DOM contract (unchanged)
55
-
56
- - Every editable region needs a stable id: `{model}_{id}_{attribute}` (e.g. `apartment_5_name`)
57
- - `params[:update]` must match that id (set by `link_to_inline_edit`, `_edit.html.erb`, etc.)
58
-
59
- ### Row-level (stock list → full `_show` panel)
60
-
61
- - [x] Wrap each top-level list row in `<turbo-frame id="apartment_<id>">` (`_list.html.erb` when `parent_class` is nil)
62
- - [x] Row title link: GET `show` → HTML `row_show` / `_show` inside frame (no `:remote`; `data-turbo` + `data-turbo-frame`)
63
- - [x] `InlineFormsController#show` (full record, no `params[:attribute]`): `format.html` → `row_show` / `row_close` + `turbo_rails/frame` when `turbo_frame_request?`, else full `inline_forms` layout
64
- - [x] `close_link` and `_close` presentation link: Turbo when `@inline_forms_turbo_row` (row HTML path)
65
- - [x] `soft_delete`, `soft_restore`, `destroy`, `revert`: `format.html` → `row_close` / `row_destroyed` (+ Turbo toolbar links)
66
- - [x] Remove `edit.js.erb`, `update.js.erb`, `show_element.js.erb` (field lifecycle is Turbo HTML only)
67
- - [x] Remove `show.js.erb`, `close.js.erb`, `record_destroyed.js.erb`, `show_undo.js.erb` (7.7.0; tree migrated)
68
- - [x] Remove `:remote => true` from nested `_list` / `_close` / toolbar where migrated (row toolbar, versions, nested `+` use Turbo; top-level `new` was Step 4)
69
- - [x] Remove `data-turbo="false"` from nested rows once nested inline-edit is Turbo-native (7.4.2)
70
-
71
- ### Nested associated lists (e.g. Apartment → Photo)
72
-
73
- - [x] Each nested row is `<turbo-frame id="{parent}_{id}_{assoc}_{child_id}">` with Turbo presentation links (same contract as top-level).
74
- - [x] **`row_html_turbo_allowed?`:** `format.html` row open/close for **`not_accessible_through_html?`** models when **`params[:update]`** matches a nested associated row id (≥4 underscore segments, trailing numeric id).
75
- - [x] Scalar field edit/cancel inside nested **`_show`** uses existing **`format.html`** field templates (no **`UnknownFormat`** for Photo).
76
-
77
- ### Field-level (`link_to_inline_edit` / `*_show` helpers)
78
-
79
- - [x] **Stock `_show` scalar fields**: wrapped in `<turbo-frame id="{model}_{id}_{attribute}">`; `@inline_forms_turbo_field = true` so `link_to_inline_edit` omits `:remote => true`
80
- - [x] **`link_to_inline_edit`**: uses Turbo when `@inline_forms_turbo_field` or explicit `turbo_frame: true`
81
- - [x] **`InlineFormsController#edit`, `#update`, `#show`** (single attribute): `format.html` + `field_edit` / `field_show` templates when `turbo_frame_request?`
82
- - [x] **`_edit.html.erb`**: omits `:remote => true` when `@turbo_frame` (Turbo form submit inside frame)
83
- - [x] Remove `edit.js.erb`, `update.js.erb`, `show_element.js.erb`
84
- - [x] **`not_accessible_through_html?` models** (e.g. Photo): nested list row **`show` / `close`** use **`format.html`** when **`params[:update]`** is a nested row id (`row_html_turbo_allowed?`); field **`edit` / `update` / `show`** already always register **`format.html`**.
85
-
86
- ### Widget re-init after swap
87
-
88
- - [x] ActionText/Trix: `turbo:frame-load` in `inline_forms.js` attaches Trix editors after frame replace
89
- - [x] jQuery UI datepicker / timepicker: re-bound on `turbo:frame-load` (autocomplete widgets in field partials still use inline scripts until Step 5)
90
-
91
- ### Helpers (`app/helpers/inline_forms_helper.rb`)
92
-
93
- - [x] `close_link`, `link_to_soft_delete`, `link_to_destroy`, `link_to_new_record`, `link_to_versions_list`, `close_versions_list_link`: Turbo frame attrs only (**7.8.0**; `turbo_row:` retained for API compat)
94
-
95
- ### Tests
96
-
97
- - [x] Integration: stock row open/close on `/apartments` (Turbo frame + HTML `show` / `close`): `example_app_apartment_row_turbo_test.rb`
98
- - [x] Integration: open apartment row → edit text field → save → cancel (field flow: `example_app_apartment_field_turbo_test.rb`)
99
- - [x] Integration: nested Photo row open/close + name field cancel (`example_app_apartment_photos_pagination_test.rb`)
100
- - [x] Integration: replace photo image (multipart) inside nested frame (`example_app_apartment_photos_pagination_test.rb`)
101
- - [x] Integration: custom field-only page (`ApartmentsController#name_list`) — Turbo edit/update/cancel without full `_show`
102
- - [x] Assert no `406 UnknownFormat` on Turbo field update (name list test)
103
- - [x] Integration: row destroy + PaperTrail revert via Turbo (`example_app_apartment_row_turbo_test.rb`)
104
- - [x] Integration: versions panel open/close via Turbo (`example_app_apartment_versions_turbo_test.rb`)
105
-
106
- ---
107
-
108
- ## Step 4 — Remaining UJS surfaces
109
-
110
- ### Lists and create flow
111
-
112
- - [x] Top-level index: wrap in `<turbo-frame id="apartments_list">`; in-frame pagination (7.7.0)
113
- - [x] `new` / `create`: frame refresh replacing list container (7.7.0)
114
- - [x] Remove `new.js.erb`, `list.js.erb` (7.7.0)
115
- - [x] `_new.html.erb`: Turbo path when `@turbo_frame` (no `:remote` on cancel)
116
-
117
- ### Tree
118
-
119
- - [x] ~~`:tree` / `_tree.html.erb`~~ — **archived in 7.7.0** (`archived/form_elements/tree/`); needs host tree gem/APIs. Turbo-ready partial kept in archive.
120
-
121
- ### Versions panel
122
-
123
- - [x] `VersionsConcern#list_versions`: HTML frame (`versions_panel` / `versions_list_panel`, `turbo_rails/frame` layout) — **7.7.3** drops `format.js`
124
- - [x] Remove `versions.js.erb`, `versions_list.js.erb` (**7.7.3**)
125
- - [x] `_versions_list.html.erb`: revert uses `inline_forms_turbo_link_data` (row frame), not `:remote => true`
126
-
127
- ### Geo / misc
128
-
129
- - [x] ~~`geo_code_curacao`~~ — **archived in 7.6.0** (`archived/form_elements/geo_code_curacao/`). If restored, migrate `list_streets.js.erb` to frame or stream.
130
-
131
- ### Controller cleanup
132
-
133
- - [x] Every action in `InlineFormsController` + `VersionsConcern` has a non-JS response path (**7.8.0** audit)
134
- - [ ] Audit `respond_to` blocks: parallel `format.turbo_stream` where stream is cleaner than full frame (optional)
135
-
136
- ### Tests
137
-
138
- - [x] Top-level list pagination in frame (`example_app_apartment_top_level_pagination_test.rb`)
139
- - [x] Create apartment → list frame updates (`example_app_apartment_top_level_new_test.rb`)
140
- - [x] Versions panel open/close + revert from list (`example_app_apartment_versions_turbo_test.rb`, **7.7.3**)
141
- - [x] Assert zero `data-remote="true"` in rendered HTML for inline_forms flows (helpers + `_new` / `_close` no longer fall back to UJS — **7.8.0**)
142
-
143
- ---
144
-
145
- ## Step 5 — Enable Drive, remove UJS (DONE in **7.8.0**)
146
-
147
- - [x] Remove `Turbo.session.drive = false` from both layouts (Drive default **on**)
148
- - [x] Delete `//= require jquery_ujs` from `inline_forms.js`
149
- - [x] Delete `//= require jquery.remotipart` from `inline_forms.js`
150
- - [x] Delete all `app/views/inline_forms/*.js.erb` (completed by **7.7.3**)
151
- - [x] Remove `format.js` branches from controllers (none remain on stock actions)
152
- - [x] Update `example_app_turbo_layout_test.rb`: refute `Turbo.session.drive = false`
153
- - [x] Full `bundle exec rails test` in `--example` app (before release)
154
-
155
- ### jQuery (optional follow-up — not required to drop UJS)
156
-
157
- These can remain while UJS is gone; separate migration if desired:
158
-
159
- - [ ] `jquery.ui.all` (datepicker)
160
- - [ ] `jquery.timepicker.js`
161
- - [ ] `autocomplete-rails`
162
- - [ ] `foundation` jQuery plugin → consider Foundation JS without jQuery or Stimulus
163
-
164
- ---
165
-
166
- ## Reference — UJS inventory
167
-
168
- ### `*.js.erb` (all to delete by Step 5)
169
-
170
- | File | Effect |
171
- |------|--------|
172
- | `show.js.erb` | Replace row with `_show` |
173
- | `edit.js.erb` | Replace `#update_span` with `_edit` form |
174
- | `update.js.erb` | Replace with `{form_element}_show` |
175
- | `show_element.js.erb` | Single-field show after update |
176
- | `new.js.erb` | Replace with `_new` form |
177
- | `list.js.erb` | Replace list container |
178
- | `close.js.erb` | Fade + `_close` partial |
179
- | `record_destroyed.js.erb` | Fade out row |
180
- | `show_undo.js.erb` | Undo link after destroy |
181
- | ~~`versions.js.erb`~~ | Removed **7.7.3** — versions panel HTML frame |
182
- | ~~`versions_list.js.erb`~~ | Removed **7.7.3** — versions list HTML frame |
183
- | ~~`geo_code_curacao/list_streets.js.erb`~~ | Archived 7.6.0 — street autocomplete JSON |
184
-
185
- ### Controller actions still on `format.js`
186
-
187
- None on `InlineFormsController` / `VersionsConcern` stock actions (**7.8.0**). Host app controllers may still use `format.js`.
188
-
189
- ### Key files
190
-
191
- - `app/controllers/inline_forms_controller.rb`
192
- - `app/controllers/concerns/versions_concern.rb`
193
- - `app/views/inline_forms/_list.html.erb`, `_show.html.erb`, `_edit.html.erb`, `_new.html.erb`
194
- - `app/helpers/inline_forms_helper.rb`
195
- - `app/helpers/form_elements/*.rb` (`*_show` → `link_to_inline_edit`)
196
- - `app/assets/javascripts/inline_forms/inline_forms.js`
197
- - `app/views/layouts/inline_forms.html.erb`
198
-
199
- ---
200
-
201
- ## Custom field-only pages (helper bypass)
202
-
203
- Stock `_show` / `_list` are not required for inline edit. Any page can call form-element helpers (e.g. `text_field_show(apartment, :name)`) inside a container with id `apartment_<id>_name`. Edit/update still hit `ApartmentsController#edit` / `#update` via polymorphic paths.
204
-
205
- Example app **`--example` name list** (`GET /apartments/name_list`): custom page using the **same** turbo-field contract as stock `_show` (not a separate code path). Linked from the **More** menu; regression-tested after stock field Turbo lands.
206
-
207
- </details>
@@ -1,49 +0,0 @@
1
- # Zeitwerk and load paths (inline_forms + validation_hints)
2
-
3
- **Last verified:** 2026-05-22 — `bundle exec rails zeitwerk:check` on a fresh **`inline_forms create MyApp -d sqlite --example`** app (Rails **8.0.5**): **All is good!**
4
-
5
- ## inline_forms engine
6
-
7
- ### Autoloaded by Zeitwerk (host app eager load)
8
-
9
- Under the engine’s `app/` tree:
10
-
11
- - `app/controllers/` — `InlineFormsController`, concerns
12
- - `app/helpers/inline_forms_helper.rb`
13
- - `app/models/concerns/inline_forms/soft_deletable.rb`
14
- - `app/validators/*` — custom validators
15
-
16
- ### Intentionally **not** Zeitwerk-autoloaded
17
-
18
- | Path | Mechanism | Why |
19
- |------|-----------|-----|
20
- | `lib/inline_forms/form_elements/*_helper.rb` | `Rails.autoloaders.main.ignore` + `FormElements.load_helpers!` (`Dir[]` + `require`) | Historical top-level helper method names (`text_field_show`, …); `_helper.rb` filenames do not map to Zeitwerk constants |
21
- | `lib/inline_forms.rb` boot | Explicit `require` of version, registry, `form_elements`, `turbo_tabs_builder`, `archived_form_elements` | Boot order before engine initializers |
22
- | `lib/generators/` | Rails generator autoload | Not part of host app Zeitwerk |
23
- | `archived/form_elements/` | Not required | Legacy project-specific elements; registry blocks use in `inline_forms_attribute_list` |
24
-
25
- Track B migration (7.13.x): moved active elements from `app/helpers/form_elements/*.rb` to `lib/inline_forms/form_elements/*_helper.rb`. See `CHANGELOG.md` (Zeitwerk / form elements).
26
-
27
- ### Nothing left on the old path
28
-
29
- There is **no** `app/helpers/form_elements/` in the shipped gem (only under `archived/`).
30
-
31
- ## validation_hints
32
-
33
- | Path | Mechanism | Why |
34
- |------|-----------|-----|
35
- | `lib/active_model/hints.rb` | Explicit `require` in `lib/validation_hints.rb` | Defines `ActiveModel::Hints` in the `ActiveModel` namespace (collapse); not under `validation_hints/` |
36
- | `lib/validation_hints/validations_patch.rb` | Explicit `require` | Patches applied via `ActiveSupport.on_load(:active_model)` |
37
- | `lib/validation_hints/railtie.rb` | Loaded when `Rails::Railtie` is defined | Standard gem entry |
38
-
39
- Non-Rails use: `require "validation_hints"` loads hints + patch + I18n without Zeitwerk.
40
-
41
- ## Host app checklist
42
-
43
- After upgrading or generating an app:
44
-
45
- ```bash
46
- cd MyApp && rvm use . && bundle exec rails zeitwerk:check
47
- ```
48
-
49
- If you vendor custom form-element helpers into the host app, keep them under `app/helpers/` with Zeitwerk-friendly names or add `config.autoload_lib` / ignores as needed.