Skip to content

Commit 3335b23

Browse files
committed
Improve scorecard
1 parent b39fdf5 commit 3335b23

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/routes/scorecard/Scorecard.svelte

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
<script lang="ts">
2+
import Button from '$lib/components/Button.svelte'
23
import Cell from './TableCell.svelte'
34
import { categories } from './categories'
45
import { companies } from './companies'
56
67
let showExplanation = false
78
</script>
89

9-
<label>
10-
<input type="checkbox" bind:checked={showExplanation} />
11-
Show explanations
12-
</label>
10+
<Button on:click={() => (showExplanation = !showExplanation)}>Toggle explanations</Button>
1311

1412
<table class={showExplanation ? 'table--big' : ''}>
1513
<thead>

src/routes/scorecard/TableCell.svelte

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,24 @@
2020
}
2121
}
2222
}
23+
24+
function maybeShowTooltip() {
25+
if (!showExplanation) {
26+
showTooltip = true
27+
}
28+
}
29+
30+
function handleClick() {
31+
!showExplanation && (showExplanation = !showExplanation)
32+
}
2333
</script>
2434

2535
<td
26-
on:mouseover={() => (showTooltip = true)}
36+
on:mouseover={maybeShowTooltip}
2737
on:mouseout={() => (showTooltip = false)}
28-
on:focus={() => (showTooltip = true)}
38+
on:focus={maybeShowTooltip}
2939
on:blur={() => (showTooltip = false)}
30-
on:click={() => (showExplanation = !showExplanation)}
40+
on:click={handleClick}
3141
class={showExplanation ? '' : 'enable-tooltips'}
3242
>
3343
{#if title !== undefined}

src/routes/scorecard/companies.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const companiesSource: Company[] = [
6262
explanation:
6363
// https://corporateeurope.org/en/2023/11/byte-byte
6464
'Microsoft has lobbied to shift the burden of responsibility onto users of AI instead of the ones building the AI.',
65-
score: 3
65+
score: 2
6666
},
6767
deployment: {
6868
explanation:
@@ -111,7 +111,7 @@ const companiesSource: Company[] = [
111111
// https://pitchbook.com/news/articles/generative-AI-Capitol-Hill-VC
112112
explanation:
113113
"Anthropic has spent (a little) money lobbying, but it's unclear what they are pushing for.",
114-
score: 7
114+
score: 5
115115
},
116116
deployment: {
117117
explanation:
@@ -135,7 +135,7 @@ const companiesSource: Company[] = [
135135
},
136136
lobby: {
137137
explanation: 'No lobbying as far as we know of yet.',
138-
score: 7
138+
score: 5
139139
},
140140
deployment: {
141141
explanation: 'Not sure tbd',

0 commit comments

Comments
 (0)