[PER-10415] Edtf date record viewer#1065
Open
aasandei-vsp wants to merge 2 commits into
Open
Conversation
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## PER-10643-edtf-validation #1065 +/- ##
=============================================================
+ Coverage 51.81% 51.82% +0.01%
=============================================================
Files 354 354
Lines 12109 12132 +23
Branches 2175 2178 +3
=============================================================
+ Hits 6274 6288 +14
- Misses 5608 5617 +9
Partials 227 227 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.