Page edit history #16

Closed
opened 2024-09-12 22:40:20 +02:00 by liquidex · 1 comment
Owner

I’ve been trying to not conceal old (versions of) branches, but it’s kind of hard to do while keeping content readable (both from the user side and my side.) So having an unobtrusive system for tracking changes here would be nice.

I’ve been trying to not conceal old (versions of) branches, but it’s kind of hard to do while keeping content readable (both from the user side and my side.) So having an unobtrusive system for tracking changes here would be nice.
liquidex added the
feat
label 2024-09-12 22:51:25 +02:00
liquidex changed title from Branch edit history to Page edit history 2024-09-24 13:19:39 +02:00
Author
Owner

I've been convinced that a better action plan would be to implement an edit history for individual pages instead of individual branches.

First of all, from an end user experience perspective, branches always live within some context. That context is the page, and only tracking changes to individual branches would be a little pointless. It would introduce noise and the context would be hard to track.

Second of all, this approach is just simpler. All we'd need to do is generate a separate page for each Git revision, perhaps suffixed with a +rev in the filename to differentiate the different pages. rev is a sequential ID for brevity.

The current permalinks /b?id would be replaced with short links /b/id+rev/optional_first_few_words, which would resolve the page page+rev and redirect you to /page+rev#id. That way we'd avoid having to scroll and highlight the branch with JavaScript.

Element IDs are changed to just the branch ID rather than tree_path:branch_id. This will unfortunately break all the old JavaScript #-only links, but I doubt these are in much use, as they only existed before I really talked about the treehouse publicly.

/b?id will still work like it does now---link to the latest revision, because it might be hard to track down which revision was the first as of introducing this feature.

I'll probably play with libgit2 to see how nice we could make this from the developer perspective. (And how much it would slow down generation. Maybe it's time for incremental compilation if it becomes too slow.)

I've been convinced that a better action plan would be to implement an edit history for _individual pages_ instead of individual branches. First of all, from an end user experience perspective, branches always live within some context. That context is the _page_, and only tracking changes to individual branches would be a little pointless. It would introduce noise and the context would be hard to track. Second of all, this approach is just _simpler._ All we'd need to do is generate a separate page for each Git revision, perhaps suffixed with a `+rev` in the filename to differentiate the different pages. `rev` is a sequential ID for brevity. The current permalinks `/b?id` would be replaced with _short links_ `/b/id+rev/optional_first_few_words`, which would resolve the page `page+rev` and redirect you to `/page+rev#id`. That way we'd avoid having to scroll and highlight the branch with JavaScript. Element IDs are changed to just the branch ID rather than `tree_path:branch_id`. This will unfortunately break all the old JavaScript `#`-only links, but I doubt these are in much use, as they only existed before I really talked about the treehouse publicly. `/b?id` will still work like it does now---link to the latest revision, because it might be hard to track down which revision was the first as of introducing this feature. I'll probably play with libgit2 to see how nice we could make this from the developer perspective. (And how much it would slow down generation. Maybe it's time for incremental compilation if it becomes too slow.)
liquidex added a new dependency 2024-09-26 22:29:41 +02:00
liquidex added a new dependency 2024-09-26 22:32:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: liquidex/treehouse#16
No description provided.