Skip to content

WIP - [PER-10416] Add date and time selection modal#924

Draft
aasandei-vsp wants to merge 7 commits intomainfrom
PER-10416-new-date-editing
Draft

WIP - [PER-10416] Add date and time selection modal#924
aasandei-vsp wants to merge 7 commits intomainfrom
PER-10416-new-date-editing

Conversation

@aasandei-vsp
Copy link
Contributor

No description provided.

@aasandei-vsp aasandei-vsp self-assigned this Feb 19, 2026
@aasandei-vsp aasandei-vsp marked this pull request as draft February 19, 2026 06:51
@aasandei-vsp aasandei-vsp force-pushed the PER-10416-new-date-editing branch from 77aad83 to adb771a Compare February 20, 2026 14:29
@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 74.91909% with 155 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.10%. Comparing base (c5d8a43) to head (2a3969a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...-date-time-modal/edit-date-time-mapping.service.ts 23.07% 70 Missing and 10 partials ⚠️
...debar-date-picker/sidebar-date-picker.component.ts 78.74% 17 Missing and 10 partials ⚠️
...app/shared/services/edtf-date/edtf-date.service.ts 81.75% 15 Missing and 10 partials ⚠️
...nts/timepicker-input/timepicker-input.component.ts 87.50% 4 Missing and 4 partials ⚠️
...nts/datepicker-input/datepicker-input.component.ts 92.85% 3 Missing and 2 partials ⚠️
...-date-time-modal/edit-date-time-modal.component.ts 94.20% 0 Missing and 4 partials ⚠️
...le-browser/components/sidebar/sidebar.component.ts 78.57% 2 Missing and 1 partial ⚠️
...s/timezone-dropdown/timezone-dropdown.component.ts 88.46% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #924      +/-   ##
==========================================
+ Coverage   48.69%   50.10%   +1.40%     
==========================================
  Files         350      359       +9     
  Lines       11339    11956     +617     
  Branches     1898     2104     +206     
==========================================
+ Hits         5522     5991     +469     
- Misses       5627     5735     +108     
- Partials      190      230      +40     

☔ View full report in Codecov by Sentry.
📢 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 force-pushed the PER-10416-new-date-editing branch 2 times, most recently from e5ac965 to f4748a1 Compare February 22, 2026 14:46
Copy link
Member

@cecilia-donnelly cecilia-donnelly left a comment

Choose a reason for hiding this comment

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

I'm sorry, I forgot to finish and submit this!

day: string;
}

const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
Copy link
Member

Choose a reason for hiding this comment

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

It seems wrong for us to keep track of this ourselves - is there a way to use a library?

if (!m || m < 1 || m > 12) return 31;

if (m === 2 && y) {
return this.isLeapYear(y) ? 29 : 28;
Copy link
Member

Choose a reason for hiding this comment

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

I see you handle February here, but it does seem strange to have to write this ourselves.


endTime = signal<TimeObject>({ ...DEFAULT_TIME });

edtfValue = computed(() => {
Copy link
Member

Choose a reason for hiding this comment

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

EDTF can get complicated - I would use something like https://www.npmjs.com/package/edtf?activeTab=readme for parsing

Copy link
Member

Choose a reason for hiding this comment

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

That one might be better suited to transforming a stored EDTF date back into something that makes sense on the client? Generally just saying that we don't need to write all the logic ourselves!

@aasandei-vsp aasandei-vsp force-pushed the PER-10416-new-date-editing branch 3 times, most recently from 543c7d2 to 373b5ca Compare March 9, 2026 12:25
This new component will be presentational, it will get a date input
and it will also return a selected date. It includes a calendar.

Issue: PER-10416
The time picker is a presentational component, its input si a time
object and it returns a time object as well. It contains a time
selector. It works with meridian.

Issue: PER-10416
The edit date and time component is smart, because it manages its own
state, but also the states of the time and date pickers. But still
the state is isolated to this specific component, it gets as input
a date and time object and returns back a date and time object.
It handles the time picker, the date picker, the date qualifiers, start
and end time and also shows an edtf calculated value.

Issue: PER-10416
The service has the resposability to open the modal for the edit date time
component and provide the initial data.

Issue: PER-10416
Because we are using the timezone dropdown component in three places
now, extracting it into a presentational component for reusability
seems the right approach.

It will be a generic isolated component that will provide an input and
a dropdown for choosing the timezone.

Issue: PER-10416
@aasandei-vsp aasandei-vsp force-pushed the PER-10416-new-date-editing branch from 373b5ca to 400b7dc Compare March 9, 2026 12:27
This component will be the smaller version to set the date and time,
it will open the modal editor for more comporehensive choices.

Issue: PER-10416
@aasandei-vsp aasandei-vsp force-pushed the PER-10416-new-date-editing branch from 400b7dc to db36d72 Compare March 9, 2026 12:50
@aasandei-vsp aasandei-vsp changed the title Add date and time selection modal WIP - Add date and time selection modal Mar 10, 2026
@aasandei-vsp aasandei-vsp changed the title WIP - Add date and time selection modal WIP - [PER-10416] Add date and time selection modal Mar 10, 2026
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