Skip to content
Snippets Groups Projects

Convert `Trace.Hpc.Markup.Summary` to use `lucid2` Georgy/lucid summary

Merged Georgy Lukyanov requested to merge geo2a/hpc-bin:georgy/lucid-summary into master

Part of #18

Edited by Georgy Lukyanov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
154 <> "<th colspan=2>covered / total</th>"
155 <> "</tr>"
156 <> concat
157 [ showModuleSummary (modName, fileName, modSummary)
158 | (modName, fileName, modSummary) <- mods
159 ]
160 <> "<tr></tr>"
161 <> showTotalSummary
162 ( mconcat
163 [ modSummary
164 | (_, _, modSummary) <- mods
165 ]
166 )
167 <> "</table></body>"
141 L.body_ $
142 L.table_ [L.class_ "dashboard", L.width_ "100", border_ "1"] $ do
  • 84
    85 last :: L.Html ()
    86 last = L.td_ [L.width_ "100"] (case percent ticked total of Nothing -> "&nbsp;"; Just w -> bar w "bar")
    87
    88 bar :: Int -> String -> L.Html ()
    82 89 bar 0 _ = bar 100 "invbar"
    83 bar w inner =
    84 "<table cellpadding=0 cellspacing=0 width=\"100\" class=\"bar\">"
    85 <> "<tr><td><table cellpadding=0 cellspacing=0 width=\""
    86 <> show w
    87 <> "%\">"
    88 <> "<tr><td height=12 class="
    89 <> show inner
    90 <> "></td></tr>"
    91 <> "</table></td></tr></table>"
    90 bar w inner = L.table_ [cellpadding_ "0", cellspacing_ "0", L.width_ "100", L.class_ "bar"] (L.tr_ (L.td_ innerTable))
  • 87
    88 bar :: Int -> String -> L.Html ()
    82 89 bar 0 _ = bar 100 "invbar"
    83 bar w inner =
    84 "<table cellpadding=0 cellspacing=0 width=\"100\" class=\"bar\">"
    85 <> "<tr><td><table cellpadding=0 cellspacing=0 width=\""
    86 <> show w
    87 <> "%\">"
    88 <> "<tr><td height=12 class="
    89 <> show inner
    90 <> "></td></tr>"
    91 <> "</table></td></tr></table>"
    90 bar w inner = L.table_ [cellpadding_ "0", cellspacing_ "0", L.width_ "100", L.class_ "bar"] (L.tr_ (L.td_ innerTable))
    91 where
    92 innerTable :: L.Html ()
    93 innerTable = L.table_ [cellpadding_ "0", cellspacing_ "0", L.width_ (T.pack (show w))] tableContent
  • I used https://onlinetextcompare.com/html and applied it to the before and after in the golden file to find the differences :)

  • Georgy Lukyanov added 1 commit

    added 1 commit

    • 6bcc13ad - Add percent sign to width attributes

    Compare with previous version

  • Georgy Lukyanov added 1 commit

    added 1 commit

    • 6391a0b8 - Actually, table cell needs width in pixels!

    Compare with previous version

  • Author Developer

    Visual comparison of the output, before on the top, and after on the bottom (no visible difference):Screenshot_2024-06-09_11-09-29

    Edited by Georgy Lukyanov
  • Georgy Lukyanov added 1 commit

    added 1 commit

    • 10a24751 - Add non-braking space between the `module` keyword and name

    Compare with previous version

  • Georgy Lukyanov added 19 commits

    added 19 commits

    Compare with previous version

  • Georgy Lukyanov added 1 commit

    added 1 commit

    Compare with previous version

  • Georgy Lukyanov added 1 commit

    added 1 commit

    Compare with previous version

  • Author Developer

    The previous revision actually had a flaw: no space between the module keyword and the name of the module. Fixed now, before on top, and after on the bottom:

    Screenshot_2024-06-09_15-48-11.png

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading