cauli icon indicating copy to clipboard operation
cauli copied to clipboard

Add a pretty-print function to the Inspector floret

Open brototyp opened this issue 6 years ago • 1 comments

There are some values of a request or a response that are poorly printed or not visible at all. The scope of this ticket is to add an infrastructure to be able to pretty-print data.

Proposal

  • We define a pretty-print ViewController protocol, for example: PrettyPrinter
  • The PrettyPrinter defines a static func viewController(for item: Any) -> UIViewController?
  • A list of PrettyPrinter classes is defined
  • A default mimetype-to-prettyprinter-class mapping is defined
  • If a row for a record is tapped
    • If it is the request or response body, the mimetype mapping is used to find a PrettyPrinter-class
    • If no PrettyPrinter is found, or the PrettyPrinter failed to create a ViewController for that item, the user can select from a list of all PrettyPrinter classes or can chose to share this item

brototyp avatar Jan 13 '19 20:01 brototyp

This issue is only partially implemented.

brototyp avatar Mar 03 '19 16:03 brototyp