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

Update Gallery filtering javascript to add tags to URL #157

Open
jukent opened this issue Sep 16, 2021 · 10 comments
Open

Update Gallery filtering javascript to add tags to URL #157

jukent opened this issue Sep 16, 2021 · 10 comments
Labels
infrastructure Infrastructure related issue
Milestone

Comments

@jukent
Copy link
Contributor

jukent commented Sep 16, 2021

This can take one of two forms:

  1. We can filter the gallery by affiliation as in Add affiliation filtering #156 and direct people to this filtered gallery from the landing page
  2. We make this a separate gallery that is just a subset (this will allow the user to then filter this gallery by package, domain, format)
@jukent jukent added the infrastructure Infrastructure related issue label Sep 16, 2021
@jukent jukent changed the title Direct users to Project Pythia filtered resource gallery from landing page Direct users to all Project Pythia content gallery from landing page Sep 29, 2021
@jukent
Copy link
Contributor Author

jukent commented Sep 30, 2021

The tutorial videos are added in #157 to the resource gallery. We still need to add the foundations book pages that are complete to the resource gallery. This is some conversation about this issue over in #157.

My next step is to go through and add affiliation tags to several of the cards, and add an affiliation filter menu (Pythia, Pangeo, Unidata, etc). In doing this, I will change the current "affiliation" author information to "institution." I have started this in #160. This will require me to edit the auto-PR for submitting a resource to include this new tag and update the author keys.

Then I will take our filtered-to-Pythia-only content and link to that directly from the portal. It is possible that we might want to edit the yaml_gallery_generator to create an entirely new gallery of Pythia content (not one that renders as a filtered gallery) so that it is cleaner and allows filtering upon it.

@brian-rose
Copy link
Member

Once #227 is merged (which highlights Pythia content directly on the landing page), should we close this, or do we still want to create a dedicated gallery page with Pythia-only content as described by @jukent above?

@jukent
Copy link
Contributor Author

jukent commented Mar 25, 2022

Would we want to add a button to the gallery that loudly says, "See all Project Pythia resources"? Right now we can filter to Pythia content using javascript (so it isn't actually a separate web page) but we don't make Pythia have any special treatment. I'm sure there is a way to then link to the page with the "pythia" checkbox already ticked from the home page, but I don't know how to do that yet.

@clyne
Copy link
Contributor

clyne commented Mar 25, 2022

Once #227 is merged (which highlights Pythia content directly on the landing page), should we close this, or do we still want to create a dedicated gallery page with Pythia-only content as described by @jukent above?

That's a good question. The original plan wrt this issue was to auto-select appropriate filtering on the Resource Gallery, and simply direct viewers to that. With #227 we're directing users to the Xdev tutorial site, which pretty much has all of the information that would be available from the gallery, but it doesn't have the Pythia theme, etc. My suggestion:

  1. Close this issue or change the priority to low. Either is fine by me.
  2. Add the Pythia logo prominently to Xdev tutorial site

Regarding @jukent's comment right above, I like the idea. An alternative to adding a button if that presents a technical challenge a simple callout that says something like "Want to see all of the Pythia produced content?. Simply set the affiliation to "Pythia".

CC @kmpaul

@jukent
Copy link
Contributor Author

jukent commented Mar 25, 2022

a simple callout that says something like "Want to see all of the Pythia produced content?. Simply set the affiliation to "Pythia".

@clyne That does sound like the easiest step

@kmpaul
Copy link
Collaborator

kmpaul commented Mar 25, 2022

@clyne I think that we should move the Xdev tutorial content to Pythia. And we can direct people from the Xdev site to Pythia. (Note that moving the page over is easy. You just have to copy the cli/mktuts.py script from the Xdev repo into the Pythia repo. The script will need to be modified to build the page for the Pythia site, but those changes are minor, such as the output filename and location. Then add a step to the CI to run this new script when the site is built.)

@clyne
Copy link
Contributor

clyne commented Mar 25, 2022

@clyne I think that we should move the Xdev tutorial content to Pythia. And we can direct people from the Xdev site to Pythia. (Note that moving the page over is easy. You just have to copy the cli/mktuts.py script from the Xdev repo into the Pythia repo. The script will need to be modified to build the page for the Pythia site, but those changes are minor, such as the output filename and location. Then add a step to the CI to run this new script when the site is built.)

Sounds good to me. Probably something someone from XDev will need to handle.

@brian-rose
Copy link
Member

I support this too! Seems Important to me that each of the buttons on the Pythia landing page purporting to lead users to Pythia content should point to Pythia-branded pages. Otherwise great confusion will ensue.

@r-ford r-ford added this to the hackathon milestone Jun 24, 2022
@jukent jukent self-assigned this Oct 5, 2022
@jukent
Copy link
Contributor Author

jukent commented Oct 7, 2022

This is harder than I expected. Because the resource gallery filtering is done with Javascript, I'm not sure how to use URL parameters link to a version of the gallery with affiliation=Pythia checked.

Does anyone know how to do this?

I think it would be similar to: https://projectpythia.org/resource-gallery.html?affiliation=pythia

We might have to make changes to the javascript in _extensions/_static/custom.js to produce a query string for each checkbox option.

@brian-rose
Copy link
Member

This issue should be retitled to be more specific about using gallery tags in URLs, which is still a problem we'd like to have a solution for.

@jukent jukent changed the title Direct users to all Project Pythia content gallery from landing page Update Gallery filtering javascript to add tags to URL May 1, 2023
@jukent jukent removed their assignment Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure related issue
Projects
Status: Backlog
Development

No branches or pull requests

6 participants