Skip to content

[PER-10641] Create edtf date dropdown component#1047

Open
aasandei-vsp wants to merge 5 commits into
mainfrom
PER-10641-create-edtf-date-dropdpwn-component
Open

[PER-10641] Create edtf date dropdown component#1047
aasandei-vsp wants to merge 5 commits into
mainfrom
PER-10641-create-edtf-date-dropdpwn-component

Conversation

@aasandei-vsp
Copy link
Copy Markdown
Contributor

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

This PR adds a component for editting the date in the sidebar of a folder/record.

Introduce three shared components for EDTF date/time editing:
datepicker-input, timepicker-input, and timezone-dropdown.

Includes related updates to EdtfService and to the shared styles
(_colors.scss and _mixins.scss) to support the new components.

Issue: PER-10632
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 76.56904% with 112 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.66%. Comparing base (23409a4) to head (004db68).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...c/app/shared/services/edtf-service/edtf.service.ts 77.62% 16 Missing and 16 partials ⚠️
...debar-date-picker/sidebar-date-picker.component.ts 84.24% 11 Missing and 12 partials ⚠️
...nts/timepicker-input/timepicker-input.component.ts 69.11% 18 Missing and 3 partials ⚠️
...nts/datepicker-input/datepicker-input.component.ts 73.01% 14 Missing and 3 partials ⚠️
...le-browser/components/sidebar/sidebar.component.ts 36.84% 11 Missing and 1 partial ⚠️
...s/timezone-dropdown/timezone-dropdown.component.ts 81.81% 4 Missing and 2 partials ⚠️
src/app/core/services/edit/edit.service.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1047      +/-   ##
==========================================
+ Coverage   49.86%   50.66%   +0.79%     
==========================================
  Files         348      352       +4     
  Lines       11502    11894     +392     
  Branches     1975     2119     +144     
==========================================
+ Hits         5736     6026     +290     
- Misses       5579     5639      +60     
- Partials      187      229      +42     

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

Created a new component that shows a dropdown for picking up a date
in the sidebar. This uses the date and time pickers and integrates
with the BE.

Issue: PER-10641
The integration of the sidebar-date-picker component in the sidebar is
hidden under a flag.

Issue: PER-10641
@aasandei-vsp aasandei-vsp force-pushed the PER-10641-create-edtf-date-dropdpwn-component branch from d223eda to 1312842 Compare June 3, 2026 09:38
@slifty slifty requested a review from Copilot June 3, 2026 19:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces new EDTF-focused date/time UI building blocks (date picker, time picker, timezone dropdown) and wires an EDTF date picker into the file-browser sidebar behind a feature flag, supported by a substantial expansion/refactor of the shared EdtfService.

Changes:

  • Added reusable date/time input components and a sidebar EDTF date picker UI (feature-flagged).
  • Refactored EdtfService parsing/serialization and expanded validation helpers + test coverage.
  • Added displayTime mapping support to the record repo + improved edit-service error handling/revert behavior.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/styles/_mixins.scss Adds new SCSS mixins used by the new date/time components.
src/styles/_colors.scss Adds PR blue shade tokens used by the new component styles.
src/app/shared/services/edtf-service/edtf.service.ts Major refactor/expansion of EDTF parsing, formatting, validation, and timezone-display helpers.
src/app/shared/services/edtf-service/edtf.service.spec.ts Updates and expands unit tests for the new EDTF behavior and helper methods.
src/app/shared/services/api/record.repo.ts Adds optional displayTime support in Stela record mapping.
src/app/shared/services/api/record.repo.spec.ts Adds tests verifying displayTime mapping behavior.
src/app/shared/components/timezone-dropdown/timezone-dropdown.component.ts Adds standalone timezone dropdown component sourcing IANA zones via Intl.
src/app/shared/components/timezone-dropdown/timezone-dropdown.component.spec.ts Adds unit tests for timezone dropdown behavior.
src/app/shared/components/timezone-dropdown/timezone-dropdown.component.scss Styles for the timezone dropdown.
src/app/shared/components/timezone-dropdown/timezone-dropdown.component.html Template for timezone dropdown UI.
src/app/shared/components/timepicker-input/timepicker-input.component.ts Adds standalone time input + ng-bootstrap timepicker dropdown behavior.
src/app/shared/components/timepicker-input/timepicker-input.component.spec.ts Adds unit tests for timepicker input interactions/validation.
src/app/shared/components/timepicker-input/timepicker-input.component.scss Styles for the timepicker input.
src/app/shared/components/timepicker-input/timepicker-input.component.html Template for timepicker input UI.
src/app/shared/components/datepicker-input/datepicker-input.component.ts Adds standalone date input + ng-bootstrap datepicker dropdown behavior.
src/app/shared/components/datepicker-input/datepicker-input.component.spec.ts Adds unit tests for datepicker input interactions/validation.
src/app/shared/components/datepicker-input/datepicker-input.component.scss Styles for the datepicker input.
src/app/shared/components/datepicker-input/datepicker-input.component.html Template for datepicker input UI.
src/app/file-browser/file-browser-components.module.ts Imports the new sidebar date picker component into the file-browser module.
src/app/file-browser/components/sidebar/sidebar.component.ts Integrates EDTF date picker into the sidebar behind edtf-date feature flag; adds save handler.
src/app/file-browser/components/sidebar/sidebar.component.spec.ts Updates sidebar tests for feature flag handling and new dependencies.
src/app/file-browser/components/sidebar/sidebar.component.scss Switches to Sass @use for variables import.
src/app/file-browser/components/sidebar/sidebar.component.html Feature-flagged switch between legacy inline date edit and new EDTF picker UI.
src/app/file-browser/components/sidebar-date-picker/sidebar-date-picker.component.ts Adds the sidebar EDTF date picker component and related formatting logic.
src/app/file-browser/components/sidebar-date-picker/sidebar-date-picker.component.spec.ts Adds unit tests for sidebar date picker rendering and interactions.
src/app/file-browser/components/sidebar-date-picker/sidebar-date-picker.component.scss Styles for the sidebar date picker dropdown/panel.
src/app/file-browser/components/sidebar-date-picker/sidebar-date-picker.component.html Template for the sidebar date picker UI.
src/app/core/services/edit/edit.service.ts Improves error handling: reverts property on failure and shows error messages.
src/app/core/services/edit/edit.service.spec.ts Adds tests ensuring revert + error messaging behavior on save failures.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/shared/services/edtf-service/edtf.service.ts
Comment thread src/app/shared/components/timepicker-input/timepicker-input.component.html Outdated
Comment thread src/app/file-browser/components/sidebar/sidebar.component.ts
@aasandei-vsp aasandei-vsp changed the title [PER-10641] Create edtf date dropdpwn component [PER-10641] Create edtf date dropdown component Jun 4, 2026
The user can now choose to fill in the date using meridian, but
also the 24h format.

Issue: PER-10641
In the edtf date dropdown and modal, when year, month or day have undefined
digits, replace them with X values for display and leave them as empty in
the inputs.

PER-10641
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.

2 participants