county commited on
Commit ·
fb3df2e
1
Parent(s): 2a0195a
Update emotion second-order sample and collapse OE answer
Browse files- script.js +24 -11
- styles.css +28 -1
- videos/h9Zol4P5u9Q.mp4 +3 -0
script.js
CHANGED
|
@@ -112,19 +112,19 @@ const sampleData = [
|
|
| 112 |
]
|
| 113 |
},
|
| 114 |
{
|
| 115 |
-
qaId: "
|
| 116 |
-
id: "
|
| 117 |
dimension: "Emotion",
|
| 118 |
order: "Second-order",
|
| 119 |
-
target: "
|
| 120 |
-
question: "What does
|
| 121 |
openEndedAnswer:
|
| 122 |
-
"The woman
|
| 123 |
options: [
|
| 124 |
-
{ label: "A", text: "She thinks he
|
| 125 |
-
{ label: "B", text: "She thinks he
|
| 126 |
-
{ label: "C", text: "She thinks he
|
| 127 |
-
{ label: "D", text: "She thinks he
|
| 128 |
]
|
| 129 |
},
|
| 130 |
{
|
|
@@ -267,10 +267,13 @@ function renderSamples(active = carouselState.activeDimension, index = 0) {
|
|
| 267 |
const detailBlocks = item.openEndedAnswer
|
| 268 |
? `
|
| 269 |
<div class="oe-card">
|
| 270 |
-
<
|
| 271 |
<span class="oe-badge">Open-Ended Answer</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
</div>
|
| 273 |
-
<p class="oe-text">${item.openEndedAnswer}</p>
|
| 274 |
</div>
|
| 275 |
`
|
| 276 |
: "";
|
|
@@ -317,6 +320,16 @@ function renderSamples(active = carouselState.activeDimension, index = 0) {
|
|
| 317 |
card.querySelector('[data-nav="next"]').addEventListener("click", () => {
|
| 318 |
renderSamples(active, safeIndex + 1);
|
| 319 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
}
|
| 321 |
|
| 322 |
function getMetricLabel(metric) {
|
|
|
|
| 112 |
]
|
| 113 |
},
|
| 114 |
{
|
| 115 |
+
qaId: "h9Zol4P5u9Q@4@character_2@emotion@second",
|
| 116 |
+
id: "h9Zol4P5u9Q",
|
| 117 |
dimension: "Emotion",
|
| 118 |
order: "Second-order",
|
| 119 |
+
target: "Man",
|
| 120 |
+
question: "What does Woman think the man believes about her emotional state during her outburst?",
|
| 121 |
openEndedAnswer:
|
| 122 |
+
"The woman believes the man thinks she is overreacting because his lack of visible concern or engagement suggests he dismisses her emotional display as exaggerated.",
|
| 123 |
options: [
|
| 124 |
+
{ label: "A", text: "She thinks he believes she is overreacting and being overly emotional without cause.", correct: true },
|
| 125 |
+
{ label: "B", text: "She thinks he believes she is sincerely upset because of Sylvia's death and that he should comfort her." },
|
| 126 |
+
{ label: "C", text: "She thinks he believes she is exaggerating for effect and not actually serious about her accusations." },
|
| 127 |
+
{ label: "D", text: "She thinks he believes she is emotionally detached and unaffected by the situation with Sylvia." }
|
| 128 |
]
|
| 129 |
},
|
| 130 |
{
|
|
|
|
| 267 |
const detailBlocks = item.openEndedAnswer
|
| 268 |
? `
|
| 269 |
<div class="oe-card">
|
| 270 |
+
<button type="button" class="oe-head oe-toggle" aria-expanded="false">
|
| 271 |
<span class="oe-badge">Open-Ended Answer</span>
|
| 272 |
+
<span class="oe-caret" aria-hidden="true">▾</span>
|
| 273 |
+
</button>
|
| 274 |
+
<div class="oe-body" hidden>
|
| 275 |
+
<p class="oe-text">${item.openEndedAnswer}</p>
|
| 276 |
</div>
|
|
|
|
| 277 |
</div>
|
| 278 |
`
|
| 279 |
: "";
|
|
|
|
| 320 |
card.querySelector('[data-nav="next"]').addEventListener("click", () => {
|
| 321 |
renderSamples(active, safeIndex + 1);
|
| 322 |
});
|
| 323 |
+
|
| 324 |
+
const oeToggle = card.querySelector(".oe-toggle");
|
| 325 |
+
const oeBody = card.querySelector(".oe-body");
|
| 326 |
+
if (oeToggle && oeBody) {
|
| 327 |
+
oeToggle.addEventListener("click", () => {
|
| 328 |
+
const expanded = oeToggle.getAttribute("aria-expanded") === "true";
|
| 329 |
+
oeToggle.setAttribute("aria-expanded", String(!expanded));
|
| 330 |
+
oeBody.hidden = expanded;
|
| 331 |
+
});
|
| 332 |
+
}
|
| 333 |
}
|
| 334 |
|
| 335 |
function getMetricLabel(metric) {
|
styles.css
CHANGED
|
@@ -830,7 +830,34 @@ code {
|
|
| 830 |
}
|
| 831 |
|
| 832 |
.oe-head {
|
| 833 |
-
margin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 834 |
}
|
| 835 |
|
| 836 |
.oe-badge {
|
|
|
|
| 830 |
}
|
| 831 |
|
| 832 |
.oe-head {
|
| 833 |
+
margin: 0;
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
.oe-toggle {
|
| 837 |
+
width: 100%;
|
| 838 |
+
display: flex;
|
| 839 |
+
align-items: center;
|
| 840 |
+
justify-content: space-between;
|
| 841 |
+
gap: 8px;
|
| 842 |
+
padding: 0;
|
| 843 |
+
border: 0;
|
| 844 |
+
background: transparent;
|
| 845 |
+
cursor: pointer;
|
| 846 |
+
text-align: left;
|
| 847 |
+
}
|
| 848 |
+
|
| 849 |
+
.oe-caret {
|
| 850 |
+
color: #5a6f8c;
|
| 851 |
+
font-size: 0.8rem;
|
| 852 |
+
transition: transform 0.2s ease;
|
| 853 |
+
}
|
| 854 |
+
|
| 855 |
+
.oe-toggle[aria-expanded="true"] .oe-caret {
|
| 856 |
+
transform: rotate(180deg);
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
.oe-body {
|
| 860 |
+
margin-top: 8px;
|
| 861 |
}
|
| 862 |
|
| 863 |
.oe-badge {
|
videos/h9Zol4P5u9Q.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:74ebb062cceb5b51e02a9a4fc93b0341cdc4e7dc55bebe1047b447569b9d6a1b
|
| 3 |
+
size 2228030
|