Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with Volto experimental add mode #87

Open
rotavio opened this issue Oct 31, 2023 · 3 comments
Open

Not compatible with Volto experimental add mode #87

rotavio opened this issue Oct 31, 2023 · 3 comments

Comments

@rotavio
Copy link

rotavio commented Oct 31, 2023

Volto added a new experimental feature, which enables the add block button on any selected block.

https://6.docs.plone.org/volto/configuration/experimental.html?highlight=experimental

Would it be possible to add this feature on the blocks inside a Columns block?

image

Thank you very much!

@avoinea
Copy link
Member

avoinea commented Dec 7, 2024

@rotavio Now that we have this plus button în Volto 18.x, yes, we should 🤔

@rotavio
Copy link
Author

rotavio commented Dec 12, 2024

The major problem was that we can only add new blocks below empty text blocks, and have to manually remove the text afterwards.
I`ve found out later that this is coded into volto by design, and not a bug. In your block, there is a condition like this:

 {!disableNewBlocks && !blockHasValue(data) && (
                <Button
                  icon
                  basic
                  title="Add block"
                  onClick={() => {
                    this.setState({
                      addNewBlockOpened: !this.state.addNewBlockOpened,
                    });
                  }}
                  className="column-block-add-button"
                >
                  <Icon name={addSVG} className="" size="19px" />
                </Button>
              )}

We customizes it to remove the second condition and now the add butto appears for every block.

@rotavio
Copy link
Author

rotavio commented Dec 12, 2024

In Volto 18, there are other problems, like the new Order tab on the toolbar, it can`t see the blocks inside columns and gets broken.

And another one is the new blocks validation on save. Blocks inside columns does not seem to be validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants