refactor: system user table formatting [ENG-2429]#7352
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
fa4423d to
f64841e
Compare
Greptile OverviewGreptile SummaryThis PR updates the Systems table “Data stewards” column to display users using the shared Main issue to address before merge: the filter display-name callback currently can crash when the users list hasn’t loaded yet (calls Confidence Score: 3/5
Important Files Changed
|
| filters: convertToAntFilters( | ||
| allUsers?.items?.map((user) => user.username), | ||
| allUsers?.items?.map(({ username }) => username), | ||
| (username) => | ||
| formatUser( | ||
| allUsers?.items.find((u) => u.username === username) ?? { | ||
| username, | ||
| }, | ||
| ), | ||
| ), |
There was a problem hiding this comment.
Filter formatter crashes
convertToAntFilters(..., (username) => formatUser(allUsers?.items.find(...))) will throw when allUsers is still undefined/loading because allUsers?.items.find(...) calls .find on undefined. This can crash the Systems table render before the users query resolves; guard the .find call (e.g., allUsers?.items?.find(...)) or otherwise avoid calling .find until items is available.
Additional Comments (1)
|
f64841e to
33075ff
Compare
33075ff to
0d92b8c
Compare
8a596f5 to
e1fb106
Compare
e1fb106 to
2065a55
Compare
chore: formatting feat: updating table chore: add changelog fix: failing test fix: test properly fix: function call
2065a55 to
5d0c88c
Compare

Ticket ENG-2429
Description Of Changes
Updates the BE type definitions to include full data_steward data.
Updates the systems table to display users using the
formatUserfunction in both the cells and the filter.Code Changes
Steps to Confirm
data_stewardsand view them in the systems pagePre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works