administrate icon indicating copy to clipboard operation
administrate copied to clipboard

Add RichText field type

Open littleforest opened this issue 1 year ago • 8 comments

This adds a RichText field type, completing the work started in #1660.

Screen Shot 2023-08-04 at 2 31 18 PM Screen Shot 2023-08-04 at 2 36 09 PM

The bullets and numbers aren't showing up in the edit view due to the styling. And the quote does not show up in the show view, I'm assuming also due to styling. Will look into tweaking our CSS so it works better in the demo app.

littleforest avatar Aug 04 '23 21:08 littleforest

Will look into the failing tests, some of them are not failing for me locally :(

littleforest avatar Aug 04 '23 22:08 littleforest

I had a look. It appears to be order-dependent.

Specifically, when I run en example from spec/generators/routes_generator_spec.rb first, followed by spec/administrate/views/fields/rich_text/_form_spec.rb, the latter fails. Looking into it a bit more, I have narrowed it down to the reset_routes call in the after hook, and in turn to the Rails.application.routes.clear! within it:

https://github.com/thoughtbot/administrate/blob/852b62c73080c78fe219704b45b7dff3ba6e2f94/spec/support/generator_spec_helpers.rb#L38-L41

So it looks that, whatever happens there, it deletes the rails_direct_upload_url helper, making the example fail.

Thoughts?

pablobm avatar Aug 25 '23 16:08 pablobm

Are we planning to release this anytime soon - Need this badly for actiontext

santosh-1987 avatar Dec 11 '23 18:12 santosh-1987

@littleforest, are you able to pick up from @seanpdoyle's comments here?

(If not, I can do so!)

nickcharlton avatar Dec 12 '23 16:12 nickcharlton

@nickcharlton I will see if I can find time to work on this second week of January. Might go faster if I can find time to pair with you or @seanpdoyle .

littleforest avatar Dec 22 '23 23:12 littleforest

@littleforest, sorry, only getting back to this one now. How did you get on? Feel free to drop some time on my calendar if you've like to pair on this.

nickcharlton avatar Jan 15 '24 16:01 nickcharlton

@littleforest the asset changes merged as part of https://github.com/thoughtbot/administrate/pull/2397 have introduced merge conflicts.

If you're interested, I'm willing to give resolving those conflicts a try and force-pushing to this branch.

If not, and you'd rather handle that yourself, that's great too!

seanpdoyle avatar Feb 14 '24 00:02 seanpdoyle

I'm willing to give resolving those conflicts a try and force-pushing to this branch

That would be amazing! Thank you.

littleforest avatar Feb 14 '24 00:02 littleforest

@seanpdoyle @nickcharlton @pablobm this is ready for re-review.

littleforest avatar Apr 26 '24 21:04 littleforest

I've just rebased, and I'll let the tests run before merging this in.

For those following along, it'll go out with our next v1.0 beta release, which I hope to do soon, but I'm behind things at the moment so it might be a while.

nickcharlton avatar Jun 05 '24 12:06 nickcharlton

Bundle audit is failing because of a security vulnerability in actiontext that we've not merged yet.

nickcharlton avatar Jun 05 '24 13:06 nickcharlton

And merged. Thanks @sedubois for the original work, and @littleforest for consistently pushing this through!

nickcharlton avatar Jun 05 '24 13:06 nickcharlton