Page MenuHomePhabricator

Improve Harbomaster/Drydock UI/UX before release
Closed, ResolvedPublic

Description

We're planning to unprototype Drydock in the cluster soon (see parent task T10246). Before doing this, there are some technical and usability issues in Harbormaster and Drydock that I want to try to clean up.

Event Timeline

Is support of ansi color possible in this harbormaster iteration ? I mean not only parse the ansi code but also generate a markup based on the color.
As far as I remenber it wasn't the case.

Sometimes some information highlight are really usefull : in my ansible deploy (as a use case), they differentiate the log level.
But I understand if harbormaster console isn't the higher priority.

@epriestley : sorry, I should have searched more thoughtfully.

Concerning

Cool, that makes sense. I think the way forward here is:

  • Write an "ANSI console output" syntax highlighter, which converts text input with ANSI sequences into HTML. This will be slightly unusual in that it will mutate the input (other highlighters generally preserve the input faithfully) but there's no technical reason this isn't workable (except that it may need to emit hidden placeholder characters to replace the ANSI escape sequences, so character-by-character diff algorithms can operate on it correctly).
  • Have the language detector infer ANSI if input contains ANSI escape sequences and doesn't match other detectors.

Is it something community can do ?
If so, where shall I start ?

So far, if my contribution can interest you, i would :

  • first implement a ANSI parser that strip out ansi code (like  ) replacing it by U+FFF9 or U+FFFB depending if it is an ansi open code or an ansi close : this would be a PhutilMarkupEngine, right ?
  • generate a syntax highlighter ( iw ould learn how to do it based on PhutilRainbowSyntaxHighlighter)

If you agree on this, I would open a new feature request task, and start diffing.

I don't think there's anything actionable remaining here that isn't covered elsewhere.