Show row change history in the enlarged row sidebar
Intro
The feature should expose changes made to rows in the past in the enlarged row edit modal. Currently, we already show row comments there. Because we don't want to mix up the comments and row change history, there must be two tabs, one for the row comments and one for the row change history.
Note that the uploaded designs are in the new design are in the new style. Things might need to look a different in the old style. The designs will follow.
Glossary
Entry - a record of a change for a row that combines changes to all fields in that row.
Core/premium/enterprise separation
The feature will be free and available on all plans.
The max retention time of the row changes must be configurable via an environment variable. After this period, the history must be deleted.
Note that we want to introduce a second system for the SaaS version where it must be possible to decrease the visible retention per plan. When a row history entry is past the plan retention period, it must not actually be deleted from the database, but only made invisible. This will allow users to upgrade to another plan, and then still gain access to the entries that were previously not be visible. Everything past the highest retention limit can be deleted, same as with the self-hosted version. That means that environment variable configure retention limit must be higher than the advanced visible retention period.
Permissions and roles
Without RBAC:
- Both admins and members will have access
With RBAC:
- Admins, builders, editors, commenters, viewers will have access
- 'No access' role won't have access
UI
Currently, the row edit modal only shows the row comments in the right sidebar. This must be changed to a system that has two tabs, one for "comments" and one for "history". If the user is on premium or higher, the comments tab will be open by default. If the user is on the free plan, the row history tab will he open by default.
- Each row history entry will have:
- Name of the person who made the change
- Say "You" if the change was made by the current user
- Profile circle with name initials
- The time of the change with the same formatting as the row comments.
- A colorized diff showing a change for every field
- The name of the field that was changed is displayed
- Followed by the diff itself
- Shows previous value
- Shows the new value
- The entries are paginated, same as with the row comments.
- Entries will be divided into sections grouped by date, same as with the row comments.
- If the role doesn't have access to the history and the comments, then they should both not be displayed. Same as with the viewer permissions currently.
- If the role doesn't have access to the comments, but does have access to the history, then the tabs should not be visible.
- If the role doesn't have access to the history, but does have access to the comments, then the tabs shouldn't be visible.