-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action Center results MVP #5622
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -32,7 +32,7 @@ export const debounce = (fn: (props?: any) => void, ms = 0) => { | |||
}; | |||
|
|||
export const formatDate = (value: string | number | Date): string => | |||
format(new Date(value), "MMMM d, Y, KK:mm:ss z"); | |||
format(new Date(value), "MMMM d, y, KK:mm:ss z"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this update was a breaking change in the new version of date-fns
. It does NOT change our existing date formats.
39bfa91
to
7ac5686
Compare
fides Run #11669
Run Properties:
|
Project |
fides
|
Branch Review |
refs/pull/5622/merge
|
Run status |
Passed #11669
|
Run duration | 01m 03s |
Commit |
dcf5d630e8 ℹ️: Merge 85d47faf2db8c0a34cf439a1c2e95a2f891cf389 into 2d9f1ef27026454fac915d635d9d...
|
Committer | Jason Gill |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
View all changes introduced in this branch ↗︎ |
@@ -53,7 +53,7 @@ export const useServerSidePagination = () => { | |||
setPageIndex((prev) => prev + 1); | |||
}, [setPageIndex]); | |||
const isNextPageDisabled = useMemo( | |||
() => pageIndex === totalPages, | |||
() => !!totalPages && (pageIndex === totalPages || totalPages < 2), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should disable the "Next" button if there's only 1 page or if there was an error (0 pages).
|
||
return ( | ||
<List.Item data-testid={`monitor-result-${key}`} {...props}> | ||
<Skeleton avatar title={false} loading={showSkeleton} active> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how Ant's own examples utilize skeletons during loading state. Pretty cool that it just wraps the content!
|
||
import { MonitorSummaryPaginatedResponse } from "./types"; | ||
|
||
const actionCenterApi = baseApi.injectEndpoints({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opted to create a dedicated slice for this instead of building on the D&D slice. I may decide to change that depending how big this gets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of splitting them up more in general, I think some of the slice files we have are too broad and get unwieldy.
revert Back Button enhancement in favor of Breadcrumbs migration
Update action-center.cy.ts
fd7dc1d
to
8f6b8a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
const assetCountString = Object.entries(updates) | ||
.map((update) => { | ||
return `${update[1]} ${update[0]}s`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this is formatted based on the API response and not part of this PR, just want to flag that we probably want these to be sentence-cased.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good callout. @adamsachs this is for things like "Browser Request" which should be "Browser request", etc.
|
||
import { MonitorSummaryPaginatedResponse } from "./types"; | ||
|
||
const actionCenterApi = baseApi.injectEndpoints({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of splitting them up more in general, I think some of the slice files we have are too broad and get unwieldy.
}, [data, setTotalPages]); | ||
|
||
const results = data?.items || []; | ||
const loadingResults = isFetching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this needed for, out of curiosity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. This is generating a dummy array for the skeleton loader rows and generates as many rows as the page size. Ant's List
component has built in skeletons so it needs both a loading
state as well as dummy array for the dataSource
. See the "load more" example here https://ant.design/components/list#list-demo-loadmore (they use count
instead of page size, but similar concept).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when there is more than one page of data here it will be more apparent how this works.
fides Run #11671
Run Properties:
|
Project |
fides
|
Branch Review |
main
|
Run status |
Passed #11671
|
Run duration | 00m 50s |
Commit |
483d7984e9: Action Center results MVP (#5622)
|
Committer | Jason Gill |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
4
|
View all changes introduced in this branch ↗︎ |
Closes HJ-290, HJ-334
Description Of Changes
As a user, I want to view the results of my website monitors in a list view that is by default grouped by monitor run, so that I can triage the results and make updates as needed to my system and data inventory.
Code Changes
Related maintenance:
date-fns
Feature work:
Steps to Confirm locally
fidesplus
repo (asachs/HJ-295
).turbo dev
from theclients
directoryPre-Merge Checklist
CHANGELOG.md
updatedmain
downgrade()
migration is correct and works