Page MenuHomePhabricator

Add line numbers to the editing interface: As an editor on the iOS app I would like to be able to easily find my place in the editing interface
Closed, ResolvedPublic

Description

Why are we doing this?

Feedback from users suggests that it is hard to re-find a specific line in the editing interface. Many code editors include line numbers to alleviate this issue and we would like to adopt this approach as well.

User story

As an editor on the iOS app I would like to be able to easily find my place in the editing interface.

Suggested features

  • Show/hide line numbers with syntax highlighting
  • Collapse templates by tapping on an indicator in the line number area

Stretch features

  • Syntax error indication from the line number
  • 'Ask for help'

Mocks

Example of line numbers with template extendedExample of line numbers with template condensed
01 Editing.png (1×750 px, 179 KB)
03 Template collapsed.png (1×750 px, 184 KB)
Zeplin: https://zpl.io/bz1KPEGhttps://zpl.io/boZwWxo

Design details

  • Line breaks are represented by a sequential number
  • At the start of a template a chevron is shown, tapping on the line number collapses the template. Tapping on the number again re-exposes the template
  • If a template is embedded within a line with non-template text the non-template text should remain exposed, which may mean that the tail end of the template is still expanded when the rest of the template is collapsed
  • On the line where the cursor is present, the line number indicator should be presented in blue and bolded
  • The start of each section should be denoted with the line number '1'

Event Timeline

For v1 this ticket doesn't include stretch features.

I think this is blocked by figuring out exactly how we're gonna lex/parse/present wikitext - ie line numbering should use same mechanism for knowing which bits are template bits. Edit: seems Joe's codemirror demo already handles line numbers...

Per the meeting this is largely enough for v1 but would like the dots for lines with no numbers if possible.

@cmadeo @JMinor unfortunately it looks like dots for line numbers is going to be a big ask, each "line" includes the wrapped content and there's no easy way to align the dots with the other lines

Screen Shot 2019-01-09 at 6.54.51 AM.png (2×1 px, 733 KB)

@JoeWalsh thanks for taking a look into this! since it doesn't seem to be causing any usability issues for new users I can make a backlog ticket for this.

cmadeo added a project: Product-QA.
cmadeo added a subscriber: ABorbaWMF.

Looking good on all of the themes for me.

As a note to @ABorbaWMF : we are not supporting inline errors (red dot) or cursor placement (blue number) in this version.

Looks good to me across a few languages, devices and all the themes on 6.2.0 (1564)

JMinor claimed this task.

Bootiful!