Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-08 13:55:45 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-08 14:48:57 -0500
commit75aa0fab7e2fba6484fb32e3293892c43eb2327f (patch)
tree2e5c80aa28a9cdcb06dbae0d79d1d6eeeb902a09
parent2f8ce0f2340eb04c53d2c7602cbfc2a7f677aa96 (diff)
downloadtame-75aa0fab7e2fba6484fb32e3293892c43eb2327f.tar.gz
tame-75aa0fab7e2fba6484fb32e3293892c43eb2327f.tar.bz2
tame-75aa0fab7e2fba6484fb32e3293892c43eb2327f.zip
Summary Page: Render template expansion points
This renders template expansions as part of the calculation breakdown, which goes a long way to understanding what the system is doing. This further updates the hover over the breakdown to color-code based on depth, making it easier to observe the nesting of expressions. Sub-expressions that are toplevel results of template expansions (nodes marked with templates) have a thicker border. * src/current/summary.css: Add template id styling, breakdown colors, and misc. styling. * src/current/summary.xsl (ultra-breakdown-set): Enclose label in span. Output template id, if applicable. Mark fieldset if templated.
-rw-r--r--src/current/summary.css56
-rw-r--r--src/current/summary.xsl26
2 files changed, 79 insertions, 3 deletions
diff --git a/src/current/summary.css b/src/current/summary.css
index 0fa6895..d798904 100644
--- a/src/current/summary.css
+++ b/src/current/summary.css
@@ -1,7 +1,7 @@
/**
* Rater XML summary stylesheet
*
- * Copyright (C) 2016 LoVullo Associates, Inc.
+ * Copyright (C) 2016, 2017 LoVullo Associates, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -741,6 +741,17 @@ body:not(.prior) .entry-value-prior
.ultra-breakdown legend > .uid
{
font-size: 0.8em;
+ color: gray;
+}
+
+.ultra-breakdown legend > .tplid
+{
+ font-family: monospace;
+ background-color: lightgoldenrodyellow;
+ border: 1px solid palegoldenrod;
+ border-radius: 0.25em;
+ padding: 0.15em;
+ margin: 0.15em;
}
.ultra-breakdown fieldset
@@ -751,11 +762,54 @@ body:not(.prior) .entry-value-prior
border-radius: 0.5em;
}
+.ultra-breakdown fieldset.templated
+{
+ border-width: 2px;
+}
+
.ultra-breakdown fieldset:hover
{
border-color: black;
}
+.ultra-breakdown > fieldset > fieldset:hover
+{
+ border-color: #009688;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset:hover
+{
+ border-color: #8bc34a;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #ffeb3b;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #ffc107;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #ff5722;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #9C27B0;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #2196f3;
+}
+.ultra-breakdown > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset > fieldset:hover
+{
+ border-color: #009688;
+}
+
+.ultra-breakdown fieldset:hover
+{
+ border-style: solid;
+}
+
.test-summary
{
diff --git a/src/current/summary.xsl b/src/current/summary.xsl
index c711733..15c8b88 100644
--- a/src/current/summary.xsl
+++ b/src/current/summary.xsl
@@ -1732,7 +1732,14 @@
<xsl:param name="label" select="@label" />
<xsl:param name="c" select="." />
+ <xsl:variable name="from-tpl"
+ select="preproc:from-template" />
+
<fieldset>
+ <xsl:if test="$from-tpl">
+ <xsl:attribute name="class" select="'templated'" />
+ </xsl:if>
+
<legend class="debugid">
<xsl:attribute name="id">
<xsl:text>ubd-</xsl:text>
@@ -1740,8 +1747,10 @@
</xsl:attribute>
<xsl:if test="$label">
- <xsl:value-of select="$label" />
- <xsl:text> </xsl:text>
+ <span class="label">
+ <xsl:value-of select="$label" />
+ <xsl:text> </xsl:text>
+ </span>
</xsl:if>
<span class="uid">
@@ -1749,6 +1758,19 @@
<xsl:value-of select="$c/@_id" />
<xsl:text>)</xsl:text>
</span>
+
+ <xsl:if test="$from-tpl">
+ <xsl:for-each select="$from-tpl">
+ <xsl:if test="position() gt 1">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+
+ <span class="tplid">
+ <xsl:text>@</xsl:text>
+ <xsl:value-of select="@name" />
+ </span>
+ </xsl:for-each>
+ </xsl:if>
</legend>
<xsl:apply-templates select="$c" mode="ultra-breakdown-equ" />