Page MenuHomePhabricator

Establish consistent guidelines on how to visualize diffs across desktop, mobile web, and mobile apps
Closed, DuplicatePublic

Description

Background goal

Requesting Team
Mobile Apps

Who is your main point of contact and contact preference?
@scblr for design questions/decisions
@JTannerWMF for product decisions
@LGoto for coordination and updates

What are the details of your request? Include relevant timelines or deadlines
The Android team adopted Mobile Web diff colors and added strike through for something that has been removed and a plus for things that have been added due to our concern of red and green being colors that are not friendly for color blind users. A cross platform user explained the lack of consistency across Android app, Mobile Web, and Desktop is confusing and has high switching cost. The iOS team is starting to work on bringing Watchlist in to their app and anticipates an increase of multiplatform users that raise this issue. Apps are looking to us (DST) to identify the best way to visualize diffs and push for the adoption of those guidelines globally. We have already identified that for accessibility reasons, the guidelines should not exclusively rely on color.

Original request to the mobile apps team is in T315348: Color consistency for diffs on Android vs Desktop.
See also existing task T90948: Identify the best diff style (mobile or desktop) and use it on both mobile and desktop

How does the request fit within the departmental or foundation priorities?
Accessibility and the annual plan goal to support moderators (Watchlist is a tool heavily by moderators and it was a moderated that reported this problem)

Is this request urgent or time sensitive?
Apps will implement using existing mobile web colours and the bold/strikethrough styling for addition/deletion of text respectively until this task is moved forward.

Current colors used for diff on the different platforms and diff modes (Visual Editor vs Wikitext) as at April 2023
NotesLightDark
Web desktop
(Vector skin)
Wikitext view
image.png (862×1 px, 406 KB)
--
Web desktop
(Vector skin)
VE view
image.png (710×1 px, 464 KB)
--
Web mobile
(Minerva skin)
Wikitext view
image.png (932×806 px, 254 KB)
--
Web mobile
(Minerva skin)
VE view
image.png (990×756 px, 118 KB)
--
iOS app
IMG_9A9D0834078F-1.jpeg (2×1 px, 611 KB)
--
Android app
image.png (1×760 px, 340 KB)
--

Note: There may be pending changes or additions from recent work by CommTech and Moderator Tools as part of Better-Diffs-2023

Considerations
  • Colour considerations: Avoid to use Red and Green since they are colors that are not friendly for color blind users .
    Captura de pantalla 2023-04-07 a las 17.49.21.png (1×1 px, 679 KB)
    • Achromatopsia users will perceive colors as gray scales, so we'll need to use different lightness levels. Check the example below:
      Achromatopsia.png (1×1 px, 216 KB)
  • Additional text styling to improve accessibility - for example, using strikethrough on deletions as an additional signifier besides colour is advisable.
  • Considerations for text styling in different language scripts - for example, certain scripts may not be as legible or render in bold or strikethrough.
  • Additional markers for diff changes - in Better-Diffs-2023, there are a number of tasks related to adding symbols and other markers on top of the diff styling to indicate changes - see T324755, T327193, T330247, and T324759.
  • "Highlight" text colours in use currently, for example in Visual editor (such as when link text highlighted to show the link editor), Content Translation, and Structured tasks . See T280670: Add a unified text highlight component to Codex Previous discussions
  • Talk page of Better Diffs (comments):
    • "Overall, I think this wish has made me realise how much clearer diffs can be, and how much we can copy what github does (https://www.matthewsetter.com/better-git-diff-support/) in terms of red/green colours and using two layers of colours. Imagine if you can actually find a comma added to a paragraph, because it's sentence is highlighted + the comma double highlighted!"
    • "Good work. I can now tell the difference between adding a newline and completely replacing a paragraph, which was the brief. I would also prefer the highlighting to be much more visible. Backgrounds of #80c0ff for .diff-addedline.diffchange and #ffc080 or even #ffa040 for .diff-deletedline.diffchange would enable us to find that elusive added or removed comma hidden in a twenty-line paragraph. Certes (talk) 18:57, 20 March 2023 (UTC)"
Open questions

Include any open questions here if needed.

Design proposal

Inventory and explorations captured in this Figma file.

Acceptance criteria (or Done)
  • Audit of diff representation across different products and platforms (audit found here)
  • Work with relevant teams in establishing unified diff styling on Web (Desktop, Mobile) and Apps (iOS, Android) across different Platforms
    • Define colors for removals, additions, changes
    • Define other styling to reinforce the concept of removals and additions (e.g. Bolding text changes, strikethrough for deletions)
  • Determine what diff elements should be defined as system tokens
  • Publish on wiki for consultation
  • Consult with relevant teams to adopt new diff colors on Web and Apps

Related Objects

Event Timeline

@JTannerWMF @LGoto This ticket is follows a new request triaging format we are testing out on DST. Would you mind filling in some of the details in the description? We had not really discussed timeline and urgency for this request.

After discussing with DST members further, we do still believe the visual style falls within the DST mandate and makes sense for us to drive. That being said, although it might sound like it, this is not a trivial task. If we were to take this on, we would need to determine if the same visual style should be used for the 2-column and the 1-column (inline) diffs use cases and then document the decision somewhere public listing DST as the authority. We would then still need alignment across the different product teams to implement the visual style changes to achieve end-user impact. There is a lot of historical context on this topic (T90948) with no clear resolution. There were plans to pull this into the Design Style Guide (T280670, T280717), but I'm not sure it makes sense to automatically assume these should be pulled into Codex. We are building Codex as the design system for Wikimedia, but it is intended to be agnostic from MediaWiki. One could argue that diffs are much more of a MediaWiki-specific use case, and not necessarily broadly applicable to Wikimedia.

Again, it doesn't mean we shouldn't take this on a the design systems team, but it is not directly in service of our goals around Codex adoption, which makes it challenging to prioritize. DST likely will not have the design capacity to take this on until the end of FY22-23 Q4 at the earliest. I don't want the apps teams to be blocked on this until we come to a resolution. Apart from the benefits of consistency, is there a specific urgent need to align the colors on the mobile apps? In my opinion, the fact that the mobile apps already use more than just color (i.e. strikethroughs and bold styling) for diffs is actually an improvement over some of the web experiences.

@CCiufo-WMF Okay, well i will just have iOS adopt the colors of Android. If there are more complaints from experienced users, I will direct them to this ticket and depending on the volume of requests that may increase the urgency. For now its one active user on EN that has made the request. I do think there are phases this can go in, like the scope has expanded to adding it to codex and getting other platforms on board, I think even knowing the preferred style guideline would be a good first step (and the only one we need), but I trust your judgement. I have no visibility into your team's roadmap so its hard to say how urgent it is relative to your other work.

I agree this makes sense for DST to help guide direction, but think it would make sense to do so in collaboration with the owner(s)/maintainers of Diff as they would be the ones to make changes to diff on web. Would that be the Web team (@ovaliseva) and/or Editing (@nayoub)?

@CCiufo-WMF Okay, well i will just have iOS adopt the colors of Android. If there are more complaints from experienced users, I will direct them to this ticket and depending on the volume of requests that may increase the urgency. For now its one active user on EN that has made the request. I do think there are phases this can go in, like the scope has expanded to adding it to codex and getting other platforms on board, I think even knowing the preferred style guideline would be a good first step (and the only one we need), but I trust your judgement. I have no visibility into your team's roadmap so its hard to say how urgent it is relative to your other work.

Agreed that all we need to start is the guideline, and that does require design research and thought. As @RHo mentioned, we'd want alignment with those teams working on Diffs on web, even if the work to implement the changes doesn't happen immediately.

From a resourcing perspective, we'll likely be better set up to look at this towards the end of the current FY or as part of next FY. As you mentioned, it does line up with drafted goals for next year around accessibility and moderator productivity. Our goals for the current quarter will be on-wiki soon, but like most teams, we haven't finalized anything for next FY just yet.

Thanks for taking up this initiative. Although there hasn't been a lot of comments related to colors on the Talk page of Better Diffs, here are couple of feedback we received:

"Overall, I think this wish has made me realise how much clearer diffs can be, and how much we can copy what github does (https://www.matthewsetter.com/better-git-diff-support/) in terms of red/green colours and using two layers of colours. Imagine if you can actually find a comma added to a paragraph, because it's sentence is highlighted + the comma double highlighted!"

"Good work. I can now tell the difference between adding a newline and completely replacing a paragraph, which was the brief. I would also prefer the highlighting to be much more visible. Backgrounds of #80c0ff for .diff-addedline.diffchange and #ffc080 or even #ffa040 for .diff-deletedline.diffchange would enable us to find that elusive added or removed comma hidden in a twenty-line paragraph. Certes (talk) 18:57, 20 March 2023 (UTC)"

Hey @CCiufo-WMF the mobile web diff page which uses green and red (in your screenshot "Web mobile (Minerva skin) - Wikitext view") is in the process of being removed (T358293). It is not linked to in production so no need to consider it as part of this task

Hey @CCiufo-WMF the mobile web diff page which uses green and red (in your screenshot "Web mobile (Minerva skin) - Wikitext view") is in the process of being removed (T358293). It is not linked to in production so no need to consider it as part of this task

Good to know, thanks. I think we are going to combine this task with T358406 and tackle:

  • Deciding which colors to unify on
  • Ensuring those colors are accessible
  • Capturing them as design tokens and applying them to the various use cases

Closing as a duplicate of T394117: [EPIC] Diff styling where this work will continue and will be broken up into smaller pieces.