-
Notifications
You must be signed in to change notification settings - Fork 6
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 Changelog UI #909
Conversation
Is this change revertible? And if not should it even be stored in the changelog? |
Really appreciate your thorough review here @AaronPlave. I'll try to push up some changes for the more immediately actionable items shortly, but I'm unfortunately quite time restricted on how much time I can spend on Aerie this week. We might need to have a discussion about whether these pain points are blockers or can be iterated on later? |
Yeah we should tag up about what tweaks, if any, are needed to get this first version out. |
I don't think that the creation of the preset should be revertible since it's not necessarily plan specific. You're seeing an entry in the changelog probably because upon creation, the UI also sends a query to assign after successfully creating. I think that maybe the assignment should at least be revertible if that data is tracked. |
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.
Another suggestion for a different PR is maybe adding some loading state after clicking "Restore". In my plan that has 180 directives, I'm noticing that the directive's value that I restored doesn't get set until a second later after clicking "Restore". For that second I thought that I didn't click the right button. |
0564688
to
0865121
Compare
…tivity in changelog header
44bca18
to
e8dbad3
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.
Looks great, I'm sure we'll have some feedback on it that will help us figure out the next iteration.
Updated the auto-close logic to look specifically for a changing selected activity ID, so we don't hit that side effect where and update to the current activity also closes the changelog. I also updated the permissions check to consider plan ownership/collaborator. |
Resolved as directed. Dismissing in case we want to merge today.
* Rough first pass at fetching changelog and displaying results per activity * Basic working UI for change log, no restore or preview * Account for anchor differences * small formatting fixes and type corrections * Catch scenarios with no changes, e.g. creating a preset * remove unused data, format durations * move changelog button into activity name header * wire up effect for restoring from changelog * Close the changelog if the selected activity changes * use new changelog icon * Basic working revision preview * Add header and 'restore' action to revision preview * more efficient effective arguments construction * add Last Modified By to activity directive form * Add permission handling * fix linter errors * drive anchor offset detection from props instead of activity object * Fix tests. Add basic handling of array/struct types * Fix date formatting, username display, and padding * Display Start Time in DOY format * re-run validations with preview arguments if supplied * use revision when getting effective arguments, use current name of activity in changelog header * constrain width to always have enough room for restore/preview buttons * add more generic method for deep diffing objects * add tooltip for overflowed values * hook changelog auto-closing to a change in selected ID * Update restore permissions check to account for plan ownership
* Rough first pass at fetching changelog and displaying results per activity * Basic working UI for change log, no restore or preview * Account for anchor differences * small formatting fixes and type corrections * Catch scenarios with no changes, e.g. creating a preset * remove unused data, format durations * move changelog button into activity name header * wire up effect for restoring from changelog * Close the changelog if the selected activity changes * use new changelog icon * Basic working revision preview * Add header and 'restore' action to revision preview * more efficient effective arguments construction * add Last Modified By to activity directive form * Add permission handling * fix linter errors * drive anchor offset detection from props instead of activity object * Fix tests. Add basic handling of array/struct types * Fix date formatting, username display, and padding * Display Start Time in DOY format * re-run validations with preview arguments if supplied * use revision when getting effective arguments, use current name of activity in changelog header * constrain width to always have enough room for restore/preview buttons * add more generic method for deep diffing objects * add tooltip for overflowed values * hook changelog auto-closing to a change in selected ID * Update restore permissions check to account for plan ownership
This adds a first-pass UI for the activity directive changelog. The 10 most recent modifications to an activity directive are stored in a rolling list in the database. Clicking the changelog in the activity directive form header allows viewing a list of changelog entries with diffs displayed (when possible) between each revision. From there the user can either directly restore a revision, or preview the differences between that revision and the current one and decide whether to restore from there.
There are some edges cases and strange scenarios we may likely need to iterate on from here. For instance: