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

Make useBlockLock() public #55092

Open
jdamner opened this issue Oct 5, 2023 · 4 comments
Open

Make useBlockLock() public #55092

jdamner opened this issue Oct 5, 2023 · 4 comments
Labels
[Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Enhancement A suggestion for improvement.

Comments

@jdamner
Copy link

jdamner commented Oct 5, 2023

What problem does this address?

Using blockEditor.useSetting.before filter to apply customisation to block settings and I was trying to restrict certain block properties depending on if the block was locked or not.

If useBlockLock() was public, I could use that instead I've had to replicate the method in my own codebase which also means I'll need to watch for any changes/maintenance.

What is your proposed solution?

Export useBlockLock() for use by plugin developers - simple

@youknowriad
Copy link
Contributor

youknowriad commented Oct 5, 2023

Hi there! thanks for the suggestion. What exactly do you need from useBlockLock. Looking at its code, it's just a collection of selector calls and all of these are public already.

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Feature] Block API API that allows to express the block paradigm. [Status] Needs More Info Follow-up required in order to be actionable. labels Oct 9, 2023
@jdamner
Copy link
Author

jdamner commented Oct 11, 2023

Yeah, I used the selectors so it's not a big issue but now if the locked block selectors change I need to maintain my version and I fail to benefit from any upstream changes.

I was trying to disable some block settings depending if the block was locked or not. For example, disabling background colour on locked blocks, since at the moment locking only prevents moving or removing.

@github-actions
Copy link

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Oct 27, 2023
@gziolo gziolo removed the [Feature] Block API API that allows to express the block paradigm. label Nov 24, 2023
@github-actions github-actions bot removed the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Nov 25, 2023
Copy link

Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks.

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs More Info Follow-up required in order to be actionable. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants