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

Miscellaneous bug fixes for the site #2995

Merged
merged 6 commits into from
Dec 11, 2023
Merged

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Dec 5, 2023

Fixes #2981 - preview: after (many tags) | after (few tags) | after (many tags mobile)

Changes gdocs to use proper booleans instead of "true" and "false" strings for front matter. This is obviously how it should have always been but I was a bit rushed 😇 The migration is overkill seeing as this only affects LTPs and none of them have "sidebar-toc": "false" (which would be treated as truthy until the article was republished) but better safe than sorry!

Improves the messaging for how the tag slug field works and what it means

Fixes a random prominent link bug I stumbled upon while testing something else

Adds a warning if you're publishing a non-Fragment gdoc if you don't have any tags set.

@ikesau ikesau requested a review from sophiamersmann December 5, 2023 19:26
@ikesau ikesau self-assigned this Dec 5, 2023
@ikesau ikesau force-pushed the misc-site-fixes-december-2023 branch from 8d427d3 to 45782f3 Compare December 8, 2023 19:09
Comment on lines +297 to +298
if (parsed[key] === "true") parsed[key] = true
if (parsed[key] === "false") parsed[key] = false
Copy link
Member

Choose a reason for hiding this comment

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

Given that strings are truthy, wouldn't it be safer to treat "true" as true and everything else as false? Or is that handled elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point! We'll need a list of keys that we're expecting to be booleans and make sure that ffalse gets flagged. I'll add that on the other side of the admin refactor 🙂

@ikesau ikesau merged commit 50bf3cb into master Dec 11, 2023
15 checks passed
@ikesau ikesau deleted the misc-site-fixes-december-2023 branch December 11, 2023 18:35
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.

Improve datapage header padding when indicator has many tags
2 participants