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
-
Is your feature request related to a problem? Please describe.
The
API_SidebarOption
interface 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_HashEntry
which has some sub types:All the sub types of
API_HashEntry
do extend theAPI_BaseEntry
interface:There you can clearly see, that the given method parameter of the
renderLabel
method differs from the one before. Theitem
parameter is always of typeAPI_BaseEntry
.The problem with this is, that if you use the
renderLabel
method in the manager config, you'd expect that you will get (for example) anitem
parameter of typeAPI_DocsEntry
when 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
item
parameter of therenderLabel
method would contain a specific, correctly typed item, dependant of the page the label is for:item
type of a label which leads to a root page:API_RootEntry
...
item
type of a label which leads to a docs page:API_DocsEntry
item
type of a label which leads to a story page:API_StoryEntry
If this can be realized, users should be able to use
tags
,parameters
and other properties defined in thestory
ormeta
object 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