mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
## Summary Adds timezone selection support to the Time component. Users can now choose: - `UTC` for deterministic server/client rendering - `visitor` to render UTC during SSR, then update to the browser timezone after hydration - an IANA timezone such as `Europe/Berlin` Also adds a timezone combobox control in the settings panel with common timezone options, supported IANA timezone values, typed input, and preview descriptions. ## Changes - Added `timeZone` prop to the Time component, defaulting to `UTC` - Updated standard and custom-format date rendering to use the selected timezone - Added visitor timezone mode with hydration-safe UTC fallback - Added `timeZone` prop metadata and settings-panel control support - Added timezone combobox control with previews - Added tests for: - explicit timezone rendering - custom format timezone rendering - date rollover in another timezone - invalid timezone fallback - trimmed timezone values - visitor timezone hydration behavior ## Verification - `pnpm --filter @webstudio-is/sdk-components-react test -- time.test.ts` - `pnpm --filter @webstudio-is/sdk-components-react typecheck` - `pnpm --filter @webstudio-is/builder typecheck` - `pnpm exec prettier --check ...`
Webstudio SDK Components
Webstudio SDK is a TypeScript API that lets you use your Webstudio project or some components in your custom codebase or just render a complete Remix Document.