## Description
At publish we would allow to check domains we want to publish. As of now
we publish all project domains.
But already pass them from UI, so future move would be just UI changes,
without touching API
- [x] - Fix "no access to project domains using service api call"
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129
Here added sdk-components-react-remix with all remix components moved
away from react-sdk.
Exposed 3 entry points
- @webstudio-is/sdk-components-react-remix
- @webstudio-is/sdk-components-react-remix/metas
- @webstudio-is/sdk-components-react-remix/props
## Description
We want to be able to specify the order in which components are shown in
the panel.
Right now the order property is not set where needed, because I am
waiting for feedback from @taylornowotny
## Steps for reproduction
1. Open add components panel
2. See components are in the right order
## Code Review
- [ ] hi @TrySound , I need you to do
- conceptual review (architecture, feature-correctness)
- [ ] hi @taylornowotny , I need you to do
- give some thought to both components that need to be first which we
set specific order to (the rest will go as is)
- recheck the categories, I feel like our split into categories is not
intentional
## 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-builder/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
The idea is to deploy by `buildId` instead of `projectId`.
Every build now can have `deployment` metadata params (currently
`domains` only, but in the future can be any additional metadata, like
vars etc)
Publish is simplified (-2 workers), the same trpc as for other saas api
is used to publish, see `cms.publish`
(also local development is simplified as edge-api at saas works on local
dev perfectly)
isDev and isProd are not needed anymore. Any published build has
`deployment` metadata, and various builds can be active now on different
domains.
Build clone now seriously faster as no parse/serialize steps involved at
all.
Partial index `CREATE UNIQUE INDEX "Build_dev_index" ON "Build"
("projectId") WHERE "deployment" IS NULL;` created so we could be sure
that no more than 1 dev build exists.
createBuild and cloneBuild are now splitted, and seriously simplified
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545
All complex use cases already switched to get meta from arguments and
from atom.
Here migrated the last cases and dropped legacy meta register in
react-sdk package. Now we ready to split components into separate
packages.
Cleanup after refactoring. Now we can get rid of Asset.location because
asset location is defined by environment. And remove fields moved to
File table.
Enable unicorn eslint rule to enforce `node:fs` like specifiers for node
modules.
Previously `node:` prefix helped to find server code bundled in browser.
Here added two component restrictions to meta.
requiredAncestors prevent inserting components outside of required ones
here restricted ListItem to always be inside of List.
invalidAncestors prevent inserting components inside of invalid ones
here prevented nested buttons
Ref https://github.com/webstudio-is/webstudio-builder/issues/1664
Here added Build.version which is updated on every patch. The client
should provide latest received version to compare with stored in db.
When version mismatched user is suggested to reload.
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129
Here refactored registered components away from global state in
react-sdk package in favour of components map.
The map can be easily computed in runtime or generated for worker.
Default and custom (remix) components registering is unified now and
both libraries can be split into separate packages.
Temporary added "@webstudio/react-sdk/components" entry point to get a
record of components.
## Description
Services we need like `image-transform.wstd.io`, `local.wstd.io`
can intersect with user-created domains. _in some cases that will cause
disastrous results_
Do not allow to create domains we already use, and reserve `wstd-sys-`
and `wstd_sys_` for future services we can create
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/1569
Here we change template in meta to include current component instead of
implicitly creating it.
This way we can provide insert composition of components instead of
single one for example input+label. Or even wrap current component like
label>input.
Another usecase is ability to set local styles and props for current
component.
Note: review with hidden whitespaces
## Description
How it looks. (Not everything aligned or have features like in design)
https://github.com/webstudio-is/webstudio-builder/assets/5077042/349c7fae-afd8-478d-9eba-701b002f0fd4
Most API methods return `{ success: true } | {success: false, error:
string}` because in the future they need to be moved into server
workflows, and do not exist or return anything.
## Steps for reproduction
Run locally, at localhost I've created a fake domain creation API, to be
able to test UI.
## 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-builder/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
npm update
## 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-builder/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
Forwarding all headers caused errors in some cases.
## 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-builder/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
Aligning with the design
## 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-builder/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
We need to forward existing request with headers.
Secure by restricting origin.
## Code Review
- [ ] hi @istarkov, 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-builder/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>
## Description
This PR moves the parse-css-value utility that was before part of the
builder app to the css-data package.
In this package we are adding an initial `parse-css` utility that will take
CSS and convert to a format that we can work on within Webstudio. For
now it is relatively simple and it supports only CSS classes parsing.
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/1658
Updated following components in design system
- css value list item
- icon button
- label
- nested icon label
- section title
- toggle button
Updated following UI in builder
- toggle control
- flex grid
- space UI
- collapsible section
- property name
## Description
Fixes a bug:
1. Enter a `px` value into any CSS value input
2. Reload page to make sure everything re-mounts
3. Go to the same input and change unit to `rem`
4. Scrub
5. Unit flips back to `px`
Closes https://github.com/webstudio-is/webstudio/discussions/31
Closes https://github.com/webstudio-is/webstudio-builder/issues/1639
And https://github.com/webstudio-is/webstudio/discussions/29
## Description
We are changing default behavior to not user selectable and allowing it
where it's practical, like copying project name as a deletion
confirmation
## Code Review
- [ ] hi @rpominov , 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-builder/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
Closes#1646
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/193
To make undo of assets deletion work we need to stop deleting files from
storage to restore assets without loosing actual file.
Here added File.isDeleted and file.updatedAt fields to mark as deleted.
This way we can run scheduler to actually delete files which are marked
for some time already. And undo of asset deletion now works.
## Description
1. Closes#1617
Before this PR `selectedInstanceIsRendered` behaved like this:
Switching to instance that **is** on canvas: `true -> false -> true`
Switching to instance that **is not** on canvas: `true -> false`
Issue: we can't tell apart brief `false` in the first case, and final
`false` in the second
After this PR:
Switching to instance that **is** on canvas: `true -> undefined -> true`
Switching to instance that **is not** on canvas: `true -> undefined ->
false`
Now we can distinguish temporary `undefined` from permanent `false` and
don't hide style panel during `undefined`
## Steps for reproduction
Case 1:
1. Select a Box instance
2. Scroll style panel
3. Select another Box instance
4. Scroll should not reset
Case 2:
1. Select a Box instance
2. Select a Success Message instance in a Form
3. Style panel should show "Select an instance on the canvas" message
## Description
Makes AllComponent type better
Found null bug.
Enforced for all components
```
[componentAttribute]: instance.component,
[idAttribute]: instance.id,
```
to be non-optional.
cc @TrySound should fix your issue with Html component
## 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-builder/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
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179
Here added image proxy - simple remix route to interop image requests
locally and in preview. We have now only single image loader which
accepts image base url.
Here support only local deployment. Preview and saas preview to
RESIZE_ORiGIN env.
Closes https://github.com/webstudio-is/webstudio-builder/issues/1334
## Description
When project item is clicked, we are fetching the project data via
router, if its slow - we show loading indication
## Steps for reproduction
1. open dashboard
2. set network throttling in dev tools to super slow
3. open a project
## Code Review
- [ ] hi @istarkov , 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-builder/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: nettohadi <32300655+nettohadi@users.noreply.github.com>
## Description
1. Add 404 instead of redirect
2. Fix vercel/remix upload
## 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-builder/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
closes#1557
## Steps for reproduction
Install
https://chrome.google.com/webstore/detail/dark-mode/dmghijelimhndkbmpgbldicpogfkceaj
plugin
See our website doesn't work but current PR is
## 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-builder/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
Form data is complex format to work with and web api does not support
its stream parsing and we had to use remix utilitties.
Here upload file as is so node or worker gets stream and do anything
with it. So this is one less dependency on node.
These streams are still bufferred but we can improve this at least for
images later to not exceed vercel memory.
Content type is important when detect image or font parser and required
(or recommended?) for uploading to s3.
Here temporary saved it in File.format and reuse in upload. Later
overriden with parsed format.
This is a preparation to uploading only blob without additional
information.