department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
99 stars 69 forks source link

[Discharge Upgrade Wizard] Replace MomentJS with date-fns #19774

Open randimays opened 1 week ago

randimays commented 1 week ago

Description

Application: Discharge Upgrade Wizard

According to the MomentJS Docs, MomentJS is a legacy project in maintenance mode. This means no new features or capabilities, no major changes, possibly no bug/quirk fixes, and no bundle size fixes.

MomentJS is a significantly larger JS library than alternatives like date-fns. We should migrate to date-fns to improve package size for our application. We may see tiny improvements in performance, but the biggest gain here is moving to a package that is actively supported/improved and more likely to have support for new browsers going forward.

User story

Describe the audience/user, enhancement or fix, and value / outcome desired.

AS A PO/PM for Discharge Upgrade Wizard I WANT a JS library that is not obsolete/in maintenance mode SO THAT the code is in a package that is active supported/improved, will be maintained and fixed if issues arise, and more likely to have support for new browsers going forward.

Engineering notes / background

Analytics considerations

Testing & QA

Scope / Impact analysis

What, if anything, could break as a result of this change? Engineer should assess this when approaching PR.

Roles / assignments

After functional testing, code review, accessibility review, and design review can happen in parallel.

Acceptance criteria

_ACs should capture expected behavior, to inform test plans. Consider devices, documentation updates including KBs, change management, and content model when applicable._