Skip to content
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

Restrict api methods with platform #447

Open
trulysinclair opened this issue Sep 13, 2023 · 5 comments
Open

Restrict api methods with platform #447

trulysinclair opened this issue Sep 13, 2023 · 5 comments
Labels
area:docs Related to rendering the documentation ✨ enhancement New feature or request

Comments

@trulysinclair
Copy link

Not sure how many people this could benefit, but the docs could benefit from being able to hide methods that are platform specific. For example, I'm currently hired to develop for Windows only, and have to scroll through many macOS specific methods. It would be nice to filter both the view and the sidebar to a specific platform for faster reading.

@erickzhao erickzhao added ✨ enhancement New feature or request area:docs Related to rendering the documentation labels Sep 13, 2023
@DevanceJ
Copy link
Contributor

DevanceJ commented Mar 4, 2024

Hi I would really like to work on this but do we have a design for the filter button or toggle?

@DevanceJ
Copy link
Contributor

DevanceJ commented Mar 5, 2024

Hi,
So I played around a little bit with the website's code and understood how docusaurus is working. In my opinion the filter feature can be implemented by using .mdx instead of normal markdown files, that way we will be able to put some js logic on our markdown also we would need to update all the files such that the headings that need to be filtered are wrapped with their tags such as mac, linux or windows. If you can think of a more simpler approach to this I would love to discuss and work on this.

@erickzhao
Copy link
Member

@DevanceJ I think we would want to do it with JavaScript on the website rather than modifying the source MDX files. The information is already embedded into the Markdown header for each API.

@DevanceJ
Copy link
Contributor

DevanceJ commented Mar 5, 2024

By adding a Filter logic Plugin to docusaurus maybe what do you think. Should I try working on a filter logic?

@erickzhao
Copy link
Member

erickzhao commented Mar 5, 2024

You mean a Remark plugin for the Docusaurus config? I'm not sure how it would look in practice off the top of my head but feel free to experiment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Related to rendering the documentation ✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants