mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
Refactoring (#4223)
* Replace var with const in js/app/src/main.ts * Remove unnecessary nullish coalescing in js/app/src/main.ts * Remove unnecessary white spaces in the NPM scripts in js/app/package.json * Use object key-value shorthand * changelog --------- Co-authored-by: pngwn <hello@pngwn.io>
This commit is contained in:
parent
5c3fd1b5aa
commit
b0cccb43d6
@ -8,7 +8,7 @@ No changes to highlight.
|
||||
|
||||
## Other Changes:
|
||||
|
||||
No changes to highlight.
|
||||
- Refactor web component `initial_height` attribute by [@whitphx](https://github.com/whitphx) in [PR 4223](https://github.com/gradio-app/gradio/pull/4223)
|
||||
|
||||
## Breaking Changes:
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
"scripts": {
|
||||
"dev": "vite --port 9876",
|
||||
"build:cdn": "vite build --mode production:cdn --emptyOutDir",
|
||||
"build:website": "vite build --mode production:website --emptyOutDir",
|
||||
"build:local": "vite build --mode production:local --emptyOutDir",
|
||||
"build:website": "vite build --mode production:website --emptyOutDir",
|
||||
"build:local": "vite build --mode production:local --emptyOutDir",
|
||||
"preview": "vite preview",
|
||||
"test:snapshot": "pnpm exec playwright test snapshots/ --config=../../.config/playwright.config.js",
|
||||
"test:browser": "pnpm exec playwright test test/ --config=../../.config/playwright.config.js",
|
||||
|
@ -49,7 +49,7 @@ function create_custom_element() {
|
||||
composed: true
|
||||
});
|
||||
|
||||
var observer = new MutationObserver((mutations) => {
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
this.dispatchEvent(event);
|
||||
});
|
||||
|
||||
@ -79,11 +79,11 @@ function create_custom_element() {
|
||||
info: info === "false" ? false : true,
|
||||
container: container === "false" ? false : true,
|
||||
is_embed: is_embed === "false" ? false : true,
|
||||
initial_height: initial_height ?? undefined,
|
||||
initial_height,
|
||||
eager: eager === "true" ? true : false,
|
||||
// gradio meta info
|
||||
version: GRADIO_VERSION,
|
||||
theme_mode: theme_mode,
|
||||
theme_mode,
|
||||
// misc global behaviour
|
||||
autoscroll: autoscroll === "true" ? true : false,
|
||||
control_page_title: control_page_title === "true" ? true : false,
|
||||
|
Loading…
Reference in New Issue
Block a user