Skip to content

Commit 6893a91

Browse files
committed
feat(step updates): group/pivot/join
1 parent b166f35 commit 6893a91

9 files changed

Lines changed: 871 additions & 141 deletions

File tree

apps/web/package-lock.json

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@typescript-eslint/eslint-plugin": "^6.21.0",
2424
"@typescript-eslint/parser": "^6.21.0",
2525
"@vitejs/plugin-react": "^4.3.1",
26+
"baseline-browser-mapping": "^2.9.19",
2627
"eslint": "^8.57.0",
2728
"eslint-plugin-jsx-a11y": "^6.8.0",
2829
"eslint-plugin-react": "^7.37.0",

apps/web/src/App.tsx

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import './App.css';
55
import { Editor } from '@monaco-editor/react';
66
import TracePanel from './components/TracePanel';
77
import { StepCard } from './components/StepSlideshow';
8+
import { expandTraceToDisplaySteps } from './lib/displaySteps';
89
import ExamplesGallery from './components/ExamplesGallery';
910
import { initPyodide, runPythonCode, type PyodideOutput } from './lib/pyodide';
1011
import { type Example } from './lib/examples';
@@ -388,28 +389,31 @@ function App() {
388389
</div>
389390

390391
{/* Hidden container for multi-step PDF export (off-screen, same layout as panel) */}
391-
{isExportingPdf && output.trace && output.trace.length > 0 && (
392-
<div
393-
ref={exportContainerRef}
394-
className="export-pdf-container"
395-
style={{
396-
position: 'absolute',
397-
left: '-9999px',
398-
top: 0,
399-
width: 640,
400-
zIndex: -1,
401-
}}
402-
>
403-
{output.trace.map((record, i) => (
404-
<StepCard
405-
key={i}
406-
record={record}
407-
stepIndex={i}
408-
totalSteps={output.trace!.length}
409-
/>
410-
))}
411-
</div>
412-
)}
392+
{isExportingPdf && output.trace && output.trace.length > 0 && (() => {
393+
const exportDisplaySteps = expandTraceToDisplaySteps(output.trace!);
394+
return (
395+
<div
396+
ref={exportContainerRef}
397+
className="export-pdf-container"
398+
style={{
399+
position: 'absolute',
400+
left: '-9999px',
401+
top: 0,
402+
width: 640,
403+
zIndex: -1,
404+
}}
405+
>
406+
{exportDisplaySteps.map((step, i) => (
407+
<StepCard
408+
key={i}
409+
step={step}
410+
stepIndex={i}
411+
totalSteps={exportDisplaySteps.length}
412+
/>
413+
))}
414+
</div>
415+
);
416+
})()}
413417

414418
{/* Examples Gallery Modal */}
415419
{showGallery && (

apps/web/src/components/DataTransformation.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
transform: translateY(0);
1919
}
2020

21+
/* Join: left table | right table | result */
22+
.data-transformation.join-three-panel {
23+
grid-template-columns: 1fr 1fr auto 1fr;
24+
}
25+
2126
/* Transform Sections */
2227
.transform-section {
2328
display: flex;
@@ -150,6 +155,38 @@
150155
font-weight: 500;
151156
}
152157

158+
/* Group/Join: highlight key column (group column or join column) */
159+
.data-table.compact th.highlight-col,
160+
.data-table.compact td.highlight-col {
161+
background-color: rgba(59, 126, 161, 0.35) !important;
162+
border-left: 3px solid rgba(255, 198, 70, 0.6);
163+
border-right: 1px solid rgba(59, 126, 161, 0.4);
164+
color: var(--text-primary);
165+
}
166+
167+
/* Row highlight (e.g. group matching rows) */
168+
.data-table.compact tr.highlight-row td {
169+
background-color: rgba(59, 126, 161, 0.4) !important;
170+
border-left: 2px solid rgba(255, 198, 70, 0.5);
171+
}
172+
173+
/* Cell highlight (e.g. pivot cell) */
174+
.data-table.compact td.highlight-cell {
175+
background-color: rgba(255, 198, 70, 0.2) !important;
176+
border: 1px solid rgba(255, 198, 70, 0.5);
177+
}
178+
179+
.unique-values-callout {
180+
padding: 0.5rem 0.75rem;
181+
font-size: 0.75rem;
182+
color: var(--text-secondary);
183+
font-family: 'Source Code Pro', 'Courier New', monospace;
184+
background-color: rgba(0, 40, 80, 0.6);
185+
border-radius: 6px;
186+
margin-top: 0.5rem;
187+
border: 1px solid rgba(59, 126, 161, 0.35);
188+
}
189+
153190
/* Step 1 (empty → with_columns): higher contrast so table is easy to read */
154191
.data-transformation .after.initialization-result .data-table.compact td {
155192
color: var(--text-primary);
@@ -253,6 +290,11 @@
253290
grid-template-rows: auto auto auto;
254291
}
255292

293+
.data-transformation.join-three-panel {
294+
grid-template-columns: 1fr;
295+
grid-template-rows: auto auto auto auto;
296+
}
297+
256298
.transform-arrow-container {
257299
transform: rotate(90deg);
258300
margin: 1rem 0;

0 commit comments

Comments
 (0)