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

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

Refactor platform DowntimeNotification component #75609

Open wesrowe opened 7 months ago

wesrowe commented 7 months ago

Description

The DowntimeNotification code is used by and has modifications from multiple teams. However, the code uses a fair amount of legacy code that negatively impacts application performance.

We should refactor the platform DowntimeNotification component to remove legacy code and patterns, which can improve performance for any VA application that uses the DowntimeNotification component.

We can improve performance by removing momentjs, which seems to only be used for date parsing, and there are better alternatives.

We can improve compatibility with modern React by converting the components from legacy React APIs, specifically be converting from a class-based component to a function component.

User story

Notes

Possible tasks:

Acceptance criteria

dcloud commented 7 months ago

We could expand this ticket to include refactoring the component into a modern functional component, similar to (or building off of) https://github.com/department-of-veterans-affairs/vets-website/pull/27215