Skip to content

Commit 8ee6626

Browse files
committed
update front page
1 parent 6e83514 commit 8ee6626

10 files changed

Lines changed: 58 additions & 25 deletions

public/feature-generate-report.mp4

1.5 MB
Binary file not shown.
1.62 MB
Binary file not shown.

public/gas_prices-thumbnail.png

-108 KB
Loading

public/global_energy-thumbnail.png

-107 KB
Loading

public/movies-thumbnail.png

-110 KB
Loading

public/unemployment-thumbnail.png

-117 KB
Loading

src/views/About.tsx

Lines changed: 58 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// Licensed under the MIT License.
33

44
import { Box, Typography, Button, useTheme, alpha, IconButton, Divider } from "@mui/material";
5-
import React, { FC, useState } from "react";
5+
import React, { FC, useState, useEffect } from "react";
66
import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew';
77
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
88
import GridViewIcon from '@mui/icons-material/GridView';
99
import GitHubIcon from '@mui/icons-material/GitHub';
1010
import YouTubeIcon from '@mui/icons-material/YouTube';
11+
import PrecisionManufacturingIcon from '@mui/icons-material/PrecisionManufacturing';
1112

1213
import dfLogo from '../assets/df-logo.png';
1314
import { toolName } from "../app/App";
@@ -26,26 +27,26 @@ const features: Feature[] = [
2627
{
2728
title: "Load (Almost) Any Data",
2829
description: "Load structured data, connect to databases. Ask AI agents to extract and clean (small) ad-hoc data from screenshots, text blocks.",
29-
media: "/extract-data.mp4",
30+
media: "/feature-extract-data.mp4",
3031
mediaType: "video"
3132
},
3233
{
3334
title: "Agent Mode",
3435
description: "Vibe with your data. Hands-off and let agents automatically explore and visualize data from high-level goals.",
35-
media: "/agent-mode.mp4",
36+
media: "/feature-agent-mode.mp4",
3637
mediaType: "video"
3738
},
3839
{
3940
title: "Interactive Control",
4041
description: "Use UI interactions and natural language to precisely describe chart designs. Ask AI agents for recommendations. Use Data Threads to backtrack, explore new branches, or follow up.",
41-
media: "/data-formulator-screenshot-v0.5.png",
42-
mediaType: "image"
42+
media: "/feature-interactive-control.mp4",
43+
mediaType: "video"
4344
},
4445
{
4546
title: "Verify & Share Insights",
4647
description: "Interact with charts, inspect data, formulas, and code. Create reports to share insights grounded in your exploration.",
47-
media: "/unemployment.png",
48-
mediaType: "image"
48+
media: "/feature-generate-report.mp4",
49+
mediaType: "video"
4950
}
5051
];
5152

@@ -78,25 +79,56 @@ export const About: FC<{}> = function About({ }) {
7879
setCurrentScreenshot((prev) => (prev === screenshots.length - 1 ? 0 : prev + 1));
7980
};
8081

82+
// Preload adjacent carousel items for smoother transitions
83+
useEffect(() => {
84+
const preloadMedia = (index: number) => {
85+
const feature = features[index];
86+
if (feature.mediaType === 'video') {
87+
const video = document.createElement('video');
88+
video.src = feature.media;
89+
video.preload = 'metadata';
90+
} else {
91+
const img = new Image();
92+
img.src = feature.media;
93+
}
94+
};
95+
96+
// Preload next and previous features
97+
const nextIndex = (currentFeature + 1) % features.length;
98+
const prevIndex = currentFeature === 0 ? features.length - 1 : currentFeature - 1;
99+
100+
preloadMedia(nextIndex);
101+
preloadMedia(prevIndex);
102+
103+
// Preload next and previous screenshots
104+
const nextScreenshot = (currentScreenshot + 1) % screenshots.length;
105+
const prevScreenshot = currentScreenshot === 0 ? screenshots.length - 1 : currentScreenshot - 1;
106+
107+
const img1 = new Image();
108+
img1.src = screenshots[nextScreenshot].url;
109+
const img2 = new Image();
110+
img2.src = screenshots[prevScreenshot].url;
111+
}, [currentFeature, currentScreenshot]);
112+
81113
const serverConfig = useSelector((state: DataFormulatorState) => state.serverConfig);
82114

83115
let actionButtons = !serverConfig.PROJECT_FRONT_PAGE ? (
84116
<Box sx={{ display: 'flex', justifyContent: 'center', gap: 1, mb: 4, flexWrap: 'wrap' }}>
85117
<Button size="large" variant="contained" color="primary"
86-
startIcon={<GridViewIcon sx={{ fontSize: '1rem' }} />}
118+
startIcon={<PrecisionManufacturingIcon sx={{ fontSize: '1rem' }} />}
87119
href="/app"
88120
>Start Exploration</Button>
89121
</Box>
90122
) : (
91123
<Box sx={{ display: 'flex', justifyContent: 'center', gap: 2, mb: 4, flexWrap: 'wrap', '.MuiButton-root': { textTransform: 'none' } }}>
92124
<Button size="large" variant="outlined" color="primary"
93-
startIcon={<YouTubeIcon sx={{ fontSize: '1rem' }} />}
125+
startIcon={<YouTubeIcon sx={{ fontSize: '1rem', color: '#FF0000' }} />}
94126
target="_blank"
95127
rel="noopener noreferrer"
96128
href="https://www.youtube.com/watch?v=3ndlwt0Wi3c"
97129
>What's New in v0.5?</Button>
98130
<Button size="large" variant="outlined" color="primary"
99-
startIcon={<GitHubIcon sx={{ fontSize: '1rem' }} />}
131+
startIcon={<GitHubIcon sx={{ fontSize: '1rem', color: '#000000' }} />}
100132
target="_blank"
101133
rel="noopener noreferrer"
102134
href="https://github.com/microsoft/data-formulator"
@@ -111,8 +143,10 @@ export const About: FC<{}> = function About({ }) {
111143
<Button size="large" variant="outlined" color="primary"
112144
startIcon={<GridViewIcon sx={{ fontSize: '1rem' }} />}
113145
href="/app"
114-
>Online Demo (limited features)</Button>
115-
146+
>Online Demo</Button>
147+
<Typography variant="caption" sx={{ mt: 1.5, color: 'text.secondary', fontStyle: 'italic' }}>
148+
Psst — install locally for the full experience ✨. The online demo is a bit slow & has limited features (at the moment).
149+
</Typography>
116150
</Box>
117151
);
118152

@@ -262,11 +296,13 @@ export const About: FC<{}> = function About({ }) {
262296
{features[currentFeature].mediaType === 'video' ? (
263297
<Box
264298
component="video"
299+
key={features[currentFeature].media}
265300
src={features[currentFeature].media}
266301
autoPlay
267302
loop
268303
muted
269304
playsInline
305+
preload="metadata"
270306
sx={{
271307
width: '100%',
272308
height: 'auto',
@@ -278,6 +314,7 @@ export const About: FC<{}> = function About({ }) {
278314
component="img"
279315
src={features[currentFeature].media}
280316
alt={features[currentFeature].title}
317+
loading="lazy"
281318
sx={{
282319
width: '100%',
283320
height: 'auto',
@@ -355,7 +392,8 @@ export const About: FC<{}> = function About({ }) {
355392
clipPath: 'inset(2px 0 0 0)'
356393
}}
357394
alt={screenshots[currentScreenshot].description}
358-
src={screenshots[currentScreenshot].url}
395+
src={screenshots[currentScreenshot].url}
396+
loading="lazy"
359397
/>
360398
<Box
361399
className="description-overlay"
@@ -415,7 +453,7 @@ export const About: FC<{}> = function About({ }) {
415453
<Box sx={{ mt: 6, mx: 2 }}>
416454
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
417455
<Typography variant="caption" sx={{ color: 'text.secondary', fontWeight: 600, letterSpacing: '0.02em' }}>
418-
How Data Formulator handles your data?
456+
How does Data Formulator handle your data?
419457
</Typography>
420458
<Typography
421459
component="ul"
@@ -429,9 +467,12 @@ export const About: FC<{}> = function About({ }) {
429467
maxWidth: 1000
430468
}}
431469
>
432-
<li>Uploaded data is stored in your browser's local storage. They are sent to server for data transformations but not stored on the server.</li>
433-
<li>When using database functions from a locally installed Data Formulator, a local database (DuckDB .db file) is created to store data in your local machine in temp directory.</li>
434-
<li>LLM endpoints have access to small data samples sent along with the prompt. Use your trusted model provider if working with private data.</li>
470+
<ul>
471+
<li>📦 <strong>Data Storage:</strong> Uploaded data (csv, xlsx, json, clipboard, messy data etc.) is stored in browser's local storage only</li>
472+
<li>⚙️ <strong>Data Processing:</strong> Local installation runs Python on your machine; online demo sends the data to server for data transformations (but not stored)</li>
473+
<li>🗄️ <strong>Database:</strong> Only available for locally installed Data Formulator (a DuckDB database file is created in temp directory to store data); not available in online demo</li>
474+
<li>🤖 <strong>LLM Endpoints:</strong> Small data samples are sent to LLM endpoints along with the prompt. Use your trusted model provider if working with private data.</li>
475+
</ul>
435476
</Typography>
436477
<Typography variant="caption" sx={{ mt: 4,color: 'text.secondary', fontWeight: 300, letterSpacing: '0.02em' }}>
437478
Research Prototype @ Microsoft Research

src/views/DataFormulator.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,13 @@ import {
2222
Box,
2323
Tooltip,
2424
Button,
25-
Collapse,
26-
IconButton,
27-
Paper,
2825
Divider,
2926
useTheme,
3027
alpha,
3128
} from '@mui/material';
3229
import {
33-
SmartToy as SmartToyIcon,
3430
FolderOpen as FolderOpenIcon,
35-
BarChart as BarChartIcon,
3631
ContentPaste as ContentPasteIcon,
37-
Storage as StorageIcon,
3832
Category as CategoryIcon,
3933
CloudQueue as CloudQueueIcon,
4034
AutoFixNormal as AutoFixNormalIcon,
@@ -57,7 +51,6 @@ import { ModelSelectionButton } from './ModelSelectionDialog';
5751
import { DBTableSelectionDialog } from './DBTableManager';
5852
import { getUrls } from '../app/utils';
5953
import { DataLoadingChatDialog } from './DataLoadingChat';
60-
import { RotatingTextBlock } from '../components/RotatingTextBlock';
6154
import { ReportView } from './ReportView';
6255
import { ExampleSession, exampleSessions, ExampleSessionCard } from './ExampleSessions';
6356

@@ -67,7 +60,6 @@ export const DataFormulatorFC = ({ }) => {
6760
const models = useSelector((state: DataFormulatorState) => state.models);
6861
const modelSlots = useSelector((state: DataFormulatorState) => state.modelSlots);
6962
const viewMode = useSelector((state: DataFormulatorState) => state.viewMode);
70-
const serverConfig = useSelector((state: DataFormulatorState) => state.serverConfig);
7163
const theme = useTheme();
7264

7365
const noBrokenModelSlots= useSelector((state: DataFormulatorState) => {

0 commit comments

Comments
 (0)