Dne 19. 05. 26 v 18:31 Vít Ondruch napsal(a):
Hi all,

working on updating of Ruby on Rails to version 8.1, I need a help with bundled JS. The issues is that originally, rubygem-actiontext used to bundle Trix editor. We treated it as a bundled dependency:

https://src.fedoraproject.org/rpms/rubygem-actiontext/blob/daaba35292a1a7d6845e2ce8c65298f2263ffc4a/f/rubygem-actiontext.spec#_53

and the functionality was (presumably) covered by the actiontext test suite. However, upstream has decided to split Trix into independent gem. The gem is now part of the Trix code base:

https://github.com/basecamp/trix/tree/main/action_text-trix

and it is more or less just empty shell containing 500 kB Rollup compiled Trix JS. The question is how much I should care about?

In ideal world, I should create nodejs-trix package, there should also be js- subpackage and possibly also webassets package, because ultimately Trix will be used in browser. But that all seems to be a lot of hustle for something which I am afraid will (likely) be used by (only) rubygem-actiontext. So what is the right balance?

It is clear that I have to create the rubygem-action_text-trix package.

1) And I could still treat the Trix there as a bundled JS.


Mulling over this for more then a month, I think I'll stick with bundling.


The main reason is that I don't see that independent nodejs-trix package would really bring anything.

If the Node.js packages somehow mandated / allowed rebuild of the .js files from the source, that would be a thing. But it essentially says have a tarball and whatever is there copy somewhere else.

Then there is some `node_modules` directory, supposedly containing the runtime dependencies. But code is already embedded in the `dist/*.js` files. So what would be the purpose of having this directory around? It justduplicates the code, nothing else.

Yes, I could execute some test suite, but unfortunately, that is essentially executed above different code. It uses the "real" source code processed by Rollup.

And will there be another users of the `Trix` editor? I am skeptical.


This is sad story :/



Vít



2) I can create at minimum the nodejs-trix (see attachment), which actually allows to execute the upstream test suite.

3) Maybe the nodejs-trix could be subpackage of rubygem-action_text-trix.

4) Only the relevant Node.js package bits can be used to make sure the license / .js are correct and test suite executed without even creating the nodejs- subpackage at all.

Any thoughts? Does e.g. anybody see any usage of Trix beyond Ruby on Rails?


BTW I suspect that in the future, Trix might be replaced by Lexxy in Rails:

https://dev.37signals.com/announcing-lexxy-a-new-rich-text-editor-for-rails/

https://github.com/basecamp/lexxy/




Thanks


Vít



Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to