Skip to content

Commit 585d0ac

Browse files
author
Brian Genisio
committed
Use the split panel component from the design system
1 parent c341ec5 commit 585d0ac

File tree

10 files changed

+357
-88
lines changed

10 files changed

+357
-88
lines changed

data/answer.md

Lines changed: 10 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,33 @@ Text Input
44

55
__Summary__
66

7-
5/5 correct
7+
0/2 correct
88

99
__Responses__
1010

1111
1. **Question 1**
12-
- Selected Answer: paris
12+
- Selected Answer: No answer selected
1313
- Correct Answer: Paris
14-
- Result: ✓ Correct
14+
- Result: ✗ Incorrect
1515

1616
2. **Question 2**
17-
- Selected Answer: 3.14
18-
- Correct Answer: 3.14
19-
- Result: ✓ Correct
20-
21-
3. **Question 3**
22-
- Selected Answer: 1 kg
23-
- Correct Answer: 1 kg
24-
- Result: ✓ Correct
25-
26-
4. **Question 4**
27-
- Selected Answer: do not repeat yoursel
28-
- Correct Answer: Don't Repeat Yourself
29-
- Result: ✓ Correct
30-
31-
5. **Question 5**
32-
- Selected Answer: ccommotion
33-
- Correct Answer: accommodation
34-
- Result: ✓ Correct
35-
36-
__Practice Question__
37-
38-
What is the capital of France? (Accept any case variation)
39-
40-
__Correct Answers__
41-
42-
- Paris [kind: string] [options: caseSensitive=false,fuzzy=false]
43-
44-
__Practice Question__
45-
46-
What is the approximate value of π? (Accept values within 0.1)
47-
48-
__Correct Answers__
49-
50-
- 3.14 [kind: numeric] [options: threshold=0.1,precision=2]
51-
52-
__Practice Question__
53-
54-
How many kilograms are in 1000 grams? (Include unit)
55-
56-
__Correct Answers__
57-
58-
- 1 kg [kind: numeric-with-units] [options: threshold=0.01,precision=2,units=kg]
17+
- Selected Answer: No answer selected
18+
- Correct Answer: 4
19+
- Result: ✗ Incorrect
5920

6021
__Practice Question__
6122

62-
What is the famous programming principle that states "Don't Repeat Yourself"? (Accept variations with punctuation, spacing, and minor spelling errors)
23+
What is the capital of France?
6324

6425
__Correct Answers__
6526

66-
- Don't Repeat Yourself [kind: string] [options: caseSensitive=false,fuzzy=true]
27+
- Paris [kind: string] [options: caseSensitive=false]
6728

6829
__Practice Question__
6930

70-
Spell the word "accommodation" (Accept minor spelling errors)
31+
What is 2 + 2?
7132

7233
__Correct Answers__
7334

74-
- accommodation [kind: string] [options: caseSensitive=false,fuzzy=0.7]
35+
- 4 [kind: numeric] [options: threshold=0.01,precision=2]
7536

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
__Type__
2+
3+
Text Input
4+
5+
__Content__
6+
7+
# Additional Information
8+
9+
This section provides context and details to help you answer the questions below.
10+
11+
## Key Concepts
12+
13+
- **Capital City**: The city that serves as the seat of government
14+
- **Mathematical Operations**: Basic arithmetic including addition, subtraction, multiplication, and division
15+
16+
## Tips
17+
18+
1. Read each question carefully
19+
2. Consider the context provided
20+
3. Check your spelling before submitting
21+
22+
---
23+
24+
> Note: All answers are case-insensitive unless otherwise specified.
25+
26+
__Practice Question__
27+
28+
What is the capital of France?
29+
30+
__Correct Answers__
31+
32+
- Paris [kind: string] [options: caseSensitive=false]
33+
34+
__Practice Question__
35+
36+
What is 2 + 2?
37+
38+
__Correct Answers__
39+
40+
- 4 [kind: numeric] [options: threshold=0.01,precision=2]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
__Type__
2+
3+
Text Input
4+
5+
__Content__
6+
7+
https://example.com/documentation
8+
9+
__Practice Question__
10+
11+
What is the capital of France?
12+
13+
__Correct Answers__
14+
15+
- Paris [kind: string] [options: caseSensitive=false]
16+
17+
__Practice Question__
18+
19+
What is 2 + 2?
20+
21+
__Correct Answers__
22+
23+
- 4 [kind: numeric] [options: threshold=0.01,precision=2]

data/question.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,39 @@ __Type__
22

33
Text Input
44

5-
__Practice Question__
6-
7-
What is the capital of France? (Accept any case variation)
8-
9-
__Correct Answers__
10-
11-
- Paris [kind: string] [options: caseSensitive=false,fuzzy=false]
5+
__Content__
126

13-
__Practice Question__
7+
# Additional Information
148

15-
What is the approximate value of π? (Accept values within 0.1)
9+
This section provides context and details to help you answer the questions below.
1610

17-
__Correct Answers__
11+
## Key Concepts
1812

19-
- 3.14 [kind: numeric] [options: threshold=0.1,precision=2]
13+
- **Capital City**: The city that serves as the seat of government
14+
- **Mathematical Operations**: Basic arithmetic including addition, subtraction, multiplication, and division
2015

21-
__Practice Question__
16+
## Tips
2217

23-
How many kilograms are in 1000 grams? (Include unit)
18+
1. Read each question carefully
19+
2. Consider the context provided
20+
3. Check your spelling before submitting
2421

25-
__Correct Answers__
22+
---
2623

27-
- 1 kg [kind: numeric-with-units] [options: threshold=0.01,precision=2,units=kg,g]
24+
> Note: All answers are case-insensitive unless otherwise specified.
2825
2926
__Practice Question__
3027

31-
What is the famous programming principle that states "Don't Repeat Yourself"? (Accept variations with punctuation, spacing, and minor spelling errors)
28+
What is the capital of France?
3229

3330
__Correct Answers__
3431

35-
- Don't Repeat Yourself [kind: string] [options: caseSensitive=false,fuzzy=true]
32+
- Paris [kind: string] [options: caseSensitive=false]
3633

3734
__Practice Question__
3835

39-
Spell the word "accommodation" (Accept minor spelling errors)
36+
What is 2 + 2?
4037

4138
__Correct Answers__
4239

43-
- accommodation [kind: string] [options: caseSensitive=false,fuzzy=0.7]
44-
40+
- 4 [kind: numeric] [options: threshold=0.01,precision=2]

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<link rel="stylesheet" href="/modules/matching.css" />
1919
<link rel="stylesheet" href="/modules/text-input.css" />
2020
<link rel="stylesheet" href="/design-system/components/horizontal-cards/horizontal-cards.css" />
21+
<link rel="stylesheet" href="/design-system/components/split-panel/split-panel.css" />
2122
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='0.9em' font-size='90'%3E%E2%98%85%3C/text%3E%3C/svg%3E" />
2223
<link rel="preconnect" href="https://fonts.googleapis.com">
2324
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

public/modules/text-input.css

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323
margin: 0 auto;
2424
}
2525

26+
.text-input-with-content {
27+
max-width: 100%;
28+
padding: 0;
29+
gap: 0;
30+
height: 100vh;
31+
overflow: hidden;
32+
margin: 0;
33+
width: 100%;
34+
}
35+
36+
.text-input-split-panel {
37+
width: 100%;
38+
height: 100%;
39+
}
40+
2641
.text-input-questions {
2742
display: flex;
2843
flex-direction: column;
@@ -107,8 +122,49 @@
107122
margin-top: var(--UI-Spacing-spacing-ms, 16px);
108123
}
109124

110-
.text-input-next-button {
111-
/* Button styles are handled by design system button classes */
125+
/* Content and Splitter Styles */
126+
.text-input-content-wrapper {
127+
height: 100%;
128+
overflow: auto;
129+
background-color: var(--Colors-Backgrounds-Main-Top, #ffffff);
130+
position: relative;
131+
}
132+
133+
.text-input-content-iframe {
134+
width: 100%;
135+
height: 100%;
136+
border: 1px solid var(--Colors-Stroke-Lighter, rgba(0, 0, 0, 0.1));
137+
display: block;
138+
}
139+
140+
/* Disable pointer events on iframe during drag to prevent event loss */
141+
.split-panel-container.dragging .text-input-content-iframe {
142+
pointer-events: none !important;
143+
}
144+
145+
.text-input-questions-wrapper {
146+
height: 100%;
147+
display: flex;
148+
flex-direction: column;
149+
overflow-y: auto;
150+
padding: 1.5rem;
151+
position: relative;
152+
}
153+
154+
@media (prefers-color-scheme: dark) {
155+
.text-input-content-wrapper {
156+
background-color: var(--Colors-Backgrounds-Main-Top);
157+
border-right-color: var(--Colors-Stroke-Lighter);
158+
}
159+
160+
.text-input-splitter {
161+
background-color: var(--Colors-Stroke-Lighter);
162+
}
163+
164+
.text-input-splitter:hover,
165+
.text-input-splitter:focus {
166+
background-color: var(--Colors-Stroke-Default);
167+
}
112168
}
113169

114170
/* Scroll Indicator */
@@ -123,6 +179,12 @@
123179
z-index: 10;
124180
}
125181

182+
.text-input-with-content .text-input-scroll-indicator {
183+
position: absolute;
184+
left: 0;
185+
right: 0;
186+
}
187+
126188
.text-input-scroll-indicator-visible {
127189
opacity: 1;
128190
}

0 commit comments

Comments
 (0)