You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GitLab, the title change event in an issue's or PR's timeline shows exactly what is changed as a diff. On GitHub, it's like "this is the old title, this is the new title, figure out what changed for yourself". For issues/PRs with longer titles, it can be difficult to spot subtle changes.
This has been bothering me too for a while. Ideally the two titles should be collapsed if the changes are minimal, e.g.
Add type/bug and kind/bug to list of supported labels in bugs-tab
Seems easy but producing a reliable diff might not be
This is the tricky part. Pulling in a diffing lib just for this is clearly overkill.
That said, I wonder if a very crude word-diffing algorithm could do the job in just a few lines — and if there's too much differences between the two titles it's not worth having a diff anyway, so the feature could just give up in that case.
What if we just improve the wrapping with del,ins{display:block}? I think this would make it immediately more readable, it would be a tiny CSS change in refined-github.css, and it would also fully work on style-only changes.
That said, I still think a single-line diff would be ideal (especially in the example shown above), so I'd like this issue to remain open even if we make that change.
I think this only works if the changes are minimal. See this change:
- Highlight PR/issue title changes as diffs+ Display title change events as diff
It will be displayed as:
Which I don’t think it's any more clearer than what #5658 will do. Plus we can't select the old title anymore if we made a mistake and want to undo it.
Activity
fregante commentedon May 22, 2022
Seems easy but producing a reliable diff might not be, plus add the DOM since GitHub renders the backticks. How would this diff this be rendered?
It's impossible to render this way because the visible text is the same, only the "style" changes
FloEdelmann commentedon May 22, 2022
We could diff only "real" changes to
textContent. "Style"-only changes are quite visible without the diff anyway.cheap-glitch commentedon May 22, 2022
This has been bothering me too for a while. Ideally the two titles should be collapsed if the changes are minimal, e.g.
This is the tricky part. Pulling in a diffing lib just for this is clearly overkill.
That said, I wonder if a very crude word-diffing algorithm could do the job in just a few lines — and if there's too much differences between the two titles it's not worth having a diff anyway, so the feature could just give up in that case.
fregante commentedon May 22, 2022
i.e. avoid applying the diff if any
renderedtext is present? If not, this is a "real" change that also has a style change:💯
Could be looked at if really crude and non-problematic, after we figure out what to do with
renderedtitles.fregante commentedon May 23, 2022
What if we just improve the wrapping with
del,ins{display:block}? I think this would make it immediately more readable, it would be a tiny CSS change inrefined-github.css, and it would also fully work on style-only changes.Before
After
cheap-glitch commentedon May 23, 2022
That's definitely an improvement, I like it!
That said, I still think a single-line diff would be ideal (especially in the example shown above), so I'd like this issue to remain open even if we make that change.
[-]Highlight PR/issue title changes as diff[/-][+]Display title changes events as diffs[/+]fregante commentedon May 29, 2022
I think this only works if the changes are minimal. See this change:
It will be displayed as:
Which I don’t think it's any more clearer than what #5658 will do. Plus we can't select the old title anymore if we made a mistake and want to undo it.
#5658 `22.5.22` Stack title edits