refactor: datetime to ant [ENG-175]#7059
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
cc9bb0a to
31ba8ce
Compare
456081e to
498762f
Compare
Greptile OverviewGreptile SummaryThis PR refactors the Key changes:
Issues found:
Confidence Score: 2/5
Important Files ChangedFile Analysis
|
clients/admin-ui/src/features/integrations/configure-monitor/ConfigureMonitorForm.tsx
Outdated
Show resolved
Hide resolved
clients/admin-ui/src/features/integrations/configure-monitor/ConfigureMonitorForm.tsx
Show resolved
Hide resolved
| cy.getByTestId("input-execution_start_date") | ||
| .should("have.prop", "value") | ||
| .should("match", /2024-06-04T[0-9][0-9]:11/); | ||
| .should("match", /2024-06-04 [0-9][0-9]:[0-9][0-9]:11/); |
There was a problem hiding this comment.
Format change of internal value used by ant component.
This does not represent change in value submitted to api.
Changing the format prop would also change the value displayed to the user.
| useEffect(() => { | ||
| form | ||
| .validateFields({ validateOnly: true }) | ||
| .then(() => setSubmittable(true)) | ||
| .catch(() => setSubmittable(false)); | ||
| }, [form, formValues]); |
There was a problem hiding this comment.
Pattern used in ant documentation, however I think this could be improved in the future.
lucanovera
left a comment
There was a problem hiding this comment.
Nice update, thanks for updating the Form too!
@speaker-ender It looks like there's an issue where the date string isn't being loaded correctly when editing monitors created before this refactor.
I am comparing the preview branch with nightly, and I see that after the refactor we're using milliseconds, I would try to keep the strings the same for consistency and preventing bugs:
Preview branch after refactor: 2025-12-04T17:16:45.163000Z
Nightly: 2025-12-04T17:17:00Z
Reference:
498762f to
ae78ff8
Compare
I think this has to do with null values being returned. Fixed by resolving to undefined
Good catch! This should now send the value without milliseconds |
ae78ff8 to
10fadfa
Compare
10fadfa to
7354da9
Compare
7354da9 to
13e947b
Compare
13e947b to
87b2481
Compare
lucanovera
left a comment
There was a problem hiding this comment.
@speaker-ender Thanks for the updates! I no longer see the issue editing old monitors.
I found one more small issue though. After creating the monitor if I go to edit I see the date has moved back by 3 hours (I live in a UTC-3 timezone).
Creating:

Editing:

I did some initial debugging and I think the issue is that when the monitor is created the datetime is passed exactly as it was selected, but it really should be converted to UTC:
In this case I selected 13:08, it should save as 16:08 in utc.

The behavior on edit looks right to me, it's loading the utc value from the server and then applying the local timezone, so shifting it by 3 hours.
ps: sorry for the delay in my re-review. I missed you previous message.
chore: wip chore: more wip feat: nearly done chore: fixes fix: show time chore: update changelog fix: test id fix: inline date format
87b2481 to
00c0ed7
Compare
@lucanovera Good catch! I think this should convert to utc correctly now. |
lucanovera
left a comment
There was a problem hiding this comment.
Looks and works great now! Code changes look good, approved!
A small comment on date formats: While I prefer the standardized date format used here, usually we use 12hs because that's more natural for customer in the US.
But anyways that should be something that we configure at the fidesui level, not in the implementation.

Ticket ENG-175
Description Of Changes
Updates the Configure Monitor form to use the ant
DatePickerinput.This also updates the form to use the ant
Formcomponent,useFormhook, and all of the other ant input components.Code Changes
ConfigureMonitorFormcomponent to use the antDatePickerinput.Steps to Confirm
Data DiscoverytabAdd MonitorbuttonEditbutton next to your newly created monitorPre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works