Provide the "item" parameter of the "renderLabel" method with the data type belonging to the page #26518
Closed
oliverschuerch
started this conversation in
Ideas
Replies: 1 comment
-
|
May be a duplicate of #24022 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
The
API_SidebarOptioninterface specifies what to expect from the methodrenderLabel, its parameter and return value when used within the manager config (manager.ts):You can see, that the given parameter will by of type
API_HashEntrywhich has some sub types:All the sub types of
API_HashEntrydo extend theAPI_BaseEntryinterface:There you can clearly see, that the given method parameter of the
renderLabelmethod differs from the one before. Theitemparameter is always of typeAPI_BaseEntry.The problem with this is, that if you use the
renderLabelmethod in the manager config, you'd expect that you will get (for example) anitemparameter of typeAPI_DocsEntrywhen the label is for a docs page. Same as you'd expect, that the parameter is of typeAPI_StoryEntry, when the label is for story page.Describe the solution you'd like
I'd expect, that the
itemparameter of therenderLabelmethod would contain a specific, correctly typed item, dependant of the page the label is for:itemtype of a label which leads to a root page:API_RootEntry...
itemtype of a label which leads to a docs page:API_DocsEntryitemtype of a label which leads to a story page:API_StoryEntryIf this can be realized, users should be able to use
tags,parametersand other properties defined in thestoryormetaobject of a story, to render the label for it.Describe alternatives you've considered
No response
Are you able to assist to bring the feature to reality?
no
Additional context
This would also fix the following issue: #25998
Beta Was this translation helpful? Give feedback.
All reactions