fix: use datetime-local inputs with clean ISO round-trip in dialogs#273
fix: use datetime-local inputs with clean ISO round-trip in dialogs#273
Conversation
- Remove unnecessary reactive wrapper `rec()` in EditModal, access props.rec directly with eslint-disable for intentional one-time init - Change date inputs from `type="date"` to `type="datetime-local"` in both EditModal and UploadDialog to preserve time information - Use clean ISO round-trip: strip trailing Z on init, append Z on save
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the handling of date and time inputs within the application's dialogs. The primary goal is to ensure that date and time information is accurately captured and preserved throughout the editing and uploading processes, moving from date-only inputs to full datetime inputs and implementing a robust ISO format round-trip strategy. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses the need to edit both date and time for recordings by switching to datetime-local inputs. The implementation for a clean ISO string round-trip, by stripping and re-appending the 'Z' for UTC, is a good approach. The refactoring in EditModal to remove the unnecessary reactive wrapper also improves code clarity. I have one minor suggestion for the UploadDialog to enhance the user experience regarding date precision.
Merging this branch will increase overall coverage
Coverage by fileChanged unit test files
|
- Add isoToLocalInput/localInputToIso helpers using native Date for timezone conversion instead of regex string manipulation - EditModal and UploadDialog now display dates in the user's local timezone and save back as UTC ISO strings - Two users in different timezones editing the same recording will both see the correct local time for the same instant - Update tests with RFC 3339 date with +09:00 offset, verify UTC round-trip, use fireEvent.submit for reliable form submission
Coverage Report for ui
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Summary
rec()in EditModal — accessprops.recdirectly with eslint-disable comments for intentional one-time form state inittype="date"totype="datetime-local"in both EditModal and UploadDialog to preserve time informationZon init, appendZon save — no timezone conversion needed since Go sends RFC 3339 UTCTest plan