Stream: IG creation
Topic: highlighting new content.
Eric Haas (Jul 11 2020 at 14:48):
I've had a request to highlight newly added content to an existing ig. I think it would be nice to add highlighting like
and maybe a new-content class like below to the base template
Eric Haas (Jul 11 2020 at 14:48):
/* ----------New content for ballot styling------*/
.new-content::before {
white-space: pre;
content: "New Content\A ";
color: red;
font-weight: bold;}
.new-content{
margin: 5px;
padding: 10px;
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
Eric Haas (Jul 11 2020 at 14:58):
so could easily highlight like so..
The domestic cat[1][5] (Latin: Felis catus) is a small, typically furry, carnivorous mammal. They are often called house
cats when kept as indoor pets or simply cats when there is no need to distinguish them from other felids and felines.[6]
Cats are often valued by humans for companionship and for their ability to hunt vermin. There are more than 70 cat
breeds, though different associations proclaim different numbers according to their standards.
{:.new-content}
Lloyd McKenzie (Jul 11 2020 at 15:00):
That's a nice idea, though obviously it's extra work for the author. Presumably it would be turned on for ballot and turned off for final publication? If we wanted to keep it for final publication, it'd be nice if we had a way for the user to toggle it. (Also need to make sure that the color schemes we choose are friendly to those who have color-challenges.)
Eric Haas (Jul 11 2020 at 15:20):
I wasn't thinking about toggling but that could be a feature. Re turning off or on besides removing the class tags I don't think you want them hanging around through the next publishing cycle. and I stole those colors from hackmd as examples there may be some guidance somewhere.
Lloyd McKenzie (Jul 11 2020 at 16:07):
Agree you'd yank the tags for the next publishing cycle - but if it was desired to have the changes highlighted in a final publication, it'd be nice to be able to turn them off. (Actually, in a final publication, I'd probably have the default be 'off'.)
Jose Costa Teixeira (Jul 11 2020 at 16:39):
I was thinking of doing some diff'ing between content versions (changes between 2 igs). Perhaps this can be combined
Grahame Grieve (Jul 11 2020 at 21:31):
In general, I think that this is bit simplistic; it works well for added narrative, but not so much for other changes. Which is why, in the base spec, I focus on diffs. We haven't done that for IGs - we probably should
Grahame Grieve (Jul 11 2020 at 21:31):
I could retrospectively add that to all published IGs on the hl7.org and fhir.org web sites
Eric Haas (Jul 11 2020 at 21:52):
I think that this is bit simplistic
What exactly? the highlighting overall or the idea of toggle on/off?
I was only looking for simple syntax highlighting. Providing a way to look at new content can be visually complex since many changes are simply moving text around or removing space or an edit here or there. Rarely is there a nice clean block of new content to review. So is gets noisy very quickly imo.
Last updated: Apr 12 2022 at 19:14 UTC