-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
RichText & Docs: remove or rename undocumented functions and constants #14239
Conversation
0793065
to
cb2708b
Compare
I don't really have any objections here, though it will need a rebase. Does the fact it missed the 5.3 release (WordPress 5.2) have any implications on your desire to move forward here? |
cb2708b
to
5b2bef0
Compare
5b2bef0
to
d8dfa86
Compare
d8dfa86
to
1276de5
Compare
No, I'd still like to move forward with this. The same issue remains. |
1276de5
to
e3309c7
Compare
export { getTextContent } from './get-text-content'; | ||
export { isCollapsed } from './is-collapsed'; | ||
export { isEmpty, isEmptyLine } from './is-empty'; | ||
export { isEmpty, isEmptyLine as __unstableIsEmptyLine } from './is-empty'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming the symbol at this point to use the __unstable
prefix will work as far as the doc generator is concerned because it uses the export statements to filter out the symbols to be ignored. However, I would lean towards renaming the symbol declaration as well. It may be benefitial as an urge to settle this API every time we work on it. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, maybe it's good to do that. But the reason it's marked unstable is that it was never meant to be exported. It's only used by the RichText
component, which should eventually live in these packages. So it's meant as an internal helper function, temporarily exported because these's one component left that's not been moved to this package yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be benefitial as an urge to settle this API every time we work on it.
So, regarding this, there's nothing to be settled. We need to move RichText
so we can remove the export statements.
@@ -35,31 +35,15 @@ const packages = [ | |||
'wordcount', | |||
]; | |||
|
|||
const getArgsForPackage = ( packageName ) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
I've tested this a bit based on the changes I saw. This is what I've found:
|
0b1182b
to
db15896
Compare
(Noting there are some merge conflicts here) |
db15896
to
7ca2c60
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes make sense. Tested and couldn't find any breakage.
I did find an issue that I can repro on |
Thanks @nosolosw! |
WordPress#14239) * RichText & Docs: remove or rename undocumented functions and constants * Fix import after renaming
Description
This change removes all
rich-text
exceptions in the doc generation script.I'm removing some functions that were never documented and are only used in a few cases. Elsewhere the properties are just accessed directly.
insertLineBreak
was added in#13546
, but the complexity around it was removed in #13850 and since then it's also no longer useful. It was also never documented.I'm also prefixing all the remaining exports that are undocumented with
__unstable
.How has this been tested?
Screenshots
Types of changes
Checklist: