Files
Oleg Isonen 4748fa5f1e fix: restore short --variable label in CSS value input (#5694)
## Problem

Commit cc20991b accidentally changed `itemToString` for `var` type
values to use `toValue(item)`, which produces `var(--variable,
fallback)` instead of the intended short `--variable` label.

This meant the CSS value input (when unfocused, and in the autocomplete
dropdown) showed the full `var(--variable, fallback)` string, which is
too long for small inputs and not how it previously displayed.

## Fix

- Restored `itemToString` to return `--${item.value}` for var types
(short label)
- Updated the `onFocus` handler to explicitly call `toValue(value)` for
var types, so the full `var(--variable, fallback)` is shown when the
user focuses the input to edit it
2026-04-13 20:07:14 +02:00
..
2025-12-03 22:22:15 +01:00

Postgrest

Postgrest-js

postgrest-js best doc

Generated Types

pnpm generate-types

or in case of non devcontainer environment

docker compose exec -iT app bash
cd /workspaces/webstudio/packages/postgrest
pnpm generate-types

Playground

pnpm playground ./playground/{file}.ts
# OR
pnpm tsx --env-file ../../apps/builder/.env ./playground/{file}.ts

Next steps.

Use https://supabase.com/docs/reference/cli/supabase-db-start or directly https://github.com/djrobstep/migra for migrations.

Supabase can be used with --db-url flag to not reproduce "local" env

Sql testing

CREATE SCHEMA IF NOT EXISTS pgtap;
DROP EXTENSION pgtap;
CREATE EXTENSION IF NOT EXISTS pgtap WITH SCHEMA pgtap;
pnpx supabase test new latest-builds
docker run --rm --network host -v ./supabase/tests:/tests -e PGOPTIONS='--search_path=pgtap,public' supabase/pg_prove:3.36 pg_prove -d "postgresql://postgres:pass@localhost/webstudio" --ext .sql /tests
# OR
pnpm run db-test