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

[docs] filter by tags #31410

Merged
merged 9 commits into from
Jan 11, 2023
Merged

[docs] filter by tags #31410

merged 9 commits into from
Jan 11, 2023

Conversation

maxpumperla
Copy link
Contributor

A filter-by-tag system that can be used across all our galleries. The "trick" is to attach a new class name to the button of a panel item (no other way known to me to modify the meta tags of sphinx panels) and then toggle based on tags found in a class to tag mapping JSON that can be fetched from static files at runtime. To add other galleries, we can simply extend the JSON mapping, if needed.

Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
@maxpumperla maxpumperla marked this pull request as ready for review January 3, 2023 19:47
@maxpumperla maxpumperla requested a review from a team as a code owner January 3, 2023 19:47
@richardliaw richardliaw marked this pull request as draft January 3, 2023 21:59
@richardliaw richardliaw marked this pull request as ready for review January 3, 2023 21:59
@richardliaw
Copy link
Contributor

Hmm, I tried it out but doesn't seem to be doing anything?

@maxpumperla
Copy link
Contributor Author

@richardliaw sure it does, but not every tag has been linked to articles yet. Try clicking pytorch to see panels disappear.

@richardliaw
Copy link
Contributor

ah got it!

@Yard1 Yard1 self-requested a review January 6, 2023 17:38
Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
Yard1 and others added 5 commits January 6, 2023 19:58
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
@maxpumperla maxpumperla changed the title [WIP] [docs] filter by tags [docs] filter by tags Jan 11, 2023
@sven1977 sven1977 merged commit 6bbd5d8 into master Jan 11, 2023
@sven1977 sven1977 deleted the mp_filter_tags branch January 11, 2023 17:50
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants