-
Notifications
You must be signed in to change notification settings - Fork 738
Fix broken extend links #2012
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
Fix broken extend links #2012
Conversation
@Inbal-Tish |
I don't understand why add the category on these components to make the link work and not in all of the components? |
What do you mean "all of the components"? |
I don't expect it to be used at all. What I'm asking is, take for example the Avatar component, we have the "extends" key with "ThouchableOpacity" so why do we need to specify the category, like ""basic/TouchableOpacity", in the Button component ? |
Yes, you are right, there are some inconsistencies.. i'll check it out |
ok few things
In general, when running |
|
||
function generateExtendsLink(extendsLink) { | ||
const extendedComponentName = _.last(_.split(extendsLink, '/')); // Incubator/TextField -> TextField | ||
const extendsText = `[${extendedComponentName}](/docs/components/${extendsLink})`; |
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.
What about instead of getting the extendsLink as "basic/TextField" we will build it using its category. Something like:
const extendsText = "[${extendsText}](/docs/components/${component.category}/${extendsLink})";
In that case we won't have to add the category prefix to each component's extends ("extends": ["basic/View"]) and leave it as it is. What do you think?
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.
The component.category
is the not necessarily the category of the component it extends.
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.
Right... Ok. I guess there's no other way than...
Description
Fix docs links by adding missing category in "extendLink"
Changelog
Fix docs broken links