gradio/js
Freddy Boulton 30b5d6f2b7
Fix chatinterface multimodal bug (#9119)
* Add test

* add changeset

* comments

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-15 14:50:32 +00:00
..
_cdn-test chore(deps): update dependency iframe-resizer to v5 (#8347) 2024-05-22 11:06:07 +01:00
_spaces-test chore: update versions (#8960) 2024-08-08 11:20:08 +01:00
_website Better text styling on docs (#9108) 2024-08-14 11:51:50 -07:00
accordion setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
annotatedimage setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
app fix version + pkg name (#9110) 2024-08-14 15:43:01 +01:00
atoms setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
audio setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
box setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
build setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
button setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
chatbot setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
checkbox setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
checkboxgroup setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
code setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
colorpicker setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
column setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
core setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
dataframe setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
dataset setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
datetime setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
downloadbutton setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
dropdown setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
fallback setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
file setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
fileexplorer setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
form setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
gallery setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
group setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
highlightedtext setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
html setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
icons setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
image setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
imageeditor setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
json setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
label setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
lite Initial SSR refactor (#9102) 2024-08-14 15:17:36 +01:00
markdown setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
model3D setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
multimodaltextbox setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
nativeplot setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
number setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
paramviewer setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
plot setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
preview setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
radio setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
row setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
simpledropdown setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
simpleimage setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
simpletextbox setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
slider setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
spa Fix chatinterface multimodal bug (#9119) 2024-08-15 14:50:32 +00:00
state setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
statustracker setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
storybook Initial SSR refactor (#9102) 2024-08-14 15:17:36 +01:00
tabitem setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
tabs setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
textbox setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
theme setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
timer setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
tooltip setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
tootils chore: update versions (#8960) 2024-08-08 11:20:08 +01:00
upload setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
uploadbutton setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
utils setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
video setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
wasm setup npm-previews of all packages (#9118) 2024-08-15 12:56:17 +01:00
.npmrc
jsx.d.ts
README.md

gradio-ui

This folder contains all of the Gradio UI and component source code.

setup

This folder is managed as 'monorepo' a multi-package repository which make dependency management very simple. In order to do this we use pnpm as our package manager.

Make sure pnpm is installed by following the installation instructions for your system.

You will also need node which you probably already have

running the application

Install all dependencies:

pnpm i

This will install the dependencies for all packages and link any local packages

local development

To develop locally, open two terminal tabs from the root of the repository.

Run the python test server, from the root directory:

cd demo/kitchen_sink
python run.py

This will start a development server on port 7860 that the web app is expecting.

Run the web app:

pnpm dev

building for production

Run the build:

pnpm build

This will create the necessary files in js/app/public and also in gradio/templates/frontend.

quality checks

The repos currently has two quality checks that can be run locally and are run in CI.

formatting

Formatting is handled by prettier to ensure consistent formatting and prevent style-focused conversations. Formatting failures will fails CI and should be reoslve before merging.

To check formatting:

pnpm format:check

If you have formatting failures then you can run the following command to fix them:

pnpm format:write

type checking

We use TypeScript to provide static types to javascript code. These checks are also run in CI.

to typecheck the code:

pnpm ts:check

ci checks

Currently the following checks are run in CI:

static checks

  • Format check (pnpm format:check)
  • Build css (pnpm css)
  • Build client (pnpm build)
  • Type check (pnpm ts:check)
  • Unit tests (pnpm test:run)

functional test

pip install -r demo/outbreak_forecast/requirements.txt
pnpm exec playwright install chromium
pnpm exec playwright install-deps chromium
pnpm test:browser:full