Skip to content

[PER-10655] Add edtf formatted dates in the file list - #1175

Open
aasandei-vsp wants to merge 4 commits into
PER-10680-migrate-navigate-lean-refresh-current-folderfrom
PER-10655-EDTF-in-file-list
Open

aasandei-vsp wants to merge 4 commits into
PER-10680-migrate-navigate-lean-refresh-current-folderfrom
PER-10655-EDTF-in-file-list

Conversation

@aasandei-vsp

@aasandei-vsp aasandei-vsp commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Manual test cases — EDTF dates in the file list

Run this twice. Once now, on this branch, to check the rendering. Then
again once the EDTF editor and the getWithChildren migration are both on
main
— only then does displayTime reach the file list the way it will
in production, and only then can these dates be created through the real
editor rather than by hand.

Setup: An archive you own, on a build with the edtf-date flag available.
You need: one record with a year-only date (1985), one with a year and month
only, one with a full date, one with a full date and a time, one approximate,
one uncertain, one marked Unknown, one folder with a closed date range
inside one year, one folder with an open-ended range, and one record left with
no date at all. Create them through the date editor in the info sidebar where
you can; where the editor is not available yet, set displayTime by hand.

Date column — single values ⭐

Scenario — precision is preserved

  1. Turn the edtf-date flag on and open Private Files on a desktop-width
    window, so the Date column is visible.
    • EXPECTED: The year-only record reads 1985.
  2. Look at the record with a year and month only.
    • EXPECTED: The month in full and the year, e.g. April 1985.
  3. Look at the record with a full date.
    • EXPECTED: Abbreviated month with a period, e.g. Apr. 12, 1985.
  4. Look at the record with a full date and a time, in a window wider than
    1440px.
    • EXPECTED: One line, e.g. Apr. 12, 1985 • 11:20 PM. No seconds,
      and no timezone beside it (this is follow-up work that needs all the EDTF date work to be merged)

Scenario — qualifiers and unknown

  1. Look at the approximate record.
    • EXPECTED: A trailing ~, in lighter text than the date.
  2. Look at the uncertain record.
    • EXPECTED: A trailing ?, in lighter text.
  3. Mark a record both approximate and uncertain, and save.
    • EXPECTED: A single trailing %.
  4. Look at the record marked Unknown.
    • EXPECTED: It reads Unknown in lighter text.
  5. Look at the record with no date at all.
    • EXPECTED: The Date cell is empty.

Date column — ranges

Scenario — merging and open ends

  1. Look at the folder with a range inside one year.
    • EXPECTED: The year appears once, at the end, e.g. Apr. 12 — Jun. 10, 1985.
  2. Edit that folder's range so both dates fall in the same month, and save.
    • EXPECTED: The month appears once, e.g. Sep. 24 — 30, 2001.
  3. Edit it again so both dates fall on the same day, with different times.
    • EXPECTED: One date, a bullet, then both times, e.g.
      Sep. 24, 2001 • 9:45 AM — 4:00 PM. This is the only range shape that
      keeps its times, and the only one wide enough to truncate at 12rem.
  4. Look at the folder with an open-ended range.
    • EXPECTED: It reads After followed by the known date, with After in
      lighter text.
  5. Edit a folder so the start is Unknown and the end is a real date, and save.
    • EXPECTED: It reads Before followed by that date.
  6. Edit a folder so both ends are Unknown, and save.
    • EXPECTED: It reads Unknown — Unknown.

Scenario — wrapping instead of truncating ⭐

  1. On a window wider than 1440px, look at a folder whose range spans two
    different years and carries times, so it shows an info icon.
  • EXPECTED: The whole thing on one line, icon included, e.g.
    Sep. 15, 2026 — Dec. 21, 2027 with the icon after it.

Scenario — the info icon and the tooltip ⭐

  1. Look at the folder with a range across two months whose dates carry times.
    • EXPECTED: A small info icon at the end of the value. That row is
      hiding its times, and the icon is what says so.
  2. Hover it.
    • EXPECTED: A tooltip on two lines, labelled From and To, each showing
      that side's full date and its time — the times the row does not show.
  3. Now look at every other row: a plain date, a date with a time, the
    Unknown one, a range with no times at all, and the same-day range that
    shows both its times.
    • EXPECTED: No icon and no tooltip on any of them. A tooltip appears
      only for a range whose times are not visible.

The sidebar and the list ⭐

(they share one renderer, but deliberately not one style)

  1. Click a record with a year-only date and open the info sidebar.
    • EXPECTED: The sidebar's date preview and the list row both read 1985.
  2. Look at a record with a full date, in both places.
    • EXPECTED: They differ on purpose: the sidebar reads April 12, 1985
      (full month, zero-padded day), the list reads Apr. 12, 1985.
  3. Change a date to approximate and save.
    • EXPECTED: The list row gains a trailing ~ without a reload.
  4. Clear the date entirely and save.(this can only be tested once the whole edtf date work is merged)
    • EXPECTED: The list row's Date cell becomes empty, and stays empty after
      a reload.

Surfaces that are not the main file browser

  1. With the flag on, open Shared files.
    • EXPECTED: Rows render normally and the edtf date shows with the correct formatting.
  2. Open a public archive URL (/p/archive/…).
    • EXPECTED: The date beside each item name has the correct edtf formatting.
  3. Open a public archive item that has no date.
    • EXPECTED: Nothing beside the name.
  4. Open an unlisted share link in a private window.
    • EXPECTED: Dates render the same as in the owner's view.

With the flag off

  1. Turn edtf-date off, remove the edtf dates(only leave the "normal" dates) and reload the file list.
    • EXPECTED: Every row shows the same text it showed before this change
      — the legacy YYYY-MM-DD on one line, the time with its CDT/CST suffix
      under it. If Edtf dates are still present, the column will show "Invalid date".

Regression sweep

Cheap checks; these paths were traced as unchanged but they share the row component.

  1. Sort the list by Date, ascending then descending.
    • EXPECTED: The order changes and no row's text changes.
  2. Reload the page while that Date sort is applied, and compare the order
    before and after the reload.
    • EXPECTED: The same order both times. A difference here is the known
      sortChildItems divergence, not a new bug.
      (this will have a separate ticket, as it needs both BE and FE changes)
  3. Switch between list and grid view.
    • EXPECTED: Dates render in both where they rendered before, in the same
      format.
  4. Select several rows, move them to another folder, then press Back.
    • EXPECTED: Dates are still correct in both folders, with no blank cells.
  5. Open the sidebar date picker and type a date in, watching the live preview.
    • EXPECTED: The preview behaves exactly as it did before this change,
      including part-typed values such as 198 reading 198X.

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.43713% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.16%. Comparing base (57f1dd3) to head (600dd7b).

Files with missing lines Patch % Lines
...ared/services/edtf-service/edtf-display.service.ts 86.52% 8 Missing and 11 partials ⚠️
...s/edtf-date-display/edtf-date-display.component.ts 7.69% 12 Missing ⚠️
Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           PER-10680-migrate-navigate-lean-refresh-current-folder    #1175      +/-   ##
==========================================================================================
+ Coverage                                                   53.85%   54.16%   +0.31%     
==========================================================================================
  Files                                                         364      366       +2     
  Lines                                                       12765    12926     +161     
  Branches                                                     2327     2392      +65     
==========================================================================================
+ Hits                                                         6874     7001     +127     
- Misses                                                       5650     5674      +24     
- Partials                                                      241      251      +10     

☔ 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.

@aasandei-vsp aasandei-vsp self-assigned this Sep 17, 2026
@aasandei-vsp
aasandei-vsp force-pushed the PER-10680-migrate-navigate-lean-refresh-current-folder branch from 553df48 to 5e1322c Compare September 17, 2026 15:25
@aasandei-vsp
aasandei-vsp force-pushed the PER-10655-EDTF-in-file-list branch from 4757231 to dfb963c Compare September 17, 2026 15:39
@aasandei-vsp
aasandei-vsp force-pushed the PER-10680-migrate-navigate-lean-refresh-current-folder branch from 5e1322c to 57f1dd3 Compare September 18, 2026 09:37
…friendly text

The EDTF date comes as a string from stela in the displayTime property. Its
representation is very technical, so this service will do the heavy lifting
of transforming any edtf date string into a readable text, for both the list
and the sidebar, with the possibility of extension, in case we need to show
the edtf date in other places, with specific formatting.

Issue: PER-10655
…ted edtf date

The edtf display component uses the edtf display service to format the
edtf date that comes from stela on the displayTime property. It adds
styling and behaviour so it fits correctly in the file list and also
show more data when it is needed via a tooltip.

Issue: PER-10655
Now the file list component shows the edtf date using the display
edtf date component and dropped the prDate pipe, as it could not
support the formatting of the edtf date and the newly added behaviour.
The prDate pipe has not been removed, because it is used in other places
for formatting plain dates and times (like the creation date or the upload
date).

Issue: PER-10655
When the user would input 1 for the month, this is considered
January, which is correct. The display service would actually buffer
that date to 1X, adding unspecified digits, which is incorrect.

Issue: PER-10655
@aasandei-vsp
aasandei-vsp force-pushed the PER-10655-EDTF-in-file-list branch from 9a0c880 to 600dd7b Compare September 18, 2026 09:42
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