Skip to content

fix: add skeleton for pre-hydration toggles#541

Merged
danielroe merged 2 commits intonpmx-dev:mainfrom
MatteoGabriele:fix/settings-relative-dates-mismatch
Jan 31, 2026
Merged

fix: add skeleton for pre-hydration toggles#541
danielroe merged 2 commits intonpmx-dev:mainfrom
MatteoGabriele:fix/settings-relative-dates-mismatch

Conversation

@MatteoGabriele
Copy link
Copy Markdown
Member

@MatteoGabriele MatteoGabriele commented Jan 31, 2026

Fixes the mismatch in the saved value of "Relative dates" toggle.
It also adds a skeleton placeholder for all toggles on the settings page.

Screen.Recording.2026-01-31.at.19.59.05.mov

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jan 31, 2026 6:59pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Jan 31, 2026 6:59pm
docs.npmx.dev Skipped Skipped Jan 31, 2026 6:59pm

Request Review

@vercel vercel Bot temporarily deployed to Preview – docs.npmx.dev January 31, 2026 18:57 Inactive
@MatteoGabriele MatteoGabriele changed the title fix(settings): relative dates is always false by default fix(settings): fix relative dates toggle persistence Jan 31, 2026
@MatteoGabriele MatteoGabriele changed the title fix(settings): fix relative dates toggle persistence fix(settings): relative dates toggle persistence Jan 31, 2026
Copy link
Copy Markdown
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

perfect 👌

Comment thread app/pages/settings.vue
</span>
</button>
<template #fallback>
<ToggleSkeleton :label="$t('settings.relative_dates')" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

btw, you can also do this with Toggle.server.vue and Toggle.client.vue (with the .server.vue component being the skeleton)

Copy link
Copy Markdown
Member Author

@MatteoGabriele MatteoGabriele Jan 31, 2026

Choose a reason for hiding this comment

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

oh wow! I've never thought about that. Pretty cool.
I can improve this later with a proper toggle component or handle it here in the same PR. Whatever you think is best.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's merge and iterate 🚀

@danielroe danielroe changed the title fix(settings): relative dates toggle persistence fix: add skeleton for pre-hydration toggles Jan 31, 2026
@danielroe danielroe added this pull request to the merge queue Jan 31, 2026
Merged via the queue into npmx-dev:main with commit 8825b0a Jan 31, 2026
13 of 17 checks passed
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.

2 participants