Commit Graph
7 Commits
Author SHA1 Message Date
Bogdan Chadkin 99eae65e43 refactor: switch variable values to native validation (#3393)
Here migrated all left fields to native navigation. Got rid from legacy
useField hook.
Replaced number input with just text input as more reliable. And reused
expression linter for json value.

Check following forms
- string
- number
- boolean
- json

<img width="401" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/001bde86-3b7c-472d-ad26-acad2f347712">
2024-05-22 12:59:41 +03:00
Bogdan Chadkin dae9952aa9 refactor: use native validation for resource url (#3366)
Here integrated native fields validation into our form utilities. It
will let us have more isolated validation complexity within each field.

The trick was to detect if any error are not shown. Solved by iterating
form.elements and checking its input.validity.valid and data-color=error
attribute.

<img width="417" alt="Screenshot 2024-05-16 at 01 08 37"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ce112f00-aafd-4388-bb0b-a64baccaffac">
2024-05-16 02:01:32 +03:00
Bogdan Chadkin 4f64676db7 feat: improve variable popover (#2737)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here changed variable popover UI

- removed save/cancel buttons - save is happening on close
- replaced value/resource tabs with type select
- support additional string, number and boolean values
- add validation to value and resource forms

Also added form utilities to manage and compose field validation.
2024-01-07 23:40:48 +07:00
Bogdan Chadkin f018ff9451 Upload assets with native fetch (#1583)
Remix fetcher introduce constraints for own server implementation. For
example body can be FormData, object or string and FormData requires
custom stream parser (they provide one).

Though streaming blob much simpler task and can be done with native
streams.

Another constraint is request cancelation when component is unmounted.
We workaround this with global persistent fetcher. Though native fetch
does not require this workaround too.
2023-05-11 18:59:51 +07:00
Bogdan Chadkin 919d560396 Delete pages with stores (#1289)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1084

Now whole pages management is managed by immerhin patches. Got rid of
pages/$projectId endpoint and no longer used form utils.
2023-03-25 18:56:24 +07:00
Bogdan Chadkin 9a7b61a491 Validate pages on client (#1221)
We are moving pages logic to client side to support collaboration and do
less work on server. Here migrated validation to client side. Server
validation will be removed with endpoints in following PR.
2023-03-10 18:52:18 +03:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00