https://l10n.mozilla.org/source/diff/?from=a55fc92d7573&to=444b008f2971&repo=releases%2Fl10n%2Fmozilla-beta%2Fhu This changeset removed to ZWNJ characters, but the diff doesn't show anything. A similar issue happens when a trailing or leading space is removed. We should try to show these changes.
Looking at data we have in browser.dtd, I see some C? categorized characters, notably: 10 10 173 SOFT HYPHEN 8203 ZERO WIDTH SPACE 8204 ZERO WIDTH NON-JOINER 8205 ZERO WIDTH JOINER 8207 RIGHT-TO-LEFT MARK 8288 WORD JOINER I've asked jfkthame, and we can't just switch a font, so we'll need to render them somehow, and I wonder under which conditions we actually should. And if so, how? (For space, I think we should just switch on CSS preserve whitespace). So, for Other characters, should we show them if they're the only member of an orange block? Or rather, if an orange block is only made of special chars? And if so, how? Hex? Or some svg? I was wondering about some svg span that -- wait for it -- ascii arts like ---- | 00 | | 00 | ---- or ---- | ZW | | S | ---- or so (using the first letter of each word in the name, falling back to something hexy?)
(In reply to Axel Hecht [:Pike] from comment #1) > (For space, I think we should just switch on CSS preserve whitespace). You also need some highlighting to see them. > So, for Other characters, should we show them if they're the only member of > an orange block? Or rather, if an orange block is only made of special chars? Can you define what's an orange block? I lost you. > And if so, how? Hex? Or some svg? I was wondering about some svg span that > -- wait for it -- ascii arts like What about highlighting them visually and using the character code as a tooltip of the span?
orange block as in the accesskeys in https://l10n.mozilla.org/source/diff/?from=61a146733cbe&to=%20a87ad7679ad6&repo=l10n-central%2Fit, a changed sequence of code points. We can't do anything with the special chars with CSS, says jfkthame, they're removed at a level of layout that we don't have access to in the end. I need to replace them with something else.
My idea would be to highlight changes of these characters, and that includes addition and removal. I don't think that would be covered by orange blocks? No clue if that's applicable here, but what we do in Transvision is to replace them before displaying with styled <span> elements.
Looking at transvision, https://github.com/mozfr/transvision/blob/4250ee94ab6aef48073b92eab3b83dd23b30fcb6/app/classes/Transvision/Strings.php#L118-L133, that highlights whitescape only, and that seems fine to do. (Given I'm not showing … as &, I don't think there's something to do for ellipses.) For non-whitespace like zwnj or bidi markers, replacing them will likely break rendering, and I'd rather only do that if we have to. An example of that are "seemingly empty" strings, which are just a special char, or changes to just a special char. In that sense, I'd do this for all blocks of the diff, not just orange ones, thinking about that. Another whitespace that I'm lenient about right now are newlines. Any particular suggestion on what to do with those?
(In reply to Axel Hecht [:Pike] from comment #5) > Another whitespace that I'm lenient about right now are newlines. Any > particular suggestion on what to do with those? I'm trying to think of real cases where this kind of changes happened, and I'm failing. I also have a hard time thinking on how to show such change.