plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
428 stars 573 forks source link

Remove draftJS (and related legacy blocks `text`, `table` and `hero`) from core and cleanup dependencies #5846

Closed sneridagh closed 2 months ago

sneridagh commented 2 months ago

@plone/volto-team We promised that we will remove draftJS in Volto 18. This entails also remove all the related blocks, and unfortunately, the hero block is also affected. There is a related PR for it, but I'd like to move it out of core. If someone misses what the hero block provided, the teaser block can be a replacement, although it does not have the "local" feature, nor the rich text in the description. It's easy to make it an add-on, so if someone really needs it, I'd say it's better than have the burden of maintain it in core (as now it's happening).

I'd like to have feedback about this though...

netlify[bot] commented 2 months ago

Deploy Preview for plone-components ready!

Name Link
Latest commit 8e3990ba9dc3e8baa1b9d914e2367caa3d554645
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/65e86753da221200082bb560
Deploy Preview https://deploy-preview-5846--plone-components.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 2 months ago

Deploy Preview for volto ready!

Name Link
Latest commit 8e3990ba9dc3e8baa1b9d914e2367caa3d554645
Latest deploy log https://app.netlify.com/sites/volto/deploys/65e867530ac21600084c1fcc
Deploy Preview https://deploy-preview-5846--volto.netlify.app/upgrade-guide/index.html
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

davisagli commented 2 months ago

@sneridagh Also, CI is failing due to out of date lockfile

davisagli commented 2 months ago

There's also some draftjs-related code to remove here: https://github.com/plone/volto/blob/7995bfcc45701389ce2f2b267c0069cbd021390f/packages/volto-slate/src/blocks/Text/index.js#L136

sneridagh commented 2 months ago

Yes, this one still needs polishments

stevepiercy commented 2 months ago

There is one instance that should have been updated a while ago, but was overlooked: https://6.docs.plone.org/volto/configuration/settings-reference.html#term-defaultBlockType

All other mentions of "draftjs", "draft.js", and "draft js" are in the upgrade guide, release notes, and the volto-slate block discussion of why draft.js was kicked to the curb. These are fine.

stevepiercy commented 2 months ago

Should it be mentioned in the upgrade guide?

@davisagli this exists: volto-slate is now in core.

I don't think it needs to be repeated in the upgrade guide.

ichim-david commented 2 months ago

@plone/volto-team We promised that we will remove draftJS in Volto 18. This entails also remove all the related blocks, and unfortunately, the hero block is also affected. There is a related PR for it, but I'd like to move it out of core. If someone misses what the hero block provided, the teaser block can be a replacement, although it does not have the "local" feature, nor the rich text in the description. It's easy to make it an add-on, so if someone really needs it, I'd say it's better than have the burden of maintain it in core (as now it's happening).

I'd like to have feedback about this though...

@sneridagh we have our own hero block and I'm sure everyone has their own flavour that would be fine to use as long as we decrease the bundle size of Volto 18 and we get rid of some of these legacy items that were signaled as to be removed. So I'm plus one on chopping the hero block if it means less work.

sneridagh commented 2 months ago

@stevepiercy a last check?

stevepiercy commented 2 months ago

Oh, shoot, we forgot this: https://6.docs.plone.org/volto/configuration/settings-reference.html#term-defaultBlockType. Can someone make a PR to fix that? It needs new information for the slate block.