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

Fix handling of long gallery card descriptions #204

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

brian-rose
Copy link
Member

Closes #201

The reason that the Vapor Cookbook is not showing up in the gallery (and the Regridding Cookbook is duplicated) is that its description is long enough to trigger a truncation operation (this line in gallery_generator.py).

This PR fixes a bug in that logic. The code for new card generation was in the else block of that statement, so did not execute for any cookbook whose description requires truncation. The card from the previous iteration (in this case, the Regridding Cookbook) was added to the gallery again instead.

Moving the new card generation code outside of the if, else block seems to solve the issue.

Copy link

github-actions bot commented Jun 4, 2024

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: 68bc547
✅ Deployment Preview URL: https://ProjectPythia.github.io/cookbook-gallery/_preview/204

@brian-rose brian-rose marked this pull request as ready for review June 4, 2024 11:41
@brian-rose brian-rose requested a review from a team as a code owner June 4, 2024 11:41
@brian-rose brian-rose requested review from mgrover1, erogluorhan and jukent and removed request for a team June 4, 2024 11:41
Copy link
Contributor

@jukent jukent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow great catch!

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.

Cookbook duplicated in gallery
2 participants