[haiku-bugs] [Haiku] #15337: Improved Display of User Usage Conditions in HaikuDepot

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 09 Sep 2019 08:58:26 -0000

#15337: Improved Display of User Usage Conditions in HaikuDepot
-------------------------------------+------------------------------
 Reporter:  apl-haiku                |        Owner:  stippi
     Type:  enhancement              |       Status:  new
 Priority:  normal                   |    Milestone:  Unscheduled
Component:  Applications/HaikuDepot  |      Version:  R1/Development
 Keywords:  conditions text          |   Blocked By:
 Blocking:                           |  Has a Patch:  0
 Platform:  All                      |
-------------------------------------+------------------------------
 This ticket relates to #15209.  This would be a good ticket for either a
 GSOC student or somebody wanting an easily-contained, well defined ticket
 to have a go at.

 == Background

 Some time ago a simple text-engine was created in HaikuDepot.  Part of the
 text engine is able to convert specially formatted plain text and display
 it as rich text graphically on screen.  This means that a series of lines
 such as;

 {{{
 * One tree
 * Three lawns
 * Five hills
 }}}

 Would render with nice bullet-points on screen.  This works well, but it
 assumes a plain text format that is not exactly Markdown
 (https://en.wikipedia.org/wiki/Markdown).  It would be great if the
 formatting would accommodate very basic Markdown and at a minimum, the
 following;

 * Headings of different levels
 * Unordered lists (bullet points) at a single level
 * Paragraphs
 * Bold, Italic, Bold and Italic

 Also great, but more difficult would be;

 * Inline hyperlinks

 It would be good if the work was done in such a way that it would be later
 easy to accommodate additional Markdown features such as;

 * Quoted text
 * Preformatted text
 * Horizonal rules
 * Ordered and unordered lists at multiple levels
 * Inline hyperlinks

 == Specific Use Case

 (see attached screenshots)

 HaikuDepot is able to display "user usage conditions" (UCC).  The UUC can
 be seen by opening HaikuDepot and choosing the top-right drop-down menu.
 This menu often has the title "Not logged in".  You can choose the menu
 item "View latest user usage conditions..." to see the user usage
 conditions.  The goal is to be able to display that document properly.

 == Classes Involved

 The classes involved are contained in the source code for the HaikuDepot
 application.  Specifically the class {{{MarkupParser}}} needs to be
 augmented to support Markdown so that it can be displayed in the View
 class {{{TextView}}}.

 == Test Input Data

 To obtain sample Markdown to test with, see the source for
 HaikuDepotServer (https://github.com/haiku/haikudepotserver) and look for
 a file {{{UUC2019V01.md}}}.  It is possible to see how this is expected to
 look by viewing the UUC on the Haiku Depot Server system (https://depot
 .haiku-os.org/__user/usageconditions/latest/document.html).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15337>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: