Add data retention time configuration component to admin panel#239
Conversation
Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
| }; | ||
|
|
||
| return ( | ||
| <Grid container spacing={2} alignItems="center"> |
There was a problem hiding this comment.
Grid is overkill here, use Stack instead
There was a problem hiding this comment.
Changed to Stack in commit a33b3e2. The component now uses Stack direction="row" with flex styling for equal-width inputs.
There was a problem hiding this comment.
Please place the component at the bottom instead of the top
There was a problem hiding this comment.
Moved to bottom of AdminControl in commit a33b3e2. The component now appears after AdminAddLocation.
| onChange={setState} | ||
| disabled={isPosting} | ||
| /> | ||
| <Button disabled={isPosting} onClick={handleSave}> |
There was a problem hiding this comment.
The button appears in the center here but should be placed to the left to match the other components
There was a problem hiding this comment.
Button now left-aligned in commit a33b3e2 using sx={{ alignSelf: "flex-start" }} to match other admin components.
| onChange={handleValueChange} | ||
| disabled={disabled} | ||
| inputProps={{ | ||
| min: 0, |
There was a problem hiding this comment.
the minimum possible input should be 1 instead of 0.
additionally, if the user tries to save a value that is very short, say less than 1 week or 7 days, the user should be prompted with a warning dialog and asked to confirm it. the user should be warned that all data will be deleted in n number of days if they go ahead with this choice.
There was a problem hiding this comment.
Implemented in commit a33b3e2:
- Minimum value changed from 0 to 1
- Warning dialog shows for retention periods < 7 days
- Dialog warns users that "all data older than this will be automatically deleted" and requires confirmation to proceed
There was a problem hiding this comment.
A choice should be given to save no retention policy at all, in which case all data is retained indefinitely. this should be the default choice.
There was a problem hiding this comment.
Implemented in commit a33b3e2:
- Added "Retain data indefinitely (no automatic deletion)" checkbox
- This is now the default (checked) state
- When checked, the retention time selector is hidden
- Users can uncheck to enable time-based retention
…ion, warning dialog, left-align button Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
duckbytes
left a comment
There was a problem hiding this comment.
Please check the tests as most of them are failing on my machine
Co-authored-by: duckbytes <32309223+duckbytes@users.noreply.github.com>
Fixed in commit 92d7e87. The issue was that Material-UI TextFields weren't properly associating labels with inputs. Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Data Retention Time Component Implementation Plan
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.