Draft
Conversation
6cdaebb to
3fe165a
Compare
1f65f1d to
429b63b
Compare
429b63b to
b9efc5b
Compare
c5712f5 to
6921c3e
Compare
In an effort to absorb responsibilities from `@rails/actiontext` (namely the [app/javascript/actiontext/index.js][] and [app/javascript/actiontext/attachment_upload.js][] files), this commit introduces a new `trix/actiontext` file that the build process will output to be consumable from the `action_text-trix` engine's asset directory. The `trix/actiontext` module will depend on two in-browser dependencies: * `trix` expected to be imported separately * `@rails/activestorage` expected to available for import. Since there is a direct dependency on `@rails/activestorage` through the `@rails/acitontext` package, the dependency will dependably (😉) be present. In support of this change, this commit also expands the system test coverage introduced by [basecamp#1258][] to also account for `direct-upload:`-prefixed events dispatched during file uploads. [app/javascript/actiontext/index.js]: https://github.com/rails/rails/blob/v8.0.3/actiontext/app/javascript/actiontext/index.js [app/javascript/actiontext/attachment_upload.js]: https://github.com/rails/rails/blob/v8.0.3/actiontext/app/javascript/actiontext/attachment_upload.js [basecamp#1258]: basecamp#1258
6921c3e to
a2d2c95
Compare
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.
Proposal
In an effort to absorb responsibilities from
@rails/actiontext(namelythe app/javascript/actiontext/index.js and
app/javascript/actiontext/attachment_upload.js files), this commit
introduces a new
trix/actiontextfile that the build process willoutput to be consumable from the
action_text-trixengine's assetdirectory.
The
trix/actiontextmodule will depend on two in-browser dependencies:trixexpected to be imported separately@rails/activestorageexpected to available for import. Since thereis a direct dependency on
@rails/activestoragethrough the@rails/acitontextpackage, the dependency will dependably (😉) bepresent.
In support of this change, this commit also expands the system test
coverage introduced by #1258 to also account for
direct-upload:-prefixed events dispatched during file uploads.Release strategy
This change should not be part of a release until the corresponding event listener in app/javascript/actiontext/index.js (as part of
rails/rails) is removed.I defer on the rest of the maintenance team to coordinate the switch with the
rails/railsmaintenance team. I suggest that this package introduce the change and rails/rails add conditional logic or guidance to include constraints on the package version, rather than the other way around. I suspect that this package is more regularly release and has more flexibility than its upstream counterpart.Once introduced, this
trix/actiontextmodule (and the correspondingtest/system/**/*_test.rbcoverage could serve as a replacement for CI's upstreamgit checkoutand code coverage.