focalboard
focalboard copied to clipboard
Adding the new blocks based editor
Summary
This adds the new blocks based editor behind a feautre flag.
There are still a lot of improvements to do, but for now it supports, drag and drop, different block types (h1, h2, h3, video, attachment, images, dividers, list items, checkboxes and quotes)
To try it you have to restart your mattermost-server with the feature flag that enables it, like this: env MM_FEATUREFLAGS_BOARDSFEATUREFLAGS=newBoardsEditor make restart-server
Some pending improvements are:
- nicer look and feel
- better handling of arrow keys on multi line markdowns
- more and better shortcuts
- add a lot of testing
- Replace with the new rich text editor (expected to be release after the mattercon)
IMPORTANT NOTE: This is a prototype behind a feature flag to keep iterating over it, don't expect the code to be perfect or something like that. This is going to be a bit unstable for now, but that is ok because is behind the feature flag.
Ticket Link
Not yet
@wiggin77 Here is the new API to move things. Probably we would need to have a better "content" api, something like "Add content" with an "after" or "before" parameter would insert the block and properly possition it.
@jespino whats the plan for this? Its this only an experiment or do we want to switch to the new editor? What are the requirements? What are the expected behaviors? I'm asking because this is a huge PR requiring substantial effort in reviewing and testing.
Also the CI is failing. Can we at lest get that working before review?
The intention is to end up merging it as part of the product, for now behind a feature flag. And yes, there are things to fix, like the ci, adding more tests or fixing ToDos, it is not strictly needed a detailed review for all the people in the reviewers list, i added that people to get general opinions, feel free to no review it for now. I'll fix some details today anyway.
@harshilsharma63 CI is passing now, still some TODOs to fix, but if you want to can take a look, as I said, most of it is not going to hit production for now, it is just behind a feature flag, so, I would focus on the part that affects the rest of the code (outside the blocksEditor directory).
/update-branch
/update-branch
Error trying to update the PR. Please do it manually.
@harshilsharma63 @wiggin77 do you mind to give it a last pass to merge it into main branch? Remember, all this is behind a feature flag, so we shouldn't be too worried about this being perfect.
webapp/src/components/blocksEditor/blocks/list-item/list-item.scss
is an empty file that was added. Can this be deleted? Same with webapp/src/components/blocksEditor/blocks/text-dev/text.scss
webapp/src/components/blocksEditor/blocks/list-item/list-item.scss
is an empty file that was added. Can this be deleted? Same withwebapp/src/components/blocksEditor/blocks/text-dev/text.scss
@wiggin77 this is just a placeholder just in case we add it later. But I don't mind removing it.
@wiggin77 Probably video is going to be refactored before we remove the feature flag, I don't see a problem there.