hashicorp / boundary-ui

Monorepo for Boundary UIs and addons.
http://boundary-ui.vercel.app
Other
89 stars 29 forks source link

Add duration unit format #2483

Closed cameronperera closed 2 months ago

cameronperera commented 2 months ago

NOTE: I did upgrade webpack in this branch to verify that this fixed the build issues and it... DOES! Once this PR is merged, I will get the webpack PR updated and verify it is working.

Description

This PR is replacing intl-unofficial-duration-unit-format with @formatjs/intl-durationformat. This is to help us get the webpack upgrade (PR) into a working state.

The issue with intl-unofficial-duration-unit-format is due to an export path format in the released versions. Instead of patching this fix, we took this time to replace this package with the newer @formatjs/intl-durationformat polyfill.

Screenshots (if appropriate)

One small difference between these packages is the polyfill (spec for Int.DurationFormat) does not seem to have the same ability to define the format we want. Before if the session had a max_duration greater than 24 hours, it would keep adding to the hours and not show days. The new polyfill will display days now. Before: 24:01:26 remaining After: 1 day, 0:01:26 remaining

How to Test

Use Vercel or an instance with session recordings. In Admin UI, visit the session recordings pages and look for the different places we display the duration of the session recording. In the Desktop Client, start a session and you should see "xx:xx:xx remaining" when viewing the session details.

Checklist

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 9:00pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 12, 2024 9:00pm