## Description
closes#3872
- [x] - Builder support
- [x] - Publish support
## Steps for reproduction
Example
https://add-json.staging.webstudio.is/builder/8160e16d-5ab4-4249-86de-0c98a64526a3https://test-json-ki9yj.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
## Description
### Todos
- [x] - Expand support: `ssg` and `ssg-(netlify|vercel)` differ by only
one file. This expansion allows a single external template to apply to
multiple internal uses (previously hardcoded in prebuild, see
`defaults`).
- [x] - Add & test ssg-vercel and ssg-netlify constants.mjs templates to
support image optimizations.
## Steps for reproduction
```bash
cd ./fixtures/ssg
pnpm cli build --template ssg-netlify --template internal --preview && pnpm prettier --write .
pnpm build
```
then drag drop on netlify and see the result
[example](https://66a9d3c5c6bb86681c6611e4--inspiring-liger-df7a81.netlify.app/)
```html
<img alt="" width="14" height="16" src="/.netlify/images?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=32&q=80" class="w-image c161qeci" sizes="100vw" srcset="/.netlify/images?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=16&q=80 16w, /.netlify/images?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=32&q=80 32w" decoding="async" loading="lazy">
```
```bash
cd ./fixtures/ssg
pnpm cli build --template ssg-vercel --template internal --preview && pnpm prettier --write .
pnpm build
```
Upload to https://github.com/webstudio-is/ssg-vercel-test/tree/main
See vercel deployment
[example](https://ssg-vercel-test-r0a778rpj-getwebstudio.vercel.app/)
```html
<img alt="" width="14" height="16" src="/_vercel/image?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=32&q=80" class="w-image c161qeci" sizes="100vw" srcset="/_vercel/image?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=16&q=80 16w, /_vercel/image?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&w=32&q=80 32w" decoding="async" loading="lazy">
```
## 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
Fixes https://github.com/webstudio-is/webstudio/issues/3837
This fixes the issue with duplicating classes for different instances.
Affected both atomic and non-atomic styles because non-atomic class is
used as identifier internally.
## Description
Only support without any UI
Corresponding saas
https://github.com/webstudio-is/webstudio-saas/pull/312
## 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
Closes https://github.com/webstudio-is/webstudio/issues/3789
Here stopped submitting webhook form with custom action to n8n and
requested directly from generated code. This has a few benefits
- self-hosted websites (vercel, netlify) no longer have to setup n8n to
support forms
- we can pay n8n for these executions no more
- user no longer have to unsubscribe from emails when setup custom
webhook
Ref https://github.com/webstudio-is/webstudio/issues/3789
Here changed a few things
- replace WebhookForm action prop with resource, which is sent with
hidden field instead of instance id
- prevented generating method and action in client side code
- generate "action" resource instead of form properties for server
action prop is replaced only inside cli to not require support in
builder yet, in the future this can be part of client migrations
Closes https://github.com/webstudio-is/webstudio/issues/3788
Here switched from attribute selector to classes when atomic styles are
disabled. This will let us get rid from data-ws-* attributes in
generated html.
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.
## 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
## Description
- adds breakpoints when they are missing
- adds some form components
- rewrites tests to jsx
https://share.descript.com/view/yOz2JeAdrXW
## 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
Here enahnced our jsx with props support and rewrote component generator
tests with it as an example.
Props are solved in straightforward way, type of value described prop
type. Though in case of expression, parameter, asset, page, action used
classes as opaque types.
Added "@webstudio-is/sdk/testing" entry point with jsx utilities to
simplify instances representation.
React is used as runtime, then renderJsx traverse resulting tree and
converts into our data.
Looks like acorn skip thes rest of the input after successfully parsing
expression. This resulted in weird syntax errors our linter allow user
to enter.
The fix is simple, force acorn to consider whole input as expression by
wrapping with parentheses. Though it also requires tuning diagnostics
position.
Fixes https://github.com/webstudio-is/webstudio/issues/3405
Reusing existing fields for marketplace does not work well when fields
are dynamically bound to cms data. Here we replaced existing fields used
in marketplace with static ones.
- ws:title ?? page title -> page name
- social image url ?? social image asset -> marketplace thumbnail ??
social image asset
- exclude page from searcg -> marketplace include
- ws:category -> marketplace category
<img width="449" alt="Screenshot 2024-05-24 at 17 15 29"
src="https://github.com/webstudio-is/webstudio/assets/5635476/d86ae2dc-d56f-4244-b4c2-c13fc1f059df">
## Description
Part of https://github.com/webstudio-is/webstudio/issues/3149 this
allows us to understand if an instance has text child.
With this knowledge we can place instances into components that don't
have text children and after them if they do.
## Steps for reproduction
1. insert text or paragraph
2. see there is expected placeholder text which is editable
3. select it, tell AI to change color or something
4. see it works and see in payload it didn't send placeholder text
5. try text editing on empty body - shouldn't allow it
## Code Review
- [ ] hi @TrySound , 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.example`
and the `builder/env-check.js` if mandatory
## Description
URL patterns should not be included in the sitemap. For instance, before
this PR, we included paths like /:slug in the sitemap.
## Steps for reproduction
Open
https://fix-sitemap-slug.staging.webstudio.is/builder/8404e444-093d-4e70-b5c2-03fd89b9eb6d?pageId=EksrLskoGCCreyVN4xp2r
See dynamic page is excluded
## 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.example`
and the `builder/env-check.js` if mandatory
Address bar need to fill every time user want to test the page. Here
added history suggestions which let users reuse peviously entered
params.
Had to implement own combobox-like behavior to support syggestions
universally on all inputs.
<img width="384" alt="Screenshot 2024-05-18 at 17 35 54"
src="https://github.com/webstudio-is/webstudio/assets/5635476/4f5add04-cfe9-4ba0-a824-821011bbdd81">
Here added utilities to update expressions partially for example in
graphql json body we need to update separately query and variables
expressions but store as single body expression.
Here simplified detecting system resource control with explicit resource
field. Without it ui falls back to http ui.
Will be useful for graphql ui later.
Also disabled system resource option for non-paid users
## Testing
- create sitemap resource
- close variable popover
- open again and see system control instead of default http control
Fixes https://github.com/webstudio-is/webstudio/issues/3289
Here added contact email fields to use it as recipient instead of owner
email. This way users can host sites for many clients and use default
webhook form behavior without implementing own n8n workflows.
## 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.example`
and the `builder/env-check.js` if mandatory
## Description
review per commit.
- Add system.url.origin to the props, rename publishedUrl ->
publishedOrigin
- Add system.url.origin to the published sites
Example on published site
https://saas-sitemapxml-x1g2n.wstd.work/
Example on builder
<img width="342" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bea3c9b4-c7dc-4936-a56a-fa33327ab6d0">
We use because as of now system is not available on canvas
<img width="448" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2eaa02b0-7566-492b-b98e-7af8a4f636e0">
## 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.example`
and the `builder/env-check.js` if mandatory
## Description
fixes#3224
Allow users to set `/` in new-path. So, from any old-path users can
redirect to the home page.
## Steps for reproduction
1. Go to Project Settings -> redirects.
2. Enter a `old-path` and set the `/` in the new path.
3. Deploy the project
4. And when we use the `old-path` in the URL, the project should take
the route to the home page.
## Code Review
- [ ] hi @kof, I need you to do
- detailed review (read every line)
- 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
- [x] tested locally and on preview environment (preview dev login:
5de6)
## Description
## First Part
Here is only new local resource `/$resources/sitemap.xml` support
It can't be implemented as route for now as we have 2 issues:
1. Cloudflare does not allow server fetches from same domain
2. Remix does not have fetch like sveltekit allowing to bypass real http
roundtrip when fetching local resources
The idea is to write/use it like any route in case of anything of above
will be solved.
Most PR Size is generated new fixture page.
Move SiteData into the resource.
Here is example of rendering this resource using html.
Project to play:
https://sitemap.staging.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74
Published site:
https://sitemap-saas-t6j12.wstd.work/
<img width="785" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b62af518-37bb-4daa-9f57-9145b4c77364">
## Next steps:
- Add `origin` to the system, or even better add `system.hostUrl` with
origin, hostname etc
- Add xml element and hardcoded sitemap.xml page
## Steps for reproduction
1. click button
4. 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.example`
and the `builder/env-check.js` if mandatory
Closes https://github.com/webstudio-is/webstudio/issues/3025
## Description
Allow having the same page path if the full path is different through
folder slug
## Steps for reproduction
Case 1
1. create a folder with slug /1 and another with slug /2
2. create page with path /p in folder 1
3. create page with path /p in folder 2
4. see that this is allowed
Case 2
1. create a foder 1 with empty slug and folder 2 with empty slug
2. create page with path /p in folder 1
3. create page with path /p in folder 2
4. see that this is not allowed
## 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.example`
and the `builder/env-check.js` if mandatory
With new remix setup we may finally not need hoisted linker which makes
pnpm very buggy.
Here added all missing dependencies to package.json and removed node
linker from .npmrc.
Closes https://github.com/webstudio-is/webstudio/issues/3058
## Description
We are going to support all CSS properties by allowing adding them in
the Advanced section
Todo
- [x] use css value input
- [x] rename the section to Other
- [x] Allow adding properties with +
- [x] delete grid-child section
- [x] descriptions for properties
- [x] check ai generated properties that don't exist in visual panel
(may need to add listed or automatically place in advanced whatever
wasn't handled above)
- [x] improve scrub perf
- [x] show dots on closed section
- [x] don't show properties in advanced panel if they haven't been
listed but set in the visual panel
- [x] disable toggle group controls when advanced value is used
- [x] add advanced value to select control
- [x] add advanced tooltip to border/outline controls
- [ ] layout for long properties
- [ ] css value input for long values
## 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.example`
and the `builder/env-check.js` if mandatory
## 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.example`
and the `builder/env-check.js` if mandatory
Here moved forms properties, page meta and remix params into server
module as used only in loader and never executed on client. Especially
forms properties may contain user credentials and remix does not
guarantee it to not appear in client side bundle.
Also moved those into sdk as universal generators.