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

Editor: Stop exposing internal components starting with underscore #8421

Closed
gziolo opened this issue Aug 3, 2018 · 5 comments
Closed

Editor: Stop exposing internal components starting with underscore #8421

gziolo opened this issue Aug 3, 2018 · 5 comments
Assignees
Labels
[Package] Editor /packages/editor [Type] Code Quality Issues or PRs that relate to code quality [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@gziolo
Copy link
Member

gziolo commented Aug 3, 2018

We iniitally exposed wp.editor._BlockSettingsMenuFirstItem in #7199:

https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/index.js#L87

#7895 is going to introduce another component which follows the same approach.

We should refactor code to stop exposing components that are not meant for public consumption.

@gziolo gziolo added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 3, 2018
@gziolo
Copy link
Member Author

gziolo commented Aug 3, 2018

@aduth @youknowriad any ideas on how to attack it? Can we move those slots to edit-post and inject to BlockSettingsMenu similar to what we do with publish panels?

@gziolo gziolo added the [Package] Editor /packages/editor label Aug 3, 2018
@designsimply designsimply added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Aug 3, 2018
@aduth
Copy link
Member

aduth commented Aug 6, 2018

The introduction in #7199 was a bit of a judgment call and in some ways a stop-gap solution to provide some level of prioritization to menu items. If we want to surface priority: We should do so. If we don't: Then _ prefixing is fine (see also mention of precedent).

@gziolo
Copy link
Member Author

gziolo commented Apr 23, 2019

@aduth, it seems like we should rename them to begin with __Unstable*, what do you think?

@aduth
Copy link
Member

aduth commented Apr 23, 2019

Yes, I recall mentioning it recently as well in some pull request. I think it would be a good idea.

@gziolo gziolo self-assigned this Apr 23, 2019
@gziolo
Copy link
Member Author

gziolo commented Apr 25, 2019

When reviewing #15195 I discovered that those components listed in this issue are marked now as experimental. We can close this issue now.

@gziolo gziolo closed this as completed Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Editor /packages/editor [Type] Code Quality Issues or PRs that relate to code quality [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

3 participants