-
Notifications
You must be signed in to change notification settings - Fork 42
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
Doc squad collab: Create filter-by-tag logic for Zowe Docs Site #692
Comments
Hi @idontknowjs, @nannanli i see your activity in this issue so i think you may be interested in that, if someone else should be included please share. Summary of findings so far: As described in #1767 we can use the Frontmatter of the markdown files, i tried to use this structure for POC, but it could be discussed.
In this approach tag just pointing to the array of related headers, that is the weak part of idea, it is safer to use header id, but now IDs aren't mentioned in .md file, but generated automatically.
Then we need to manipulate document content in accordance with tags, i found that we use MDXProvider in tweaked DocItem, and this component allows to add wrapper to manipulate its children, so we can use it like that:
And do the children sorting in TagsWrapper. Then we need a tags selector component, i put it to the side panel (tweaked DocSidebar component) and utilized browser session storage to store its state to keep the selection after document change or page refresh. That seems to be enough for POC. Here is a draft PR for that, to see more details in code. Thanks, |
Some updates to follow up Monday's call
It will look just like a regular paragraphs without filters applied: Part with |
Seems to be complete on our end at this time, so let's close this while we wait for further action. |
cross-repo links to zowe/docs-site#1767
Problem: Our documentation contains sections a user never needs to read, because it includes instructions for all possible environments but some are mutually exclusive, so a user only needs to read instructions that are relevant to their environnment and what components they want to use.
Proposal: If the user could select from a list what type of environment they have, what components they want to use, what optional features they are interested in, and what they want to do today (install, configure, troubleshoot etc) then the documentation can be filtered to their specific needs, reducing the documentation they see to only what is relevant to them.
Subtasks:
Research doing conditional div hiding by a property (tag) set within a markdown file of the doc
Create react component which guides the user to select tags that the site would use to filter the doc
Determine what filtered docs should look like: missing, or just greyed out?
Create place on site that shows what currently selected filters are, and allow them to be toggled off
By topic, tag each paragraph, table, code example with tags such as ESMs, prerequisites, Zowe component, optional feature, and type of task
Dependencies: Collaborate with the Doc squad to better understand how the doc website software works, and collaborate with them to tag each documentation section according to filter topics.
The text was updated successfully, but these errors were encountered: