ploeh.github.com icon indicating copy to clipboard operation
ploeh.github.com copied to clipboard

Make changes easier to detect

Open ploeh opened this issue 5 years ago • 7 comments

A blog post is, in many ways, anchored in time. Sometimes, however, I feel that I need to make changes to a post.

For some time, I've made use of the semantic markup elements del, ins, and so on. Deletions are fairly easy for the reader to detect, because they're decorated with the strikethrough style, but I explicitly removed the underline decoration from inserts because I thought it made the text harder to read.

Since I started to use those semantic markup elements, I've made an effort to include the datetime attribute.

It'd be nice if any semantic element that comes with a datetime element would display a tool tip when you hover over it. Something like added December 18, 2019, 11:27 UTC.

For additions (<ins>), it'd also be nice if there was some none-intrusive hint that this text is a bit different. Perhaps a slightly shaded background colour...

ploeh avatar Dec 21 '19 13:12 ploeh

I like how StackOverflow and GitHub handle this problem, which is by linking to the revision history of the question/answer/comment with the link text being the time of the most recent edit.

My first thought to achieve this behavior on your blog is to link to the revision history of the file in question. However, that history would include non-content changes from added comments and site-wide changes.

So my next thought is to link to a manually built page where you list only the commits that changed content. This seems reasonable to me.

TysonMN avatar Jun 15 '20 00:06 TysonMN

Why not the approach similar to ADRs?

Editted post is a new post which automatically overrides the previous one.

20240501_Dutch_is_not_the_language_of_Denmark
20250812_Dutch_is_not_the_language_of_Denmark

Mostly it's going to be a copy paste. Then you can show the difs with something like diff2html or similar frontend js lib.

voroninp avatar Jun 07 '24 07:06 voroninp

Editted post is a new post which automatically overrides the previous one.

How would the new post automatically override the previous one, assuming that they have different permalinks?

ploeh avatar Jun 07 '24 08:06 ploeh

Some js will be needed on the page.

If we opened <DateX>_<FileName> we can list the files, select all files matching the pattern and redirect to the latest one.

If this is much of a hustle, then files should be double linked: prev + next

voroninp avatar Jun 07 '24 08:06 voroninp

This sounds more complicated than using <ins> and <del>. What would be the benefit of this?

ploeh avatar Jun 07 '24 09:06 ploeh

You do it only once (js part).

Then you just copy the whole file, update the date prefix and edit it. For me it's easier than effectively doing diff by hand.

voroninp avatar Jun 07 '24 10:06 voroninp

@voroninp Thank you for taking the time to respond. To be clear, I don't think this is a direction I'd like to go.

I already have <ins> and <del> markup in place. The only thing remaining to be done is a bit of CSS(?) to render the existing metadata in a way such that visibility is improved.

ploeh avatar Jun 08 '24 08:06 ploeh