Add option to DocsExample to hide a tab
🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.
Current behavior
DocsExample doesn't have a configuration that would allow us to hide a tab.
This, in some cases, results in showing information that is unnecessary, e.g. examples in KCard > Layout have this "Style" tab that have no value for reader, and could even cause confusion since these styles are internal styles that don't need to necessarily correspond to our product pill styles.
Desired behavior
DocsExample has new props hideTemplate, hideScript, and hideStyle. A truthy value hides the corresponding tab (in the example above, this means that only "Template" and "Script" tabs would be displayed.
This will support our attempts to keep the documentation concise and to the point, and allow more flexibility.
Guidance
@EshaanAgg any feedback for this proposal? I will wait to hear your thoughts before I mark it as ready for work.
Hi @MisRob! I am so sorry for being AFK for the past couple of weeks!
I think that this issue would be a great addition to the API of the DocExample component, as it would allow the developers to hide the not-so-important parts of the examples! The idea of having three separate props seems the most flexible and clear way to me as well.
Hi @EshaanAgg, no problem, nothing pressing. Thanks for confirming. I will mark this as ready for work then.
Hi @MisRob, I would like to work on this issue
I am proposing that we implement a single, dynamic prop, docTabs. This prop would be an array of strings (e.g., ['script', 'template', 'style']), and the tabs rendered would be based on the items within this array.
HI @yeshwanth235! Yes sure! I have assigned you the issue. Please feel free to reach out incase you have any questions. Thank you!
Closed by https://github.com/learningequality/kolibri-design-system/pull/1021