Commit Graph
257 Commits
Author SHA1 Message Date
Oleg IsonenandClaude Fable 5 de23e2a888 chore: migrate toolchain to oxc (oxfmt, oxlint, rolldown-vite) and typeScript 7 (#5868)
## prettier -> oxfmt (0.58.0)

- .oxfmtrc.json generated with `oxfmt --migrate=prettier`: trailingComma
es5, printWidth 80 (oxfmt defaults to 100), sortPackageJson disabled,
.prettierignore patterns folded in (file deleted).
- ignorePatterns additionally exclude yml/yaml/toml/jsonc and
packages/cli/templates/** so oxfmt covers exactly the file set prettier
used to format (ts,tsx,js,json,css,md) and never touches user-facing
scaffolding artifacts.
- root `format` script, nano-staged pre-commit hook and the CI check
(`pnpm oxfmt --check`, replacing `prettier --cache --check` and its
actions/cache step — oxfmt checks the whole repo in ~0.7s) now run
oxfmt.
- every generator script that ran `prettier --write` on __generated__
output now runs `oxfmt` (css-data, icons, html-data, postgrest, sdk,
sdk-components-*, apps/builder tailwind preflight).
- the four scripts that used prettier's JS `format()` API write raw
source instead and their package.json scripts pipe the generated file
through the oxfmt CLI: project-build generate-docs +
generate-runtime-operation-contracts, cli generate-docs, apps/builder
generate-server-only-api-metadata. oxfmt rejects paths containing "..",
so cross-package generated files are formatted via a subshell cd into
the owning package.
- one-time reformat: oxfmt's canonical output differs from prettier on 8
repo source files (binary-operator continuation indent, import() call
wrapping, sub-pixel spacing of empty for-clauses); oxfmt honors existing
`// prettier-ignore` comments so intentional layouts are kept.
- prettier remains ONLY as a cli devDependency for the
prettier/standalone HTML normalizer inside html-to-jsx.test.ts, and
inside fixtures/ + packages/cli/templates/ (ships to scaffolded user
projects; out of scope here).
- editor config switched from esbenp.prettier-vscode to oxc.oxc-vscode
(devcontainer extension list, .vscode editor.defaultFormatter).

## oxlint 1.56 -> 1.73

- oxlint 1.73 rules-of-hooks special-cases hooks NAMED useEffectEvent:
their results may only be called from effects. Our
app/shared/hook-utils/effect-event.ts is a stable-callback helper
(useEvent pattern), intentionally called from event handlers and passed
as props. The rule is disabled via .oxlintrc.json overrides for the five
files doing this (product code untouched); note those files lose
hook-order linting entirely until the rule becomes configurable.

## TypeScript 5.8.2 -> 7.0.2 (native compiler)

- `tsc` is now the Go-based native binary; all `tsgo` script usages
(workspace packages and fixtures) renamed back to `tsc` and
@typescript/native-preview removed (the package is being phased out).
- fixes for TS7 changed defaults and stricter checks:
- `types` now defaults to [] -> base tsconfig sets "types": ["node"]
(restores the implicit-@types/node behavior of TS5).
- `rootDir` now defaults to ./ -> every tsconfig.dts.json sets
"rootDir": "./src" (TS5011 otherwise).
- import assertions removed -> cli/src/cli.ts uses `with { type: "json"
}` (TS2880).
- stricter isolatedDeclarations inference -> explicit annotations in
css-data bin/property-filter.ts (TS9010) and image image-dev.stories.tsx
(TS9013).
- declaration serialization limit -> project-build builder-runtime.ts
runtimeOperationContracts gets an explicit type (TS7056); the annotation
preserves the narrow RuntimeOperationId union.
- TS7 ships no stable programmatic API:
- react-sdk (component-generator tests drive the compiler API) aliases
its typescript devDependency to @typescript/typescript6@^6.0.2; its bin
is `tsc6`, so the package's typecheck still runs native TS7 tsc from the
workspace root.
- generate-arg-types keeps typescript 5.8.2 for react-docgen-typescript.
- fixtures/ and packages/cli/templates/ keep typescript 5.8.2
(user-facing); fixture scripts still work because plain `tsc` resolves
to their local dependency.

## vite -> rolldown-vite 7.3.1 (oxc bundler)

- global pnpm override `"vite": "npm:rolldown-vite@^7.3.1"`: the builder
app (remix v2 vite plugin works unmodified), every package vite build
and the storybook build now bundle on rolldown/oxc.
- vitest is scoped BACK to vanilla vite via `vitest>vite`,
`vite-node>vite` and `@vitest/mocker>vite` overrides because vitest
3.1's runner does not understand rolldown's SSR transform
(__vite_ssr_exportName__ ReferenceError in every suite).
- those overrides pin vite EXACTLY to 6.3.4: letting ^6.3.4 float to
6.4.3 breaks cli prebuild tests (dynamic import of a generated
app/routes/$.tsx fails to resolve under 6.4.3's loader).

## unrelated cleanup requested during review

- apps/builder commands.ts imports duplicate-tokens-group statically
instead of via dynamic import. The circular dependency the dynamic
import guarded against only exists through the command-panel barrel
(command-panel.tsx > groups/index.ts > commands-group.tsx >
commands.ts); importing the group module directly is cycle-free
(verified with madge), matching the neighboring wrap-group and
convert-group imports.

## verification

- pnpm lint, oxfmt --check: clean.
- pnpm -r typecheck (TS7 native) and pnpm dts: clean.
- pnpm -r test: all suites pass (builder 2093 tests, cli 630, react-sdk
45, project-build 11, ...).
- builder app build, full workspace build, cli build and storybook build
all succeed on rolldown-vite.

## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 01:03:36 +02:00
Oleg Isonen 1ddf6b02c9 feat: API and CLI for everything (#5838)
Closes #5287
2026-07-01 01:20:50 +02:00
Oleg Isonen e76c259669 fix: Fix proxied image asset src handling (#5833) 2026-06-24 15:02:23 +02:00
Oleg Isonen 64f320f920 fix: exclude test and story files from tsconfig.dts.json builds (#5691)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2026-04-12 22:21:03 +02:00
Oleg Isonen 91d2136921 refactor(stories): consolidate exports, add StorySection/StoryGrid everywhere, remove argTypes/args 2026-03-15 19:21:33 +00:00
Oleg Isonen 2216adf4f0 fix: expand story coverage and apply sentence case to all story titles
- Add new story variants across ~100 files covering previously untested props
- Fix all story titles to use sentence case per UI label guidelines
- Consolidate duplicate card, thumbnail, and value-text stories into parent files
- Add interactive/controlled variants for checkbox, radio, switch, select, etc.
- Add style source, disabled, icon, placeholder, unit options variants to CssValueInput
- Add sub-menu, radio group, destructive, and disabled variants to dropdown/context menus
- Add dialog resize, maximize, actions, and non-draggable variants
- Add popover title, actions, and side placement variants
- Add tooltip side placements and content variant stories
2026-03-15 15:34:17 +00:00
Oleg Isonen 0107eb8c4d fix: support data URIs in Image component, clean up stories
- Skip loader/optimization for data: src in getImageAttributes
- Replace external picsum.photos URL with inline SVG data URI in social-preview story
- Remove unnecessary ThumbnailWrapper from thumbnail stories
2026-03-15 09:02:56 +00:00
Oleg Isonen 9f497a3513 feat: Redirects improvements (#5619)
Show a warning banner when a redirect path matches the current page
path, indicating the redirect will override access to the page.

Changes:
- Add PanelBanner component with warning variant to page settings
- Implement findMatchingRedirect utility to detect redirect conflicts
- Show contextual warning with link to Redirects settings section
- Add comprehensive tests for redirect conflict detection

Code quality:
- Replace 'return undefined' with 'return' per style guide
- Use 'return null' for React components returning nothing
2026-02-19 11:26:07 +01:00
Oleg Isonen 0f6383d176 chore: Reuse isAbsoluteUrl (#5587) 2026-01-27 15:34:23 +01:00
Oleg Isonen fdee339de0 chore: Migrate to tsgo (#5578) 2026-01-20 17:25:12 +01:00
Oleg Isonen d5aabf8920 chore: Cleanup storybook structure (#5457)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-11-23 20:25:10 +01:00
Bogdan Chadkin 49bb819ab1 fix: support videos in self-hosted websites (#5340)
Ref
https://discord.com/channels/955905230107738152/955905231227609158/1400561168648638576

User tried to self hosted a website with video component which got
converted to /cgi/video which does not exist in self hosted targets.

Here moved the logic into own custom loader and fall back to original
url.
2025-08-03 02:12:42 +02:00
Bogdan Chadkin 452c50a41a refactor: upgrade vite for vitest and storybook (#5165)
Tough cookie. There is a problem with resolving react-remove-scroll,
figured it by reducing allowed amount of server conditions.
2025-04-29 14:17:42 +04:00
Bogdan Chadkin 935983b543 build: upgrade checks (#4982)
- vitest
- testing-library (got much lighter)
- eslint and plugins (@types/eslint__js no longer necessary)
- storybook
- esbuild
2025-03-11 15:22:57 +07:00
Ivan StarkovandOleg Isonen 3c42f8ca4b experimental: View Animations support (#4817)
## Description

ref  #2645

- [x] - Add view-timeline-name and scroll-timeline-name support, and
prefixer (use custom property for unsupported browsers)
- [x] - Add initial story

## Steps for reproduction


https://6382151c8b47d4399fb9fc69-uljkhwtbmc.chromatic.com/iframe.html?args=&globals=&id=sdk-components-animation-view-animations--in-out&viewMode=story

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-02-04 06:02:55 +03:00
Bogdan Chadkin a556b6b2aa refactor: drop imageBaseUrl from constants.mjs (#4766)
It is no longer configurable and always dictated by image loader.
2025-01-21 13:38:12 +07:00
Bogdan Chadkin 5acb458a68 build: upgrade dev dependencies (#4764)
Nothing critical, all not related to production

storybook 8.5
eslint 9.18
vitest 3
typescript 5.7.3
@types/node 22.10.7
type-fest 4.32
2025-01-21 00:14:56 +07:00
Bogdan Chadkin 79db5d8f35 fix: avoid imports of not installed packages when setup SSG (#4763)
SSG templates have @webstudio-is/image imports which is not installed
when prebuild.ts imports constants.mjs.

Here removed URL.canParse checks in favor of netlify and vercel domains
configuration.
2025-01-20 22:50:46 +07:00
Bogdan Chadkin 71f56ea7d6 refactor: bundle webstudio packages in cli (#4706)
Having all webstudio packages as dependency in CLI leads to very long
and bloated install.

Before
<img width="762" alt="Screenshot 2025-01-03 at 19 49 31"
src="https://github.com/user-attachments/assets/96624dae-c72a-4407-83ea-e56ed5d3f7d8"
/>

After
<img width="385" alt="Screenshot 2025-01-03 at 20 00 17"
src="https://github.com/user-attachments/assets/f3271c6e-07ca-47f6-9dfb-491ca68e7caf"
/>

after/before
<img width="633" alt="Screenshot 2025-01-03 at 19 58 15"
src="https://github.com/user-attachments/assets/8273072a-c71e-485c-aa39-116c9698bc8f"
/>
2025-01-04 01:02:13 +07:00
Bogdan Chadkin a02e9d1afe refactor: prepare react 19 types (#4553)
React 19 simplified ref object story, moved JSX from global into react
package. Here prepared our code to not refactor too much in packages
bump.
2024-12-13 16:20:54 +07:00
Bogdan Chadkin a82ee06fb3 refactor: remove assetBaseUrl from image loaders (#4569)
Asset base url is now automatically added by builder or component
generator and passed to loader as is.

Saas loader removes /cgi/asset when detected.
All other loaders just use full relative path without changes which
simplifies them a lot.
2024-12-12 15:22:25 +07:00
Bogdan Chadkin 78d98a5519 refactor: pass wsImageLoader directly (#4567)
Split our saas image loader into separate function which is passed
directly everywhere without createImageLoader.
2024-12-12 13:56:46 +07:00
Bogdan Chadkin 729978a78e refactor: drop image base url from cli and templates (#4563)
In all cli templates asset base url and image base url are the same so
we can safely switch.

Removed image loader from prebuild.ts.

Dropped imageBaseUrl from sdk react context.
2024-12-12 11:43:18 +07:00
Bogdan Chadkin f7f98b6f4b refactor: drop image base url from builder (#4556)
Builder rely on cloud based image resolution which does not require
additional configuration. Here I dropped IMAGE_BASE_URL env and replaced
bypassing it to loader with loader default.
2024-12-11 22:48:23 +07:00
Bogdan Chadkin c896006fe3 refactor: enable isolated declarations for image package (#4500)
React components need to be annotated with ForwardRefExoticComponent
until we migrate to react v19
2024-12-09 14:49:29 +07:00
Bogdan Chadkin c8c1268002 build: drop legacy publish action (#4525)
One less action on every commit in master.
Made version placeholder more abstract "0.0.0-webstudio-version"
2024-12-06 19:51:08 +07:00
Bogdan Chadkin 1d9157bb34 build: publish CLI 0.191.0 to npm (#4522) 2024-12-06 17:27:53 +07:00
Bogdan Chadkin 82d1bd255b build: bump dev deps (#4503)
- prettier
- vike
- vitest
- storybook
- eslint
2024-12-04 16:48:00 +07:00
Bogdan Chadkin 260c903045 build: bump typescript (#4471)
Upgraded typescript to 5.7, removed it from packages to reuse from root
instead and fixed a couple of changes.
2024-11-26 11:59:07 +07:00
Bogdan Chadkin 6123a8ca74 build: upgrade devtools (#4455)
- storybook
- vitest
- eslint
- typefest
- types/node
- vike
- tsx
- pnpm
2024-11-21 21:06:22 +07:00
Bogdan Chadkin cb255932bf refactor: migrate CLI tests to vitest (#4409)
Jest is barely maintained and vitest is blazinly faster.
2024-11-13 01:38:19 +04:00
Bogdan Chadkin 50ca393e73 build: publish CLI 0.189.0 (#4395) 2024-11-09 18:43:55 +04:00
Bogdan Chadkin d61945402c build: upgrade to typescript 5.6 (#4345)
Only some apis added to types.
2024-10-28 12:17:43 +03:00
Bogdan Chadkin d29065b7fe build: publish 0.185.0 (#4286) 2024-10-14 22:13:18 +03:00
Ivan Starkov 334caf4ec6 build: CLI release 0.182.0 (#4172)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-09-27 20:52:28 +03:00
Bogdan Chadkin 632a9ee2e3 build: publish 0.181.0 (#4147)
Here fixed node version in publish dialog and published cli packages.
2024-09-23 13:15:42 +02:00
Ivan Starkov df5a8e8c27 fix: Disabling image optimize breaks image path (#3931)
## Description

closes  #3754

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-09-09 15:28:13 +03:00
Ivan Starkov 1e615a18fc build: CLI release (#4079)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-09-07 23:39:43 +03:00
Bogdan Chadkin ae1e72051c build: publish 0.175.0 (#4054) 2024-09-02 22:55:05 +02:00
Bogdan Chadkin a904d2cdc7 feat: add markdown embed component (#3884)
Ref https://github.com/webstudio-is/webstudio/issues/3485

Added component with descendants support.

<img width="861" alt="Screenshot 2024-08-06 at 15 53 33"
src="https://github.com/user-attachments/assets/4c488573-f52c-4661-b626-cedc113ee10c">
2024-08-07 00:51:41 +02:00
Bogdan Chadkin 097d2922c3 build: remove unused eslint suppressions (#3876)
Looks like we forgot to enable the flag
2024-08-04 23:37:59 +02:00
Oleg Isonen a344af4d56 fix: fix placeholder images (#3838)
## Description

Placeholders in page settings and project settings marketplace got wrong
size, new version:

<img width="480" alt="image"
src="https://github.com/user-attachments/assets/a1f1ab83-6b20-4ddb-b3b2-a38e6d9ddd70">
<img width="391" alt="image"
src="https://github.com/user-attachments/assets/260ef9a5-c79a-4001-859d-98209f12443a">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-31 03:06:25 +02:00
Bogdan Chadkin 60159b894f build: publish 0.174.0 (#3829) 2024-07-30 16:01:35 +02:00
Bogdan Chadkin dca04597fb build: publish 0.173.0 (#3816) 2024-07-29 17:48:40 +02:00
Bogdan Chadkin a58f2eff04 build: run all tests and typechecks in CI (#3661)
Here improved our checks. No longet rely on "checks" script but run
"test" and "typescript" scripts from each package in monorepo.

Would also make each package less boilerplaty.
2024-07-02 18:21:05 +03:00
Ivan Starkov 4d0574d573 build: Update typescript (#3637)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-28 11:46:13 +03:00
Ivan Starkov 2dc2a21f4c feat: Support image transform for 3rd party images (#3585)
## Description

Now 3rd party images should be transformed by us

Corresponding SaaS PR
https://github.com/webstudio-is/webstudio-saas/pull/301

## Steps for reproduction

Instead of uploading asset set src to any 3rd party image url 
like `https://picsum.photos/id/237/200/300`

See it works.
Publish see it works.

Or open 


https://src-remote.staging.webstudio.is/builder/a1371dce-752c-4ccf-8ea4-88bab577fe50
See it works

https://new-images-saas-8njoh.wstd.work/



## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-18 19:38:23 +03:00
Ivan Starkov 863bb2a1bc feat: Adds the ability to place images on the canvas immediately during upload (#3546)
## Description

- Adds the ability to place images on the canvas immediately during
upload, using the file blob or a provided URL.
- Enables images to use width and height from asset metadata.
- Detects duplicate assets and displays a warning message.

<img width="323" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/fe810dd8-3e3d-4cab-8669-b0d739044f49">


These changes allow images to appear on the canvas upon pasting, even if
the asset is not fully uploaded yet.


## Steps for reproduction

Start uploading few files on a slow connection, select them before
upload, see image on canvas is changed

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-14 11:01:07 +03:00
Bogdan Chadkin 936dcd3ca8 build: publish 0.168.0 (#3556) 2024-06-13 14:57:21 +03:00
Ivan Starkov 9626c6dee5 fix: Favicon sizes conform to Google Search guidelines (#3527)
## Description

width,height must be multiple of 48
https://developers.google.com/search/docs/appearance/favicon-in-search

- In case of non square favicon uploaded add paddings to make it square
[favicon-non-sqare](https://favicon-non-sqare-saas-1noth.wstd.work/) see
white paddings
<img width="207" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/717d18bc-0d4c-4d68-8c11-e232cafac795">

https://favicon-non-sqare-saas-1noth.wstd.work/cgi/image/IMG_2882_(1)_LY_eDOEMEwtikKi5Pyld-.png?width=144&quality=100&format=auto&height=144&fit=pad



_padding crop is used because all other `fit` modes we have can't
upscale images as I know to get exact final height and width set_


corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/300

## Steps for reproduction
Open 

https://favicon.staging.webstudio.is/builder/28fb95a3-5236-430c-950e-dda451a31c4d?authToken=2627c718-308e-4690-8919-1e1f00e5b3a5&mode=preview
Publish
See <link rel="icon" and check sizes


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-06-10 19:15:57 +03:00