gradio/js
WH-Yoshi 2daf3d10f5
Adding maxlength attribute handling of textarea and input HTML element for the gr.TextBox() component via a max_length parameter (#9185)
* Testing - NOT SURE

* changed max_length name

* Finished adding max_length handling

* Changed Readme

* add changeset

* Update test_textbox.py

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-08-27 23:42:05 +00:00
..
_cdn-test Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
_spaces-test Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
_website Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
accordion Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
annotatedimage Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
app Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
atoms Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
audio Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
box Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
build Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
button Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
chatbot Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
checkbox Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
checkboxgroup Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
code Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
colorpicker Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
column Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
component-test Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
core Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
dataframe Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
dataset Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
datetime Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
downloadbutton Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
dropdown Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
fallback Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
file Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
fileexplorer Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
form Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
gallery Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
group Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
highlightedtext Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
html Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
icons Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
image Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
imageeditor Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
json Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
label Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
lite Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
markdown Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
model3D Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
multimodaltextbox Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
nativeplot Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
number Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
paramviewer Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
plot Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
preview Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
radio Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
row Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
simpledropdown Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
simpleimage Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
simpletextbox Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
slider Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
spa Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
state Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
statustracker Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
storybook Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
tabitem Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
tabs Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
textbox Adding maxlength attribute handling of textarea and input HTML element for the gr.TextBox() component via a max_length parameter (#9185) 2024-08-27 23:42:05 +00:00
theme Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
timer Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
tooltip Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
tootils Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
upload Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
uploadbutton Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
utils Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
video Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
wasm Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
.npmrc move files (#3605) 2023-03-27 16:12:58 -07:00
jsx.d.ts Fix published package exports (#9163) 2024-08-22 16:38:45 +00:00
README.md Updated CI info in contributing docs (#4415) 2023-06-06 08:52:29 -04:00

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