-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add custom component display names #933
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
Changes from 7 commits
afd9087
bb0f4d1
5489de3
b1dfa68
285e26d
aab4795
0eda54d
c7ddec9
ffcab5f
745966d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,5 +106,16 @@ module.exports = function getProps(doc, filepath) { | |
doc.displayName = getNameFromFilePath(filepath); | ||
} | ||
|
||
if (doc.doclets && doc.doclets.visibleName) { | ||
doc.visibleName = doc.doclets.visibleName; | ||
|
||
// custom tag is added both to doclets and tags | ||
// removing from both locations | ||
delete doc.doclets.visibleName; | ||
if (doc.tags) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the difference between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, I don't know the difference :D I just noticed, that the custom tag gets added both to doclets and tags while parsing, so i decided it's a good idea to remove it from both. I'll investigate a little more on the matter. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After investigating a little, it seems that doclets and tags are a little redundant.
And here's the tags object:
Seems, it's the same data, structured a little differently. The interesting part, that we are using two different parsers to get those results. So, unless there are some subtle differences that I've missed, we can do some refactoring and let one of those go. But anyway, I think this work is outside of this pull request purpose. Should I file an issue for that? |
||
delete doc.tags.visibleName; | ||
} | ||
} | ||
|
||
return doc; | ||
}; |
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.
Looks like it's not ordered alphabetically.
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.
Hey, it seems that the rest of the items is not ordered alphabetically as well. Should I order them?
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.
Would be super cool! But preferably in a separate PR.
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.
👍
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.
Hey, I finally got to alphabetically ordering the cookbook sections and want to ask: is this really a good idea? In this case, the first entry in the cookbook will be 'Are there any other projects like this?' and it feels that there are more important/useful topics in the cookbook than this... It feels that there can be a benefit in structuring the cookbook, but in some other, more semantic way, like from beginner topics to more advanced stuff or from most frequent requests to more rare/specific.
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.
Let's skip it then ;-) Are you going to change anything else or I can merge it?
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.
All right! Nope, the rest of the changes is in place already, so this one is ready to go 🚢