Commit Graph
3115 Commits
Author SHA1 Message Date
Oleg Isonen 87d1257e02 make migrations idempotent 2025-12-03 22:33:17 +00:00
Oleg Isonen 2f393f5efe fix: Fix more sql tests (#5474)
## 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-12-03 22:38:40 +01:00
Oleg Isonen d15c8702da fix: fix db tests (#5473)
## 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-12-03 22:22:15 +01:00
Oleg Isonen b7356e0c37 feat: List view and sorting of projects in dashboard (#5467)
## 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-12-03 21:14:07 +01:00
Bogdan ChadkinandOleg Isonen 21bce61052 feat: support modern color spaces in color inputs (#5465)
Ref https://github.com/webstudio-is/webstudio/issues/3574

Here improved css value parser to parse and store any color space.
oklch(), hsl(), color() and others can be used in any color input. Color
picker converts to rgb on the fly and do not support any other color
space at the moment.

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-12-01 02:34:46 +03:00
Oleg Isonen 9f66c8dc26 feat: Show custom domain in the dashboard if it exists (#5466)
## 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-29 00:27:06 +01:00
Oleg Isonen 52396704e8 fix: Multiple gradient fixes (#5464)
## 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-28 01:47:49 +01:00
Bogdan Chadkin 7139a35c68 refactor: migrate to colorjs.io (#5463)
colord library we used does not support new color spaces like oklch.
colorjs.io is mature library and handles this stuff just well.
2025-11-26 01:23:24 +03:00
Oleg Isonen 725d4597da feat: Gradient picker improvements (#5460)
## 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-24 17:00:39 +01:00
Bogdan Chadkin 8d14d1b5e3 refactor: generate modern color syntax (#5456)
Ref
https://github.com/webstudio-is/webstudio/issues/3574#issuecomment-3529164146

Here added ColorValue to styles schema.
toValue now generates modern syntax like rgb(0 0 0 / 0.5) for both color
and rgb values.
2025-11-23 23:26:37 +03: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 02ca084a0c refactor: upgrade to csstree v3 (#5455)
The new version is aware of modern colors and other new css features.
2025-11-23 14:32:12 +03:00
Bogdan Chadkin 1662637d92 fix: remove unnecessary border-width from preset styles (#5453)
Fixes https://github.com/webstudio-is/webstudio/issues/5451

We used this to not confuse users with "medium" value but it heavily
bloats resulting css and does affect much UX.

<img width="241" height="527" alt="image"
src="https://github.com/user-attachments/assets/0be935a4-d563-4ae8-90e6-6c8bc7eedd11"
/>
2025-11-23 13:51:33 +03:00
Oleg Isonen dc508445ce feat: Gradients UI (#5449)
## Description

Closes https://github.com/webstudio-is/webstudio/issues/3448

## Todo

- [x] linear gradient
- [x] without stops linear-gradient(red,green)
- [x] delete stops
- [x] support variables
- [x] tweak design
- [x] conic
- [x] one-color
- [x] radial
2025-11-22 14:28:17 +01:00
Jaya Krishna NamburuandOleg Isonen 0484d9c26f experimental: add gradient controller to update color stops using ui (#4159)
## Description

The `GradientControl` helps in displaying the colour stops that are
available in the linear-gradient that users added.

There are two knows issues at the moment.
- The only limitation is. We can't swap the colours when a colour stop
crosses an existing colour stop. In some
tools, the colours are swapped resulting in the swiping of the gradient
too.
This is because of a limitation/bug on the radix side, they pre-sort the
slider stops. So, we can never know which crosses an existing stop and
changed it's value. https://github.com/radix-ui/primitives/issues/2247

## Steps for reproduction

- Passing a linear-gradient should show all the `color-stops` in the
gradient.
- The `color-hints` are displayed at the bottom of the gradient bar.
These can't be moved along, more info about it is in the code component.
Because, this basically changes the whole gradient just by moving.
- The `color-hints` are showed at the bottom of the gradient. Just to
notify users about the existence of the hints.
- Users should be able to move the color-stops along the slider track.
- The color-stops can be moved using the arrow keys from the keyboard.

<img width="299" alt="Screenshot 2024-09-25 at 10 32 47 AM"
src="https://github.com/user-attachments/assets/d65e6af5-bba9-490d-96ff-0e58b8fb93bc">
<img width="289" alt="Screenshot 2024-09-25 at 10 32 43 AM"
src="https://github.com/user-attachments/assets/a3ac83e1-d379-49dc-a5d8-42936960f761">
<img width="560" alt="Screenshot 2024-09-25 at 10 32 38 AM"
src="https://github.com/user-attachments/assets/fef11d9e-2d0c-4d71-8587-227f22551edb">


![color-change-gradients](https://github.com/user-attachments/assets/44f71bc5-1c52-4bf9-8458-c12bd355759f)


## 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

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-11-14 00:29:42 +01:00
Bogdan ChadkinandOleg Isonen 801181c8b6 feat: add project tags in dashboard (#5399)
Ref https://github.com/webstudio-is/webstudio/issues/860





https://github.com/user-attachments/assets/a85b525a-d43b-4361-aa5f-f2158b3c0211

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2025-11-07 11:33:05 +01:00
zehjotkah c3847074cd fix: add current-date resource handler to CLI templates (#5439)
## Problem
The current-date system resource works in the Webstudio builder but
fails in published sites with "dateTime attribute is not set" errors.

## Root Cause
The CLI templates' `customFetch` functions handle the `sitemap.xml`
local resource but don't handle the `current-date` resource, causing
fetch requests to fail when sites are published.

## Solution
Added `current-date` handler to all CLI template `customFetch`
functions, following the same pattern as the existing `sitemap.xml`
handler.

## Changes
- Add current-date handler to Remix HTML/XML templates
- Add current-date handler to React Router HTML/XML templates  
- Add customFetch with current-date handler to SSG template
- Normalize dates to midnight UTC to prevent hydration mismatches

## Testing
The fix ensures that when the Time component uses `system.currentDate`,
it will work correctly in published sites, not just in the builder.
2025-11-04 18:11:50 +01:00
zehjotkah 1f2e7a25ee feat: add Current Date resource, system.pathname, and Time component custom formatting (#5434)
Closes https://github.com/webstudio-is/webstudio/issues/3510

## Summary

This PR adds a **Current Date** system resource, extends the `system`
object with a `pathname` property, and enhances the **Time component**
with custom date formatting capabilities to provide more flexibility and
prevent hydration errors.

### Key Features

1. **Current Date System Resource** - Provides normalized date/time
information that prevents React hydration errors
2. **System Pathname** - Adds `pathname` property directly to the
`system` object for easy access in expressions
3. **Time Component Custom Formatting** - Adds a `format` prop with
template tokens for flexible date/time display

## Motivation

These changes solve important use cases:

- **Current Date**: Prevents React hydration errors when displaying
dynamic dates (e.g., copyright years in footers). Previously, using `new
Date()` in expressions would cause server/client mismatch.
- **System Pathname**: Provides easy access to the current page path in
expressions without needing to parse the URL manually.
- **Custom Time Formatting**: Allows users to format dates with simple
templates (e.g., `YYYY-MM-DD`) without being limited to
`Intl.DateTimeFormat` options, and provides a simple way to exclude
specific date or time components to avoid hydration issues.

## Changes

### Current Date Resource
- Created
[`apps/builder/app/shared/$resources/current-date.server.ts`](apps/builder/app/shared/$resources/current-date.server.ts)
- Provides date fields: `year`, `month`, `day`, `iso`, `timestamp`
- All values normalized to midnight UTC (00:00:00.000Z) to prevent
hydration errors
- Registered in
[`rest.resources-loader.ts`](apps/builder/app/routes/rest.resources-loader.ts)
- Added to SystemResourceForm dropdown in UI

### System Pathname
- Added `pathname` property to
[`System`](packages/sdk/src/schema/pages.ts) type
- Updated [`system.ts`](apps/builder/app/shared/system.ts) to compute
and include pathname
- Normalized empty pathname to `'/'` for consistency
- Available in expressions as `system.pathname`

### Time Component Enhancements
- Added [`formatDate()`](packages/sdk-components-react/src/time.tsx:353)
function supporting template tokens:
  - `YYYY`, `YY` - year (4-digit, 2-digit)
  - `MM`, `M` - month (zero-padded, no padding)
  - `DD`, `D` - day (zero-padded, no padding)
  - `HH`, `H` - hours (zero-padded, no padding)
  - `mm`, `m` - minutes (zero-padded, no padding)
  - `ss`, `s` - seconds (zero-padded, no padding)
- Added `format` prop to
[`Time`](packages/sdk-components-react/src/time.tsx:386) component that
overrides `dateStyle`/`timeStyle` when provided
- Updated component logic to check for `format` prop first before
falling back to `Intl.DateTimeFormat`
- Added comprehensive tests for date formatting in
[`time.test.ts`](packages/sdk-components-react/src/time.test.ts)
- Updated component metadata in
[`time.ws.ts`](packages/sdk-components-react/src/time.ws.ts) to include
`format` in initialProps
- Example: `format="YYYY-MM-DD HH:mm:ss"` displays as "2025-11-03
18:47:25"

### Template & Fixture Updates
- Updated all CLI templates (defaults, react-router, SSG) to include
`pathname` in system objects
- Updated all fixture files (47 files total) to include `pathname` in
system objects
- All 694 tests passing
- All typecheck passing

## Usage

### Current Date Resource
Users can now add the Current Date resource from the Data Variables
panel:
1. Click + next to Data Variables
2. Select "System Resource"
3. Choose "Current Date" from the dropdown
4. Access in expressions:
   - `date.year` - for copyright year
   - `date.month` - current month (1-12)
   - `date.day` - current day (1-31)
   - `date.iso` - ISO 8601 string
   - `date.timestamp` - Unix timestamp

### System Pathname
Access the current page path directly:
- `system.pathname` - current page path (e.g., `/about`, `/blog/post-1`)

### Time Component Custom Format
Use the `format` prop for custom date/time display:
```jsx
<Time datetime="2025-11-03T18:47:25Z" format="YYYY-MM-DD" />
// Displays: 2025-11-03

<Time datetime="2025-11-03T18:47:25Z" format="YYYY-MM-DD HH:mm:ss" />
// Displays: 2025-11-03 18:47:25

<Time datetime="2025-11-03T18:47:25Z" format="M/D/YYYY" />
// Displays: 11/3/2025
```
Technical Notes
- Current Date values are normalized to midnight UTC to ensure
consistency throughout the day and prevent hydration mismatches
- The pathname property is computed from the request URL and normalized
to '/' when empty
- Custom format templates in the Time component are processed before
falling back to Intl.DateTimeFormat
- All changes are backward compatible
2025-11-03 23:17:53 +01:00
Oleg Isonen 348a48eae8 fix: Set css states on the right element (#5436)
## Description

Radio group route doesn't have checked/unchecked states via data-state
attribute, only the button and indicator do.

## 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-03 14:50:02 +01:00
Bogdan Chadkin 19cfd12184 fix: add missing slice method to strings in expressions (#5430) 2025-10-21 23:24:33 +04:00
zehjotkah 8b70dea163 feat: expression string method autocomplete (#5421)
## Description

Added autocomplete support for safe string and array methods in the
expression editor, as suggested by @TrySound in PR #5403.

## Changes

- Exported `allowedStringMethods` and `allowedArrayMethods` from
`packages/sdk/src/expression.ts`
- Enhanced the expression editor's autocomplete to suggest safe methods
when typing after a variable (e.g., system)
- Methods are displayed with parentheses for clarity (e.g.,
`toLowerCase()`, `replace()`, `split()`)
- Autocomplete shows helpful labels: "string method" or "array method"

## How to Test

1. Open any project in the builder
2. Click the expression editor icon next to a text property
3. Type a variable name followed by a dot (e.g., `system.`)
4. You should see autocomplete suggestions for safe string methods like
`toLowerCase()`, `replace()`, `split()`, etc.
5. Type a few letters to filter (e.g., `title.to` shows only methods
starting with "to")
6. Select a method and it will be inserted with parentheses

## Related

- Builds on PR #5403 which enabled these safe methods in the expression
engine

<img width="343" height="204" alt="Bildschirmfoto 2025-10-09 um 22 33
03"
src="https://github.com/user-attachments/assets/206a36e8-1d68-4e2a-a045-1f9e95067a28"
/>
2025-10-15 16:08:41 +04:00
Bogdan Chadkin 631743b860 feat: remove free domains (#5426)
<img width="357" height="297" alt="Screenshot 2025-10-15 at 11 54 23"
src="https://github.com/user-attachments/assets/f4fa0c5f-89b4-4f9b-9152-bf339c2e8f55"
/>
2025-10-15 12:14:11 +04:00
zehjotkah 4640ceadeb feat: enabling safe functions in expression engine (#5403)
## Description

allowing toLowerCase(), replace(), and split() to be used in the
expression editor.

Real life use-case explained in the discord message. 

https://discord.com/channels/955905230107738152/1418928616648998992/1419623805541814393

## Steps for reproduction

1. use any of the mentioned functions in the expression editor
2. they're currently not allowed even though they'd be safe to use 
3. those functions (and presumably others as well) can be used in hosted
webstudio by deploying my changes on a locally hosted webstudio editor,
using the functions, and copying the pages containing the functions to
the hosted version.
-> validation check bypass 

## Code Review

- [x] hi @kof, I need you to do
  - conceptual review (does webstudio WANT to allow these functions?)
  - test it on preview

## Before requesting a review

- [x] made a self-review
- [x] 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-10-10 01:01:03 +04:00
Bogdan Chadkin 65017634ab feat: add download asset button (#5417)
Ref https://github.com/webstudio-is/webstudio/issues/5416

Downloading assets is forbidden in view mode and when user is on free
plan.

<img width="332" height="374" alt="Screenshot 2025-10-02 at 21 34 34"
src="https://github.com/user-attachments/assets/8695b5e4-68b4-484d-8425-37a2de81203f"
/>
2025-10-02 22:52:05 +03:00
Bogdan Chadkin de444a3501 fix: copy paste search params in resources (#5412)
Reproduced when tried to insert the new baserow template
2025-09-27 16:47:49 +03:00
Bogdan Chadkin 62f969cccb fix: show href on link in content mode (#5396)
Got broken when we switched links to element component.

<img width="844" height="466" alt="Screenshot 2025-09-09 at 13 50 45"
src="https://github.com/user-attachments/assets/a4f0c969-9003-4ea7-aef0-22014f307884"
/>
2025-09-09 19:09:14 +03:00
Bogdan Chadkin 4e5d82983e fix: handle headers in graphql resource (#5395) 2025-09-09 13:52:03 +03:00
Bogdan Chadkin e87cd94819 feat: add cache max age and body type to resource UI (#5393)
Ref https://github.com/webstudio-is/webstudio/issues/3691

<img width="347" height="613" alt="Screenshot 2025-09-07 at 20 10 00"
src="https://github.com/user-attachments/assets/50d68199-7bc7-41e2-b607-66d20cfc6e5d"
/>
2025-09-07 23:44:41 +03:00
Bogdan Chadkin f558311897 feat: load data before saving resource variable (#5392)
Ref https://github.com/webstudio-is/webstudio/issues/3691

- new resource loader with queue to avoid bloating network with huge
responses
- data can be loaded for new variable before saving, easier to preview
result



https://github.com/user-attachments/assets/5c26c5a2-fd33-401b-a4d2-a321c34ca083
2025-09-06 17:09:53 +03:00
Bogdan Chadkin 91588c90be feat: support json in resource search params and headers (#5387)
Ref https://github.com/webstudio-is/webstudio/issues/3691

This should improve experience when working with baserow filters or
similar backends.

<img width="641" height="347" alt="Screenshot 2025-09-01 at 12 19 35"
src="https://github.com/user-attachments/assets/7be1e967-729a-4025-9d4e-112c8e4162ad"
/>
2025-09-01 13:50:42 +02:00
Bogdan Chadkin cdb2a9581c feat: add search params list to resource UI (#5384)
Ref https://github.com/webstudio-is/webstudio/issues/3691

Editing search params separately from url can improve experience working
with external CMS or databases like baserow.

Also made headers list more compact and aligned with search params.
Validation is simplified, empty pairs will be just ignored without
blocking user with validation errors.


https://github.com/user-attachments/assets/3102d2c8-a902-4e86-8011-d71346fb5491
2025-09-01 09:49:43 +02:00
Bogdan Chadkin 2c461b431b fix: show proper error when dropping a too big file (#5385)
Fixes https://github.com/webstudio-is/webstudio/issues/5326
2025-09-01 01:37:54 +02:00
Bogdan Chadkin 973d9df4d5 feat: new resources dialog (#5383)
Ref https://github.com/webstudio-is/webstudio/issues/3691

- moved response preview into resource dialog
- increased dialog size and centered it
- added maximize button to resource dialog
- removed inspect option from dropdown
- refactored centering dialogs without transform to fix nested popovers
positioning

https://github.com/user-attachments/assets/901e086b-afcd-42e9-8866-d62d6cb662d2
2025-08-27 20:48:51 +02:00
Bogdan Chadkin 0376075605 feat: cache resources (#5381)
Ref https://github.com/webstudio-is/webstudio/issues/4077

How it works

- Cache-Control opts in caching (Cache-Control: max-age=3600)
- cached response is matched by url, method and body
- cache is invalidated with Cache-Control change
- responses stored with the cache are not replicated across regions
- responses are not shared between projects

Link for testing
https://test-cache-hcevl.wstd.work/?message=hello
2025-08-25 17:12:20 +02:00
Bogdan Chadkin 05a2dd290e feat: allow user to add asset description (#5369)
Ref https://github.com/webstudio-is/webstudio/issues/3263

Now users can control "alt" for all image uses with asset description.



https://github.com/user-attachments/assets/c0e5ae4b-d2b0-4ec1-bf93-c385816369d1
2025-08-12 15:57:38 +02:00
Bogdan Chadkin 4f7eb26b5f fix: avoid optimizing .ico in docker template (#5368)
IPX we use for image generation does not support .ico format and fails
to process it. Here I just skip image optimization for .ico and pass url
directly.
2025-08-12 01:33:59 +02:00
Bogdan Chadkin 76c436ca1e feat: allow changing asset name (#5367)
Ref https://github.com/webstudio-is/webstudio/issues/3262
https://github.com/webstudio-is/webstudio/issues/3272

This solves a couple of issues.

1. Gives a user ability to change name of uploaded asset.
2. strips internal suffix from filenames in UI

<img width="626" height="541" alt="magic_1"
src="https://github.com/user-attachments/assets/f9c91ac8-cc67-4905-9e86-bf0cbbeae14a"
/>
2025-08-10 20:19:15 +02:00
Bogdan Chadkin fb466caed1 feat: show when asset is used (#5365)
Ref https://github.com/webstudio-is/webstudio/issues/572
https://github.com/webstudio-is/webstudio/issues/3261

- made settings gear visible when asset is used anywhere
- when asset is used delete button shows dialog with all usages

<img width="235" height="149" alt="image"
src="https://github.com/user-attachments/assets/50fc7e45-fb84-451d-9825-592b3ef45388"
/>



<img width="277" height="288" alt="image"
src="https://github.com/user-attachments/assets/37187a5c-92b5-413c-bcdf-caaf506525a4"
/>


<img width="428" height="246" alt="Screenshot 2025-08-09 at 11 30 37"
src="https://github.com/user-attachments/assets/e77d262a-3de0-4d46-b681-b38becb55862"
/>
2025-08-09 15:14:22 +02:00
Bogdan Chadkin c62982fdac fix: show proper labels in content block (#5363)
- content block menu now use `<tag>` format for label
- add human radable labels in default content block template

<img width="629" height="567" alt="Screenshot 2025-08-07 at 22 20 39"
src="https://github.com/user-attachments/assets/b8637d1f-892e-4104-82ff-3de5a03a192d"
/>
2025-08-07 22:29:42 +02:00
Bogdan Chadkin d3da479511 fix: fallback video to provided url for self hosted websites (#5357) 2025-08-04 16:07:05 +02:00
Bogdan Chadkin 0960101fa3 fix: accept any string in <iframe> name attribute (#5349)
Fixes
https://discord.com/channels/955905230107738152/1400906922235920445/1400906922235920445

The spec does not clearly indicate possible values and in case of iframe
and object name attribute accepts any string.
2025-08-03 19:56:05 +02:00
Bogdan Chadkin c2bf7d4af2 feat: support self-hosting animations (#5341)
While animations source code is still private
here enabled publishing minified version of it
so users who self-hosting websites could deploy.
them with working animations.
2025-08-03 19:51:35 +02:00
Oleg Isonen 8e72a3c069 chore: Update LICENSE for sdk-components-animation (#5350)
For simplicity we are changing the license in this package to be the
same as the ./private-src

## 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-08-03 19:24:45 +02:00
Bogdan Chadkin 0f13788fdb fix: support older browsers in docker template (#5346)
URL.canParse is very new method and need to be polyfilled. Docker is the
only place it is used.
2025-08-03 14:39:16 +02:00
Bogdan Chadkin fc033006a4 fix: relax redirects validation (#5348)
Fixes https://github.com/webstudio-is/webstudio/issues/5337

1. checking specific characters will always be error prone
2. checking matching paths is no longer relevant with `/*` which matches
them all
3. added check to validate url or path with `new URL()`
2025-08-03 14:11:22 +02:00
Bogdan Chadkin aff636940b chore: drop legacy AI prompts and logic (#5345)
All of this is very outdated and does not make a lot of sense to have in
our code base.
2025-08-03 10:21:10 +02: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 6bc16940e0 chore: drop AI from UI (#5344)
Our first AI experiment is barely used. And we don't want our users to
confuse it with upcoming Inception. The next integrated with builder
solution will be based on Inception.
2025-08-03 02:04:26 +02:00
Bogdan Chadkin d7e757b59b fix: avoid using global color for head slot and xml (#5342)
Fixes
https://discord.com/channels/955905230107738152/1398319996832059574/1398319996832059574

Here explicitly specified black color for text in xml and head slot.
This prevents white color on root to override text.
2025-08-02 22:44:10 +02:00
Bogdan Chadkin ac6b649397 fix: allow <p> inside of <hgroup> (#5338)
Ref https://github.com/webstudio-is/webstudio-community/discussions/241

Never supported heading outline algorithm was never supported and the
latest update to html spec allowed paragraphs as part of this removal
for lower level subtitles or descriptions.

Though indices tables were not updated. I [sent
PR](https://github.com/whatwg/html/pull/11524)
2025-08-02 16:14:25 +02:00