gradio/js
MMP0 3645da5f1e
Fix incorrect relative mouse coordinates for Gallery preview overlay (#7516)
* Fix incorrect relative mouse coordinates for `Gallery` preview overlay

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-04 23:48:22 +00:00
..
_cdn-test
_spaces-test
_website Add error handling for missing js/_website/version.json (#7451) 2024-02-28 19:05:48 +01:00
accordion
annotatedimage
app ensure lite build doesn't wipe out core build (#7597) 2024-03-04 15:01:37 +00:00
atoms
audio Adds a gr.DownloadButton component (#7518) 2024-02-28 12:07:36 -08:00
box
button Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
chatbot Adds a gr.DownloadButton component (#7518) 2024-02-28 12:07:36 -08:00
checkbox
checkboxgroup
code
colorpicker
column
dataframe Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
dataset Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
downloadbutton Adds a gr.DownloadButton component (#7518) 2024-02-28 12:07:36 -08:00
dropdown
fallback
file
fileexplorer
form
gallery Fix incorrect relative mouse coordinates for Gallery preview overlay (#7516) 2024-03-04 23:48:22 +00:00
group
highlightedtext
html
icons
image Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
imageeditor Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
json
label
lite fix-tests (#7345) 2024-03-04 14:03:46 +00:00
markdown
model3D
number
paramviewer
plot
preview chore(deps): update dependency svelte-hmr to ^0.16.0 (#7594) 2024-03-04 15:11:12 +00:00
radio
row
simpledropdown
simpleimage Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
simpletextbox
slider
state
statustracker
storybook
tabitem
tabs
textbox
theme
tooltip
tootils fix-tests (#7345) 2024-03-04 14:03:46 +00:00
upload
uploadbutton Adds a gr.DownloadButton component (#7518) 2024-02-28 12:07:36 -08:00
utils
video Refactors get_fetchable_url_or_file() to remove it from the frontend (#7528) 2024-02-26 13:01:00 -08:00
wasm chore(deps): update all non-major dependencies (#7340) 2024-03-04 14:04:14 +00: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