Re: Packaging JS Trix editor for rubygem-actiontext
Vít Ondruch <[email protected]>
| Newsgroups | gmane.linux.redhat.fedora.devel |
|---|---|
| Message-ID | <[email protected]> |
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 > > > -- _______________________________________________ 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
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEjuEMC4xF8PxsGhoUDOCe55kXuHwFAmpD8TYFAwAAAAAACgkQDOCe55kXuHwh yRAAlsxndqst8EdvtpPdyg6DPmEjNz1WaZx3H+GO3xqdbefBNt5cy9pCz9PcWbITVkmG6uOqA3kt nP0AxIaQxO/2c0nknyrlkPdP/i1atBq72gnCGRP4M78+ipaXj8CVC1o9INuQ1cZyk+xJdhz0BUaA m0UdvsXHlYqjUkgmtFpW/Ed5C+fAnEOG+Qt/aEFbDYSvrZbTQq0j3Vamk6TJwFdcI1JiTKnMvRt6 BxYdDprbZczUEItjL8KH/mJst2UZWaMd/Mgk0/S715evcKBzrbYazuX0dlD6W68JsinLciia4eRN wk/y81TsPf308E/QBGpEPtgD8JbM8eH6ldg/OFVd4Vcikcvf7wtfSmU5DCcz+vaobFOcc3F00jX2 MZ8ez17lTO5nME5IFc641NOxQWwWOSgu6DnGKhvvEuDZ66PNBKbs5diZ6avUIDZc/v4izGTQJy+R qzBFUd/MFPcVp/KOVM+URX2wAuYlkI568XOkcLdtqwxl/FmyzAM8XcLkAyJ6znVw57/nUrK128wr ZbAtNrOyH4/oSINdTCRR77g1+rW9qGnqeScR0FujYdNpm2/B5SvR9ELdue4Ayjs37ZQIIwBE9ig8 LKl5gd9jKA93LTdlXpsAlFvgGDB/HzieTylNAE0z2p5nfNg2fJEly8fgX0J/DWtYOw6g0dHapbeG 7j0= =MgdU -----END PGP SIGNATURE-----