-
Notifications
You must be signed in to change notification settings - Fork 15
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
Activity log settings UI state #2727
Conversation
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.
Cool stuff! I left a few suggestions we might want to take into account.
Besides those, what do you think about having min={1}
in the InputNumber
inside TimeSpan
?
It could help us in making illegal state unrepresentable and possibly simplifying a bit the frontend by being bit more loose in validation handling from the backend.
Happy to answer any question.
yield put(setEditingActivityLogsSettings(false)); | ||
yield put(setActivityLogsSettingsErrors([])); | ||
} catch (error) { | ||
const errors = get(error, ['response', 'data', 'errors'], []); |
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 might be missing the opportunity to give the user a proper feedback on generic errors that might not fall into validation ones or that do not satisfy the expectation of a specific shape in the response body.
I forced the update endpoint to return 500, and I think it might be valuable to provide some feedback like unable to save retention time
(or whatever message).
Screencast.from.2024-07-01.10-55-35.mp4
I am afraid a non-feedback might be misleading.
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 point. We can add a label aside the saving buttons, for global errors.
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.
Added generic error in 09bea2e.
The UI simply shows the message Something went wrong while saving
when an unstructured error appears (see storybook). We might provide a more descriptive message if we can add some intelligence to the error parsing, though..
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.
Improved in 52303ca
918148f
to
e2f6827
Compare
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
Signed-off-by: balanza <[email protected]>
8a8c5a1
to
c058961
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.
Great! Thanks!
Description
Mount the Audit Logs section in the Settings Page.
The section at startup fetches the settings data from the backend and render them in the UI. To edit, a modal is open with editable form fields.
The database is prefilled with default settings, so there is no empty data scenario.
Changes
retentionTime
toretention_time
from Components for Activity Logs settings #2706 to adhere to API namingSettingsPage
page.