Skip to content

[PER-10415] Edtf date record viewer#1065

Open
aasandei-vsp wants to merge 2 commits into
PER-10643-edtf-validationfrom
PER-10415-edtf-date-record-viewer
Open

[PER-10415] Edtf date record viewer#1065
aasandei-vsp wants to merge 2 commits into
PER-10643-edtf-validationfrom
PER-10415-edtf-date-record-viewer

Conversation

@aasandei-vsp

@aasandei-vsp aasandei-vsp commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Warning

This functionality is hidden under the edtf-date flag. 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)

  1. Log in or create a new account.
  2. Upload two files.
  3. Click a file to open it in full-screen view.
    Expected: The full-screen viewer opens with a metadata panel (name, description, Date, Uploaded, Size, Type).

Flag ON — EDTF date appears

  1. Turn the edtf-date flag ON.
  2. Open a file in full-screen view.
    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

  1. Turn the edtf-date flag OFF.
  2. Open a file in full-screen view.
    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)

  1. Open a file in full-screen view.
  2. Click the Date control.
    Expected: The date dropdown opens.
  3. Enter April 12, 1985.
  4. Click Save.
    Expected: The Date area shows "April 12, 1985" with no error banner.

Modify the date from the modal (flag ON)

  1. Click the Date control.
  2. Click "More options".
    Expected: The edit date/time modal opens with a Start date card.
  3. Enter June 15, 1990.
  4. Click Save.
    Expected: The Date area updates to "June 15, 1990".

Cancel in the modal (flag ON)

  1. Click the Date control.
  2. Click "More options".
  3. Change the date to a new value.
  4. Click Cancel.
    Expected: The modal closes and the Date area still shows the previously saved value.

Persistence after refresh (flag ON)

  1. Set the date to April 12, 1985 and save.
    Expected: The Date area shows "April 12, 1985".
  2. Refresh the browser page.
    Expected: The full-screen view shows "April 12, 1985".

Persistence across left/right navigation (flag ON)

  1. Open the first file in full-screen view.
  2. Set its date to April 12, 1985 and save.
  3. Click the right chevron (›).
    Expected: The next file shows its own date or the empty state, not "April 12, 1985".
  4. Set this file's date to June 15, 1990 and save.
  5. Click the left chevron (‹).
    Expected: The first file shows "April 12, 1985".
  6. Click the right chevron (›).
    Expected: The second file shows "June 15, 1990".

Date shows in the sidebar after closing full-screen (flag ON)

  1. Set the date to April 12, 1985 and save.
  2. Click "Back".
    Expected: The full-screen view closes and the file list appears.
  3. Select the same file.
    Expected: The sidebar's Date section shows "April 12, 1985".

Shared item — date is disabled (flag ON)

  1. Share a file with another account using view-only (Viewer) access.
  2. Log in as the recipient account.
  3. Open the shared file in full-screen view.
    Expected: The Date area shows the saved date (or empty state).
  4. Click the Date control.
    Expected: Nothing happens — the date is disabled and the dropdown/modal does not open.

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
@aasandei-vsp aasandei-vsp self-assigned this Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.82%. Comparing base (fe7dd07) to head (67e2e7f).

Files with missing lines Patch % Lines
...er/components/file-viewer/file-viewer.component.ts 68.00% 8 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant