From 0dcef0d4d35cadd40ef908c2de3396cc56721949 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Sun, 17 Jun 2018 14:34:02 +0200
Subject: Adjust TalentTable to fit ReportTable's UX

---
 src/HeroTalentTable.vue | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

(limited to 'src/HeroTalentTable.vue')

diff --git a/src/HeroTalentTable.vue b/src/HeroTalentTable.vue
index 5c3545b..6bd228a 100644
--- a/src/HeroTalentTable.vue
+++ b/src/HeroTalentTable.vue
@@ -6,29 +6,33 @@
 
     <b-table :data="heroReport"
              :mobile-cards="false">
+      <template slot-scope="props" slot="header">
+        <b-tooltip :active="!!props.column.meta" :label="props.column.meta || ''" position="is-bottom" dashed>
+          {{ props.column.label }}
+        </b-tooltip>
+      </template>
+
       <template slot-scope="props">
         <b-table-column field="Talent" label="Talent">
           <talent-image :entry="props.row" :size="48"></talent-image>
         </b-table-column>
 
-        <b-table-column field="Winner" label="Level 1 Win Rate" sortable numeric>
+        <b-table-column field="TalentWinrateBase" label="Level 1 Win Rate" meta="Estimated." sortable numeric>
           <template v-if="isNaN(props.row.TalentWinrateBase)">
-            {{ (100 * props.row.Winner).toFixed(2) }}%
+            {{ (100 * props.row.Winner).toFixed(2) }}% <!-- No Talent -->
           </template>
           <template v-else>
             {{ (100 * props.row.TalentWinrateBase).toFixed(2) }}%
           </template>
+          <small v-if="props.row.SampleTooSmall">uncertain</small>
         </b-table-column>
 
-        <b-table-column field="TalentWinrateScaling" label="Win Rate Advantage" sortable numeric>
-          <template v-if="isNaN(props.row.TalentWinrateScaling) || props.row.SampleTooSmall">
-            <span class="mdi mdi-gauge-empty mdi-18px" title="Not enough data"></span>
-          </template>
-          <template v-else>
-            {{ (props.row.TalentWinrateScaling > 0? '+' : '') + (100 * props.row.TalentWinrateScaling / getLevelBuckets()).toFixed(2) }}% <small>for {{ getLevelsPerBucket(props.row) + (getLevelsPerBucket(props.row) > 1? ' Levels' : ' Level') }}</small>
+        <b-table-column field="TalentWinrateMax" label="Max Level Win Rate" meta="Estimated." sortable numeric>
+          <template v-if="!isNaN(props.row.TalentWinrateMax)">
+            {{ (100 * props.row.TalentWinrateMax).toFixed(2) }}%
+            <small v-if="props.row.SampleTooSmall">uncertain</small>
           </template>
         </b-table-column>
-
       </template>
     </b-table>
   </div>
-- 
cgit v1.3.1

