[PER-10415] Edtf date record viewer#1065
Open
aasandei-vsp wants to merge 11 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## PER-10643-edtf-validation #1065 +/- ##
=============================================================
+ Coverage 51.98% 52.00% +0.02%
=============================================================
Files 354 354
Lines 12127 12164 +37
Branches 2183 2190 +7
=============================================================
+ Hits 6304 6326 +22
- Misses 5599 5613 +14
- Partials 224 225 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aasandei-vsp
force-pushed
the
PER-10643-edtf-validation
branch
from
June 29, 2026 10:27
fe7dd07 to
57c3de4
Compare
aasandei-vsp
force-pushed
the
PER-10415-edtf-date-record-viewer
branch
from
June 29, 2026 10:55
67e2e7f to
dd1b3c1
Compare
slifty
reviewed
Jul 2, 2026
Member
|
+1 to @slifty 's comments and I'll remove myself as a reviewer for now. |
cecilia-donnelly
removed their request for review
July 10, 2026 15:30
Left-pad single-digit month and day values with zero instead of
X-padding them, since a single 1-9 digit can only be a complete value
('5' -> '05', no longer '5X'). Require a complete date whenever a time
is provided and surface a dedicated friendly error message for that
case. Add a generic getSegmentError helper that the datepicker and
timepicker inputs use to build their inline field error messages
(invalid characters and out-of-range checks, skipped while the value
is still being typed).
Issue: PER-10643
Instead of silently rejecting invalid input, the year, month and day segments now emit whatever the user typed and surface a per-field error message below the input (invalid characters, out-of-range month or day). The day is re-validated when the month changes, and picking a date from the calendar clears all errors. The error styling lives in new shared input-error-state and input-error-message mixins. Issue: PER-10643
Instead of silently rejecting invalid input, the hours, minutes and seconds segments now emit whatever the user typed and surface a per-field error message below the input. The hour is re-validated when the AM/PM/24H format changes. Issue: PER-10643
The inline-error restructure dropped role="button", tabindex, and the keydown.enter/space handlers from the calendar and clock toggle buttons, leaving them mouse-only. Restore them and add keyboard-toggle tests. Issue: PER-10643
Persist null instead of '' when a date is cleared, and render an
explicitly-null displayTime as empty ("Click to add date"). Widen
displayTime to string | null and add specs.
Issue: PER-10643
With the flag on, displayTime is authoritative (the migration backfills it before the flip), so a missing value means the date was cleared and nothing is shown. With the flag off, the file list keeps its fallback so deployed code is unchanged. Issue: PER-10643
Move the picker's display formatting into EdtfService so the preview
and the serialized EDTF are built from the same padding helpers — a
single-digit month now reads as the month itself ("1" -> January /
1985-01) in both. A lone "0" month or day is rejected with a clear
range error instead of being silently serialized to "0X".
Issue: PER-10643
aasandei-vsp
force-pushed
the
PER-10643-edtf-validation
branch
from
July 14, 2026 12:45
57c3de4 to
67edbff
Compare
Gate the date control on the edtf-date flag: show the EDTF dropdown/modal when it's on, and the legacy inline date field when it's off. Port the sidebar's date handling to the file viewer: - Cache displayTimeObject in a field, recomputed per record in initRecord, instead of a getter that allocated on every change-detection cycle. - Re-sync after every save via a shared saveDisplayTime helper (used by both the inline picker and the modal), including on failure. - Track the modal's closed subscription so it unsubscribes on destroy. Issue: PER-10415
The global error banner sat at a lower z-index than full-screen views (e.g. the file viewer), so errors rendered but were hidden behind the overlay. Raise it above the full-screen layer and the date/time picker dropdowns that open within it. Issue: PER-10415
Mirror the sidebar behavior: persist null instead of '' when a date is
cleared, and render an explicitly-null displayTime as empty ("Click to
add date"). Add specs.
Issue: PER-10643
Contributor
Author
Very good points, I've addressed all of them. |
- Give the inline date picker the same live EDTF validation as the modal: save is disabled with an inline error while the input is invalid, sharing the modal's error styling via a new mixin. - Skip the date recompute in the file viewer when the edtf-date flag is off, so no EDTF errors can surface while the picker is hidden. - Await the property save in the file viewer so the picker re-syncs to the reverted value when a save fails on the server. Issue: PER-10415
aasandei-vsp
force-pushed
the
PER-10415-edtf-date-record-viewer
branch
from
July 15, 2026 10:24
dd1b3c1 to
df091d0
Compare
aasandei-vsp
force-pushed
the
PER-10643-edtf-validation
branch
2 times, most recently
from
July 22, 2026 13:33
a3a7e5a to
452da47
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This functionality is hidden under the
edtf-dateflag. Enable it only for testing — it must stay OFF in production.Manual test cases — EDTF date in the full-screen record view (file-viewer)
Setup (run once)
Expected: The full-screen viewer opens with a metadata panel (name, description, Date, Uploaded, Size, Type).
Flag ON — EDTF date appears
edtf-dateflag ON.Expected: The Date area shows the EDTF date control (clickable, opens a dropdown).
Expected: No legacy plain "Date" text field is shown.
Flag OFF — legacy date appears
edtf-dateflag OFF.Expected: The metadata table shows a legacy "Date" row with the inline date editor.
Expected: The EDTF dropdown/modal control does not appear.
Modify the date from the dropdown (flag ON)
Expected: The date dropdown opens.
Expected: The Date area shows "April 12, 1985" with no error banner.
Modify the date from the modal (flag ON)
Expected: The edit date/time modal opens with a Start date card.
Expected: The Date area updates to "June 15, 1990".
Cancel in the modal (flag ON)
Expected: The modal closes and the Date area still shows the previously saved value.
Persistence after refresh (flag ON)
Expected: The Date area shows "April 12, 1985".
Expected: The full-screen view shows "April 12, 1985".
Persistence across left/right navigation (flag ON)
Expected: The next file shows its own date or the empty state, not "April 12, 1985".
Expected: The first file shows "April 12, 1985".
Expected: The second file shows "June 15, 1990".
Date shows in the sidebar after closing full-screen (flag ON)
Expected: The full-screen view closes and the file list appears.
Expected: The sidebar's Date section shows "April 12, 1985".
Shared item — date is disabled (flag ON)
Expected: The Date area shows the saved date (or empty state).
Expected: Nothing happens — the date is disabled and the dropdown/modal does not open.