inline_forms 8.1.19 → 8.1.21
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/archived/README.md +1 -0
- data/archived/form_elements/ckeditor/README.md +26 -0
- data/lib/inline_forms/archived_form_elements.rb +10 -0
- data/lib/inline_forms/form_element_registry.rb +0 -2
- data/lib/inline_forms/version.rb +1 -1
- data/lib/inline_forms.rb +0 -1
- data/test/archived_form_elements_test.rb +30 -0
- data/test/form_element_from_callee_test.rb +2 -2
- metadata +4 -3
- /data/{lib → archived/form_elements/ckeditor/lib}/inline_forms/form_elements/ckeditor_helper.rb +0 -0
- /data/{lib → archived/form_elements/ckeditor/lib}/inline_forms/form_elements/text_area_without_ckeditor_helper.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dcda1708a5210f445c14024312d495fe28821927ccc6fb816f410110c47190e0
|
|
4
|
+
data.tar.gz: 7d47792cc13d0423639152ee2005287b369f4e1cf542e4195e4b92b027e5bf93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ba52c31b810465c24b2c5e4d63cee7aaca6e424a1a436ead90d2c7e90a4a13fcfb9c67fbd9cb3f04459c5be9ec4b5604088491fdc8b92f909df32f973c6bc37
|
|
7
|
+
data.tar.gz: d96895cd2923769b62a597c5ad7bf26446180cfd8b2d2bfafa17c6c48cfa2f6f564063cd1b15e2340a94026c6d360db423f14244389d3d60b831c9a9d4fdc258
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [8.1.21] - 2026-06-03
|
|
8
|
+
|
|
9
|
+
### Removed
|
|
10
|
+
|
|
11
|
+
- **CKEditor-era form elements `:ckeditor` and `:text_area_without_ckeditor`.** These were legacy aliases (delegating to `:rich_text` and `:plain_text` respectively) kept since CKEditor was dropped in 7.3.0. Models still declaring either symbol now raise `InlineForms::ArchivedFormElementError` at boot. Migrate to `:rich_text` (ActionText) or `:plain_text` / `:plain_text_area`. Source lives under `archived/form_elements/ckeditor/`.
|
|
12
|
+
|
|
13
|
+
## [8.1.20] - 2026-05-29
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **`price` and `amount` showcase labels now render a non-empty validation-hint tooltip, like `count`.** On the `FormElementShowcase` show panel the `price` (`decimal_field`, bare `validates :price, numericality: true`) and `amount` (`money_field`, money-rails `monetize :amount_cents`) labels rendered the `has-tip` trigger but an **empty** `validation-hints-source` div, so hovering showed nothing. The root cause was a dead-code bug in the companion **validation_hints 8.1.20** gem: a bare `numericality: true` emitted zero hint messages (the `numericality.must_be_a_number` base key was computed but then skipped). With validation_hints fixed, `price` now shows `["must be a number"]`, and money-rails' `MoneyValidator` on `:amount` now maps to a new `"must be a valid amount"` hint. `count` is unchanged behaviorally but now also lists `"must be a number"` ahead of `"must be an integer"`; `latitude`/`longitude` range hints are likewise prefixed with `"must be a number"`.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **`decimal_field` / `money_field` edit inputs deliberately remain `text_field_tag` (not `number_field_tag`).** `integer_field_edit` uses `number_field_tag` (`<input type="number">`, which adds browser-native validation popups on bad input), but switching `decimal_field`/`money_field` to a numeric input is unsafe: a strict `type="number"` rejects valid fixed-point decimals rendered via `BigDecimal#to_s("F")` and the money-rails currency string forms (`"99.95"`, grouped/symbol input). Cross-field consistency for malformed input is instead provided by the server-side validation hint (label tooltip) + the 8.1.19 "edit stays open on a failed save" behavior, which is retained.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **Regression test:** `example_app_showcase_validation_hints_test.rb` GETs the `FormElementShowcase` "Hints demo" show panel and asserts the hidden `validation-hints-source` div for `count`, `price`, and `amount` each contains a populated `<ul class="validation-hints-list">` (e.g. `"must be a number"` for `price`, `"must be a valid amount"` for `amount`) — i.e. not the empty source div the pre-8.1.20 bug produced.
|
|
26
|
+
|
|
7
27
|
## [8.1.19] - 2026-05-28
|
|
8
28
|
|
|
9
29
|
### Fixed
|
data/archived/README.md
CHANGED
|
@@ -11,6 +11,7 @@ This directory is the **versioned archive** for inline_forms capabilities that a
|
|
|
11
11
|
| `:kansen_slider` | **Archived** | **7.6.0** | [`form_elements/kansen_slider/`](form_elements/kansen_slider/) |
|
|
12
12
|
| `:tree`, `:move` | **Archived** | **7.7.0** | [`form_elements/tree/`](form_elements/tree/) — host `#children`, `#hash_tree_to_collection`, `#add_child` |
|
|
13
13
|
| `:absence_list` | **Removed** (source not in repo) | **6.3.0** | See [CHANGELOG](../CHANGELOG.md#630---2026-05-03); vendor from git history or app copy |
|
|
14
|
+
| `:ckeditor`, `:text_area_without_ckeditor` | **Archived** | **8.1.21** | [`form_elements/ckeditor/`](form_elements/ckeditor/) — use `:rich_text` or `:plain_text` / `:plain_text_area` |
|
|
14
15
|
|
|
15
16
|
Programmatic registry: `InlineForms::ARCHIVED_FORM_ELEMENTS` in `lib/inline_forms.rb` (boot-time check if a model still declares an archived symbol).
|
|
16
17
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# CKEditor-era form elements (archived)
|
|
2
|
+
|
|
3
|
+
**Archived in gem version:** 8.1.21
|
|
4
|
+
**Reason:** CKEditor was removed in 7.3.0; these symbols were thin legacy aliases kept for backward compatibility.
|
|
5
|
+
|
|
6
|
+
| Symbol | Was | Use instead |
|
|
7
|
+
|--------|-----|-------------|
|
|
8
|
+
| `:ckeditor` | Delegated to `:rich_text` | `:rich_text` (ActionText / Trix) |
|
|
9
|
+
| `:text_area_without_ckeditor` | Delegated to `:plain_text` | `:plain_text` or `:plain_text_area` |
|
|
10
|
+
|
|
11
|
+
## Restore
|
|
12
|
+
|
|
13
|
+
Copy helpers back into the gem:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cp archived/form_elements/ckeditor/lib/inline_forms/form_elements/ckeditor_helper.rb \
|
|
17
|
+
lib/inline_forms/form_elements/
|
|
18
|
+
cp archived/form_elements/ckeditor/lib/inline_forms/form_elements/text_area_without_ckeditor_helper.rb \
|
|
19
|
+
lib/inline_forms/form_elements/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Re-add registry entries in `lib/inline_forms/form_element_registry.rb` and remove the symbols from `InlineForms::ARCHIVED_FORM_ELEMENTS`.
|
|
23
|
+
|
|
24
|
+
## Turbo
|
|
25
|
+
|
|
26
|
+
No special Turbo concerns; these were delegators to `:rich_text` and `:plain_text`.
|
|
@@ -45,6 +45,16 @@ module InlineForms
|
|
|
45
45
|
archive_path: nil,
|
|
46
46
|
summary: "Project-specific absence list UI; removed without a copy in this repo (see CHANGELOG 6.3.0).",
|
|
47
47
|
},
|
|
48
|
+
ckeditor: {
|
|
49
|
+
archived_in_version: "8.1.21",
|
|
50
|
+
archive_path: "archived/form_elements/ckeditor",
|
|
51
|
+
summary: "Legacy CKEditor form element; use :rich_text (ActionText) instead.",
|
|
52
|
+
},
|
|
53
|
+
text_area_without_ckeditor: {
|
|
54
|
+
archived_in_version: "8.1.21",
|
|
55
|
+
archive_path: "archived/form_elements/ckeditor",
|
|
56
|
+
summary: "Legacy plain-text alias; use :plain_text or :plain_text_area instead.",
|
|
57
|
+
},
|
|
48
58
|
}.freeze
|
|
49
59
|
|
|
50
60
|
def self.validate_no_archived_form_elements_for!(klass)
|
|
@@ -6,7 +6,6 @@ module InlineForms
|
|
|
6
6
|
:audio_field => :string,
|
|
7
7
|
:check_box => :boolean,
|
|
8
8
|
:check_list => :no_migration,
|
|
9
|
-
:ckeditor => :text,
|
|
10
9
|
:date_select => :date,
|
|
11
10
|
:decimal_field => :decimal,
|
|
12
11
|
:devise_password_field => :string,
|
|
@@ -34,7 +33,6 @@ module InlineForms
|
|
|
34
33
|
:simple_file_field => :string,
|
|
35
34
|
:slider_with_values => :integer,
|
|
36
35
|
:text_area => :text,
|
|
37
|
-
:text_area_without_ckeditor => :text,
|
|
38
36
|
:text_field => :string,
|
|
39
37
|
:time_select => :time,
|
|
40
38
|
}.freeze
|
data/lib/inline_forms/version.rb
CHANGED
data/lib/inline_forms.rb
CHANGED
|
@@ -16,6 +16,18 @@ class ArchivedFormElementsTest < Minitest::Test
|
|
|
16
16
|
end
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
class ModelWithArchivedCkeditor
|
|
20
|
+
def inline_forms_attribute_list
|
|
21
|
+
[[:body, :ckeditor]]
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class ModelWithArchivedTextAreaWithoutCkeditor
|
|
26
|
+
def inline_forms_attribute_list
|
|
27
|
+
[[:notes, :text_area_without_ckeditor]]
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
19
31
|
def test_raises_when_model_declares_archived_geo_code_curacao
|
|
20
32
|
err = assert_raises(InlineForms::ArchivedFormElementError) do
|
|
21
33
|
InlineForms.validate_no_archived_form_elements_for!(ModelWithArchivedElement)
|
|
@@ -33,6 +45,24 @@ class ArchivedFormElementsTest < Minitest::Test
|
|
|
33
45
|
assert_includes err.message, "archived/form_elements/tree"
|
|
34
46
|
end
|
|
35
47
|
|
|
48
|
+
def test_raises_when_model_declares_archived_ckeditor
|
|
49
|
+
err = assert_raises(InlineForms::ArchivedFormElementError) do
|
|
50
|
+
InlineForms.validate_no_archived_form_elements_for!(ModelWithArchivedCkeditor)
|
|
51
|
+
end
|
|
52
|
+
assert_includes err.message, "ckeditor"
|
|
53
|
+
assert_includes err.message, "8.1.21"
|
|
54
|
+
assert_includes err.message, "archived/form_elements/ckeditor"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def test_raises_when_model_declares_archived_text_area_without_ckeditor
|
|
58
|
+
err = assert_raises(InlineForms::ArchivedFormElementError) do
|
|
59
|
+
InlineForms.validate_no_archived_form_elements_for!(ModelWithArchivedTextAreaWithoutCkeditor)
|
|
60
|
+
end
|
|
61
|
+
assert_includes err.message, "text_area_without_ckeditor"
|
|
62
|
+
assert_includes err.message, "8.1.21"
|
|
63
|
+
assert_includes err.message, "archived/form_elements/ckeditor"
|
|
64
|
+
end
|
|
65
|
+
|
|
36
66
|
def test_archived_registry_documents_absence_list_without_path
|
|
37
67
|
meta = InlineForms::ARCHIVED_FORM_ELEMENTS[:absence_list]
|
|
38
68
|
assert_equal "6.3.0", meta[:removed_in_version]
|
|
@@ -45,9 +45,9 @@ class FormElementFromCalleeTest < Minitest::Test
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def test_multi_word_element_name_underscores_preserved
|
|
48
|
-
got = InlineForms.form_element_string_from_callee(:
|
|
48
|
+
got = InlineForms.form_element_string_from_callee(:dropdown_with_values_show)
|
|
49
49
|
assert_equal(
|
|
50
|
-
"
|
|
50
|
+
"dropdown_with_values",
|
|
51
51
|
got,
|
|
52
52
|
"Form element names with underscores must survive unchanged except for _show."
|
|
53
53
|
)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inline_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 8.1.
|
|
4
|
+
version: 8.1.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
@@ -480,6 +480,9 @@ files:
|
|
|
480
480
|
- archived/form_elements/chicas/app/helpers/form_elements/chicas_dropdown_with_family_members.rb
|
|
481
481
|
- archived/form_elements/chicas/app/helpers/form_elements/chicas_family_photo_list.rb
|
|
482
482
|
- archived/form_elements/chicas/app/helpers/form_elements/chicas_photo_list.rb
|
|
483
|
+
- archived/form_elements/ckeditor/README.md
|
|
484
|
+
- archived/form_elements/ckeditor/lib/inline_forms/form_elements/ckeditor_helper.rb
|
|
485
|
+
- archived/form_elements/ckeditor/lib/inline_forms/form_elements/text_area_without_ckeditor_helper.rb
|
|
483
486
|
- archived/form_elements/geo_code_curacao/README.md
|
|
484
487
|
- archived/form_elements/geo_code_curacao/app/controllers/geo_code_curacao_controller.rb
|
|
485
488
|
- archived/form_elements/geo_code_curacao/app/helpers/form_elements/geo_code_curacao.rb
|
|
@@ -514,7 +517,6 @@ files:
|
|
|
514
517
|
- lib/inline_forms/form_elements/audio_field_helper.rb
|
|
515
518
|
- lib/inline_forms/form_elements/check_box_helper.rb
|
|
516
519
|
- lib/inline_forms/form_elements/check_list_helper.rb
|
|
517
|
-
- lib/inline_forms/form_elements/ckeditor_helper.rb
|
|
518
520
|
- lib/inline_forms/form_elements/date_helper.rb
|
|
519
521
|
- lib/inline_forms/form_elements/decimal_field_helper.rb
|
|
520
522
|
- lib/inline_forms/form_elements/devise_password_field_helper.rb
|
|
@@ -546,7 +548,6 @@ files:
|
|
|
546
548
|
- lib/inline_forms/form_elements/simple_file_field_helper.rb
|
|
547
549
|
- lib/inline_forms/form_elements/slider_with_values_helper.rb
|
|
548
550
|
- lib/inline_forms/form_elements/text_area_helper.rb
|
|
549
|
-
- lib/inline_forms/form_elements/text_area_without_ckeditor_helper.rb
|
|
550
551
|
- lib/inline_forms/form_elements/text_field_helper.rb
|
|
551
552
|
- lib/inline_forms/form_elements/time_helper.rb
|
|
552
553
|
- lib/inline_forms/gem_files.rb
|
/data/{lib → archived/form_elements/ckeditor/lib}/inline_forms/form_elements/ckeditor_helper.rb
RENAMED
|
File without changes
|
|
File without changes
|