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

Blocks API: define a way for blocks to specify they can occur only once #1465

Closed
mtias opened this issue Jun 26, 2017 · 3 comments · Fixed by #1661
Closed

Blocks API: define a way for blocks to specify they can occur only once #1465

mtias opened this issue Jun 26, 2017 · 3 comments · Fixed by #1661
Assignees
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@mtias
Copy link
Member

mtias commented Jun 26, 2017

Some blocks should only be used once in a single post (the "more" block, the "excerpt", etc). A block should have a way of stating that in the registration.

@mtias mtias added [Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take labels Jun 26, 2017
@mtias mtias modified the milestone: Beta 3 Jun 26, 2017
@mtias
Copy link
Member Author

mtias commented Jun 26, 2017

As part of this, the inserter should be aware of blocks that can only be used once, and have already been inserted (either removing or showing as disabled, maybe scrolling to the already inserted block if you click on it).

@paulwilde
Copy link
Contributor

See also my comment #1288 (comment) regarding the same idea. It'd be nice if it wasn't necessarily a single item or infinite, but a customisable amount.

@swissspidy
Copy link
Member

As a followup to this:

  • We should experiment with specifying different limits, not just "use once"
  • What happens if a post already contains multiple blocks of the same type, exceeding the limit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
4 participants