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

Use kebab-case for keys of valid_filters in resources #1373

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

hedyhli
Copy link
Member

@hedyhli hedyhli commented Aug 2, 2024

The YAML side uses snake case, whereas the HTML template and JavaScript use kebab case. This difference affects only Payment tiers right now.

Currently if the page has a payment tier filter active, reloading the page would lose the filter. A simple fix would be to use kebab case in valid_filters which will be used in JavaScript.

Demo:
https://deploy-preview-1373--pydis-static.netlify.app/resources/?payment-tiers=free&difficulty=beginner
https://www.pythondiscord.com/resources/?payment-tiers=free&difficulty=beginner

@hedyhli hedyhli added type: bug Something isn't working area: frontend Related to site content and user interaction s: needs review Author is waiting for someone to review and approve labels Aug 2, 2024
Copy link

netlify bot commented Aug 2, 2024

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit c2413a1
🔍 Latest deploy log https://app.netlify.com/sites/pydis-static/deploys/66ac33ab1e66500008d0ef58
😎 Deploy Preview https://deploy-preview-1373--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same
when pulling c2413a1 on fix/resources-payment-tiers
into e51d80a on main.

@jchristgit jchristgit self-assigned this Aug 2, 2024
@jchristgit jchristgit self-requested a review August 2, 2024 07:41
Copy link
Member

@jchristgit jchristgit left a comment

Choose a reason for hiding this comment

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

Thanks!

@jchristgit jchristgit merged commit 04ed2d0 into main Aug 3, 2024
11 of 12 checks passed
@jchristgit jchristgit deleted the fix/resources-payment-tiers branch August 3, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to site content and user interaction s: needs review Author is waiting for someone to review and approve type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants