Commit Graph
155 Commits
Author SHA1 Message Date
Ivan Starkov 13da170ef4 experimental: Allow json in template literals (#3886)
## Description
closes #3872


- [x] - Builder support
- [x] - Publish support

## Steps for reproduction

Example

https://add-json.staging.webstudio.is/builder/8160e16d-5ab4-4249-86de-0c98a64526a3

https://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
2024-08-11 11:50:18 +03:00
Bogdan Chadkin 0c6a5ebbba refactor: migrate dashboard to postgrest (#3902)
Bumped type-fest everywhere to cast DashboardProject view
2024-08-09 17:47:49 +02:00
Ivan Starkov 54e686a4e3 experimental: Add ssg-netlify and ssg-vercel to the cli (#3835)
## 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&amp;w=32&amp;q=80" class="w-image c161qeci" sizes="100vw" srcset="/.netlify/images?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&amp;w=16&amp;q=80 16w, /.netlify/images?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&amp;w=32&amp;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&amp;w=32&amp;q=80" class="w-image c161qeci" sizes="100vw" srcset="/_vercel/image?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&amp;w=16&amp;q=80 16w, /_vercel/image?url=%2Fassets%2Ficonly_svg_converted-converted_zMaMiAAutUl8XrITgz7d1.svg&amp;w=32&amp;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
2024-07-31 19:06:43 +03:00
Bogdan Chadkin 19a80cc0f3 fix: resolve conflicts in variabld and class names (#3839)
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.
2024-07-31 10:44:50 +02:00
Bogdan Chadkin c79d56efc7 refactor: move reserved form fields to sdk (#3834)
Form handlers no longer rely on reserved form fields. They are excluded
before passing form data to n8n handler.
2024-07-30 22:19:08 +02:00
Ivan Starkov 02e7531585 experimental: Templates support (#3819)
## 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
2024-07-30 20:10:40 +03:00
Bogdan Chadkin 60159b894f build: publish 0.174.0 (#3829) 2024-07-30 16:01:35 +02:00
Bogdan Chadkin 78a81a012d fix: handle empty action in webhook form (#3827)
Closes https://github.com/webstudio-is/webstudio/issues/3826

When user deleted action prop was still converted to resource but
resource itself was not created.
2024-07-30 14:57:48 +02:00
Ivan Starkov 8be665e68d experimental: SSG download support (#3783)
## Description

See corresponding [SaaS
PR](https://github.com/webstudio-is/webstudio-saas/pull/311) too

## Steps for reproduction

Click Publish/Export

<img width="363" alt="image"
src="https://github.com/user-attachments/assets/fbc1f4e5-3a2c-4bb9-9242-025196f991bc">


Deploy zip to netlify
<img width="1710" alt="image"
src="https://github.com/user-attachments/assets/daca4ead-6272-4729-8e82-0986301e5c8b">


## 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-30 08:57:33 +03:00
Bogdan Chadkin dca04597fb build: publish 0.173.0 (#3816) 2024-07-29 17:48:40 +02:00
Bogdan Chadkin 1c1c09f6c6 feat: submit webhook form without n8n (#3811)
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
2024-07-28 20:44:26 +02:00
Bogdan Chadkin d7531b73b7 refactor: manage forms with resources (#3803)
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
2024-07-27 20:20:29 +02:00
Bogdan Chadkin 34ae0411db refactor: decouple resource loader from generated requests (#3798)
Ref https://github.com/webstudio-is/webstudio/issues/3789

Unified resource generation to output computed request factory to use in
both loader and action.
2024-07-27 11:59:46 +02:00
Bogdan Chadkin 31bdec9f3b feat: use classes for regular styles (#3796)
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.
2024-07-26 14:00:20 +02:00
Bogdan Chadkin f73680027f feat: use classes for preset styles (#3794)
Closes https://github.com/webstudio-is/webstudio/issues/3787

Replaced [data-ws-component=...] selector with classes in generated
styles. This will unlock cleaner html output in the future.
2024-07-26 10:45:29 +02:00
Bogdan Chadkin 4977e82031 refactor: move social asset into page meta (#3764)
Removed social asset form top level and moved into generated page meta.
Will be less generated data and simple page head.
2024-07-19 21:32:22 +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
Oleg Isonen f8635a6691 experimental: Paste from webflow 8 (#3572)
## 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
2024-06-21 18:10:28 +02:00
Bogdan Chadkin d251e998c8 refactor: use jsx in component generator tests (#3571)
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.
2024-06-16 12:58:10 +03:00
Bogdan Chadkin cf5c6b9f29 refactor: use jsx to represent instances in tests (#3568)
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.
2024-06-15 00:06:20 +03:00
Bogdan Chadkin 936dcd3ca8 build: publish 0.168.0 (#3556) 2024-06-13 14:57:21 +03:00
Bogdan Chadkin 85f66a0ce6 fix: lint weird cases in expressions (#3542)
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.
2024-06-12 13:25:50 +03:00
Bogdan Chadkin c5a9a38838 build: publish 0.167.0 (#3498) 2024-06-05 11:34:59 +03:00
Bogdan Chadkin c621ce90ca feat: add marketplace section in page settings (#3413)
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">
2024-05-25 12:14:18 +03:00
Oleg Isonen 59ff9c23db refactor: Move text placeholders to meta templates (#3410)
## 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
2024-05-24 13:53:19 +02:00
Bogdan Chadkin 0a2e870fa4 build: publish 0.163.0 (#3396) 2024-05-22 14:03:45 +03:00
Ivan Starkov f47455bc75 fix: URL patterns should not be included in the sitemap (#3380)
## 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
2024-05-19 19:07:19 +03:00
Bogdan Chadkin 5e39b06d6b experimental: support history in address bar (#3377)
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">
2024-05-18 23:22:03 +03:00
Bogdan Chadkin 1d0a8ed112 refactor: add object expression utilities (#3363)
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.
2024-05-15 20:13:44 +03:00
Bogdan Chadkin 8bf04f66a9 refactor: define resource control explicitly (#3360)
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
2024-05-15 16:55:20 +03:00
Oleg Isonenandistarkov 2496f68d32 feat: Add System Resource instead of $resources url (#3341)
## Description

ref #3308

<img width="274" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/dd7ae367-76d8-40cc-9eec-d795aaab54eb">

<img width="286" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6f57142d-ad6a-43ef-92ba-dff4afce38bf">


# TODO:

- [x] - Remove copy for curl
<img width="344" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bdd6b92b-5436-4537-b724-a5ecca08e7ca">


## Steps for reproduction

Add Variable, System Resource, open Select, check texts

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

---------

Co-authored-by: istarkov <istarkov@gmail.com>
2024-05-11 17:55:49 +03:00
Ivan StarkovandOleg Isonen 0571d2d50e build: Ability to publish Pages with document type XML (#3316)
## Description

ref #3308 

Ability to render Pages with document type equal to `xml` 

If page with document type xml is created and has path `/sitemap.xml`
this page is rendered as sitemap
otherwise implicit sitemap.xml is generated.

On publish we use following logic for rendering.

With doctype === xml
- we are rendering XmlNode as is
- `Body` rendered as `(props) => props.children`, 
- all other elements as `() => null`


- [x] - sitemap.xml must be excluded from sitemap

## Steps for reproduction

### Example Saas Sitemap with $resource and custom section and headers
mixed with XmlNode

- App builder
https://xml-gen.staging.webstudio.is/builder/d6bcc915-6634-4e2d-9ef1-90e8e3836003?pageId=KrgWBi6ANVxH2BfRbar19
- Published https://saas-sitemapxml-x1g2n.wstd.work/sitemap.xml

### Implicit sitemap
- App builder
https://xml-gen.staging.webstudio.is/builder/96168940-4fbd-454a-9a03-ba4f2dffbbec
- Published https://saas-january-th6m1.wstd.work/sitemap.xml


Example with custom section and non XmlNode elements
<img width="784" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/47520bf8-bb77-4c0f-b44d-011cf2cf9814">



### Example Saas without explicit sitemap



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

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-05-08 09:49:33 +02:00
Bogdan Chadkin 16296c7785 refactor: drop require export condition (#3299)
This hack was used to support classic remix compiler and no longer
necessary.
2024-05-06 22:50:07 +04:00
Ivan Starkov cd76fe4487 feat: Add doctype to new/edit page (#3314)
## Description

ref: #3308 

Use for review:

<img width="380" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/448e7413-aee1-41b5-b748-d20a80d48a44">


<img width="507" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6ed2315f-fd7a-4d7e-b0fe-76d6ac3f87bc">

In case of xml is selected

- No way to make xml as home page
<img width="460" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/22864698-d9ca-41c7-8787-28e89389fc89">
<img width="475" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b104b5f7-2787-41e2-be09-490357c2b1e9">

- Editing of social/etc is disabled

<img width="476" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a53ec4d8-3a73-406f-b179-4270dfa3fb92">


## 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
2024-05-06 20:56:35 +03:00
Bogdan Chadkin 7128bc9204 build: publish 0.151.0 (#3297) 2024-05-04 16:56:39 +04:00
Bogdan Chadkin a54f2a4574 feat: allow customizing default contact email (#3293)
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.
2024-05-03 23:59:12 +04:00
Oleg Isonen cc6dc6481b fix: Fix sitemap urls when using folders (#3281)
## 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
2024-05-02 14:10:44 +02:00
Ivan Starkov 50be0047a1 feat: Add system.origin (#3254)
## 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
2024-04-30 08:59:28 +03:00
Jaya Krishna Namburu 5152cc6a01 fix: Allow users to redirect to home page in redirects (#3252)
## 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)
2024-04-29 11:17:20 +02:00
Ivan Starkov d8994140ba feat: Sitemap resource (#3228)
## 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
2024-04-24 13:05:53 +03:00
Bogdan Chadkin b2355e828f refactor: cleanup system variable (#3213)
Use sdk type for system variable and make it required in pages since it
was added to all pages with migration.
2024-04-20 17:44:01 +07:00
Bogdan Chadkin c336b6ebc7 build: publish 0.145.0 (#3192) 2024-04-18 10:43:07 +07:00
Oleg Isonen faeef3bd4f fix: Allow same page path in different folders if those have a slug (#3172)
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
2024-04-15 16:20:30 +02:00
Bogdan Chadkin e09f8a184e build: switch to pnpm linker (#3168)
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.
2024-04-14 23:07:53 +07:00
Oleg Isonen fcfcbd9480 feat: Support all css properties in Advanced section (#3061)
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
2024-04-09 23:01:25 +02:00
Bogdan Chadkin e75c174f75 build: release 0.144.0 (#3090) 2024-04-04 22:34:52 +07:00
Bogdan Chadkin 4f2d805e64 fix: forbid empty expressions (#3078)
Empty expressions lead to publish errors.
Need to lint them away. Also improved parsing error to more easily see
the source of it.
2024-04-03 15:50:00 +07:00
Ivan Starkov 8bad95fc16 build: release 0.143.0 (#3070)
## 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
2024-03-30 12:04:04 +03:00
Bogdan Chadkin 20df0cef32 refactor: move forms properties into server module (#3034)
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.
2024-03-20 16:42:51 +07:00