actiontext 6.1.6.1 → 7.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -138
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +4 -0
  5. data/app/assets/javascripts/actiontext.js +880 -0
  6. data/app/assets/javascripts/trix.js +5278 -0
  7. data/app/assets/stylesheets/trix.css +375 -0
  8. data/app/helpers/action_text/content_helper.rb +17 -3
  9. data/app/helpers/action_text/tag_helper.rb +5 -7
  10. data/app/models/action_text/encrypted_rich_text.rb +9 -0
  11. data/app/models/action_text/record.rb +1 -1
  12. data/app/models/action_text/rich_text.rb +4 -0
  13. data/app/views/action_text/contents/_content.html.erb +1 -0
  14. data/app/views/layouts/action_text/contents/_content.html.erb +3 -0
  15. data/db/migrate/20180528164100_create_action_text_tables.rb +14 -2
  16. data/lib/action_text/attachable.rb +4 -0
  17. data/lib/action_text/attachment.rb +4 -4
  18. data/lib/action_text/attachment_gallery.rb +14 -9
  19. data/lib/action_text/attachments/caching.rb +1 -1
  20. data/lib/action_text/attachments/minification.rb +1 -1
  21. data/lib/action_text/attribute.rb +18 -2
  22. data/lib/action_text/content.rb +7 -3
  23. data/lib/action_text/encryption.rb +38 -0
  24. data/lib/action_text/engine.rb +14 -0
  25. data/lib/action_text/fixture_set.rb +49 -0
  26. data/lib/action_text/gem_version.rb +4 -4
  27. data/lib/action_text/rendering.rb +1 -1
  28. data/lib/action_text/serialization.rb +0 -2
  29. data/lib/action_text/trix_attachment.rb +3 -3
  30. data/lib/action_text.rb +1 -0
  31. data/lib/generators/action_text/install/install_generator.rb +28 -35
  32. data/lib/generators/action_text/install/templates/actiontext.css +35 -0
  33. data/package.json +13 -3
  34. metadata +28 -23
  35. data/app/views/action_text/content/_layout.html.erb +0 -3
  36. data/lib/generators/action_text/install/templates/actiontext.scss +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2fca8ab7c2135af3d37cc07fa20ab6ac5abbe8d376254b28ffaad65beb593665
4
- data.tar.gz: 5efbb86bd3d688d312326b76c167fe72c6028e832e744fe624c158956dc4a7dc
3
+ metadata.gz: 2f0735e66acca9916e461de2094203f923aab79749a70eb10de2d060d70f7784
4
+ data.tar.gz: e22fa48ba71858e0bd786690fe7521a99a8edde6194db6955cf1a477a3d7a0eb
5
5
  SHA512:
6
- metadata.gz: ceb3ed94c08f629bccacb49717861fdf9a44118730ebaaa1216559c81e91cd6b43cc1ee7415ee55d56d19305cabb4fe86d6e1a9bad0ed2b49eaa32e59f996c1c
7
- data.tar.gz: 16bd241ff0df94d2d8c4c05eb5012f3fc5e1139f476773b1a50be01cf9f786b3097d7d3bf534c113c0e580f20401ddff9cd7b7e17ca42c9d214e9c4a21c51e56
6
+ metadata.gz: 6b5ec0e335aa42817f62436ab55e5b5eba6616ccf7ba562f48dac68faf48af82536f843a3f4b5c6c1a85416aea937a455685bc65125b2c0ea0434a71506e0fc0
7
+ data.tar.gz: d15c8203e48105087852dd8f7dfdba4198cb6e62c9e50b053672ece3d0aafc9c45b127092d2c5c674181b50c8ab687640009d6683f3d4ae30c0bdc2bbc5c8af0
data/CHANGELOG.md CHANGED
@@ -1,153 +1,34 @@
1
- ## Rails 6.1.6.1 (July 12, 2022) ##
1
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
2
2
 
3
- * No changes.
3
+ * Make the Action Text + Trix JavaScript and CSS available through the asset pipeline.
4
4
 
5
+ *DHH*
5
6
 
6
- ## Rails 6.1.5.1 (April 26, 2022) ##
7
+ * OpenSSL constants are now used for Digest computations.
7
8
 
8
- * No changes.
9
+ *Dirkjan Bussink*
9
10
 
10
-
11
- ## Rails 6.1.5 (March 09, 2022) ##
12
-
13
- * Fix Action Text extra trix content wrapper.
14
-
15
- *Alexandre Ruban*
16
-
17
-
18
- ## Rails 6.1.4.7 (March 08, 2022) ##
19
-
20
- * No changes.
21
-
22
-
23
- ## Rails 6.1.4.6 (February 11, 2022) ##
24
-
25
- * No changes.
26
-
27
-
28
- ## Rails 6.1.4.5 (February 11, 2022) ##
29
-
30
- * No changes.
31
-
32
-
33
- ## Rails 6.1.4.4 (December 15, 2021) ##
34
-
35
- * No changes.
36
-
37
-
38
- ## Rails 6.1.4.3 (December 14, 2021) ##
39
-
40
- * No changes.
41
-
42
-
43
- ## Rails 6.1.4.2 (December 14, 2021) ##
44
-
45
- * No changes.
46
-
47
-
48
- ## Rails 6.1.4.1 (August 19, 2021) ##
49
-
50
- * No changes.
51
-
52
-
53
- ## Rails 6.1.4 (June 24, 2021) ##
54
-
55
- * Always render attachment partials as HTML with `:html` format inside trix editor.
56
-
57
- *James Brooks*
58
-
59
-
60
- ## Rails 6.1.3.2 (May 05, 2021) ##
61
-
62
- * No changes.
63
-
64
-
65
- ## Rails 6.1.3.1 (March 26, 2021) ##
66
-
67
- * No changes.
68
-
69
-
70
- ## Rails 6.1.3 (February 17, 2021) ##
71
-
72
- * No changes.
73
-
74
-
75
- ## Rails 6.1.2.1 (February 10, 2021) ##
76
-
77
- * No changes.
78
-
79
-
80
- ## Rails 6.1.2 (February 09, 2021) ##
81
-
82
- * No changes.
83
-
84
-
85
- ## Rails 6.1.1 (January 07, 2021) ##
86
-
87
- * No changes.
88
-
89
-
90
- ## Rails 6.1.0 (December 09, 2020) ##
91
-
92
- * Declare `ActionText::FixtureSet.attachment` to generate an
93
- `<action-text-attachment sgid="..."></action-text-attachment>` element with
94
- a valid `sgid` attribute.
95
-
96
- ```ruby
97
- hello_world_review_content:
98
- record: hello_world (Review)
99
- name: content
100
- body: <p><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</p>
101
- ```
102
-
103
- *Sean Doyle*
104
-
105
- * Locate `fill_in_rich_text_area` by `<label>` text
106
-
107
- In addition to searching for `<trix-editor>` elements with the appropriate
108
- `aria-label` attribute, also support locating elements that match the
109
- corresponding `<label>` element's text.
11
+ * Add support for passing `form:` option to `rich_text_area_tag` and
12
+ `rich_text_area` helpers to specify the `<input type="hidden" form="...">`
13
+ value.
110
14
 
111
15
  *Sean Doyle*
112
16
 
113
- * Be able to add a default value to `rich_text_area`.
17
+ * Add `config.action_text.attachment_tag_name`, to specify the HTML tag that contains attachments.
114
18
 
115
- ```ruby
116
- form.rich_text_area :content, value: "<h1>Hello world</h1>"
117
- #=> <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="<h1>Hello world</h1>">
118
- ```
19
+ *Mark VanLandingham*
119
20
 
120
- *Paulo Ancheta*
21
+ * Expose how we render the HTML _surrounding_ rich text content as an
22
+ extensible `layouts/action_view/contents/_content.html.erb` template to
23
+ encourage user-land customizations, while retaining private API control over how
24
+ the rich text itself is rendered by `action_text/contents/_content.html.erb`
25
+ partial.
121
26
 
122
- * Add method to confirm rich text content existence by adding `?` after rich
123
- text attribute.
124
-
125
- ```ruby
126
- message = Message.create!(body: "<h1>Funny times!</h1>")
127
- message.body? #=> true
128
- ```
129
-
130
- *Kyohei Toyoda*
131
-
132
- * The `fill_in_rich_text_area` system test helper locates a Trix editor
133
- and fills it in with the given HTML.
134
-
135
- ```ruby
136
- # <trix-editor id="message_content" ...></trix-editor>
137
- fill_in_rich_text_area "message_content", with: "Hello <em>world!</em>"
138
-
139
- # <trix-editor placeholder="Your message here" ...></trix-editor>
140
- fill_in_rich_text_area "Your message here", with: "Hello <em>world!</em>"
141
-
142
- # <trix-editor aria-label="Message content" ...></trix-editor>
143
- fill_in_rich_text_area "Message content", with: "Hello <em>world!</em>"
27
+ *Sean Doyle*
144
28
 
145
- # <input id="trix_input_1" name="message[content]" type="hidden">
146
- # <trix-editor input="trix_input_1"></trix-editor>
147
- fill_in_rich_text_area "message[content]", with: "Hello <em>world!</em>"
148
- ```
29
+ * Add `with_all_rich_text` method to eager load all rich text associations on a model at once.
149
30
 
150
- *George Claghorn*
31
+ *Matt Swanson*, *DHH*
151
32
 
152
33
 
153
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actiontext/CHANGELOG.md) for previous changes.
34
+ Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/actiontext/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2022 Basecamp, LLC
3
+ Copyright (c) 2020-2021 Basecamp, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -4,6 +4,10 @@ Action Text brings rich text content and editing to Rails. It includes the [Trix
4
4
 
5
5
  You can read more about Action Text in the [Action Text Overview](https://edgeguides.rubyonrails.org/action_text_overview.html) guide.
6
6
 
7
+ ## Development
8
+
9
+ The JavaScript for Action Text is distributed both as a npm module under @rails/actiontext and via the asset pipeline as actiontext.js (and we mirror Trix as trix.js). To ensure that the latter remains in sync, you must run `yarn build` and checkin the artifacts whenever the JavaScript source or the Trix dependency is bumped. CSS changes must be brought over manually to app/assets/stylesheets/trix.css
10
+
7
11
  ## License
8
12
 
9
13
  Action Text is released under the [MIT License](https://opensource.org/licenses/MIT).