Commit Graph
24 Commits
Author SHA1 Message Date
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
Oleg Isonen 2fb558bfd3 fix: Prevent duplicate token when renaming (#3873)
Fixes https://github.com/webstudio-is/webstudio/issues/3776

## Description

During renaming of the token

- when token name is less than 1 character - show error state
- when token name already exists - show error state

Fixed a bunch of bugs with esc, error handling and switching to editing
another token while still editing the first one



https://github.com/user-attachments/assets/5833e611-235b-4c2c-a3ed-3ee521ac5fd1



## 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-08-07 00:02:40 +02:00
Oleg Isonen ec26bd75ae fix: Fix share dialog saving behavior (#3269)
## Description

1. You couldn't type space at the end of the shared link name 
2. When clicking outside it would save the value

## Steps for reproduction

1. click button
3. 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-01 12:31:57 +02:00
Bogdan Chadkin cb5e43580b refactor: replace uuid with crypto.randomUUID() (#3218)
crypto.randomUUID() is globally available in node and browser
environments. Uuid package is no longer necessary for our cases.
2024-04-21 15:38:39 +07:00
Ivan Starkov 8957792973 refactor: Generalize trpc client (#3010)
## Description

- [x] - Test that clone by authToken is working

Next PR:

Add caching headers support

## 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-14 14:25:43 +03:00
Ivan Starkov a735af5ccd fix: Set disabled labels on permission checkboxes (#2993)
## Description

<img width="189" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/c0635e53-e2a9-4f5b-86b1-4a6904eff2d3">

## 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-12 13:54:56 +03:00
Ivan Starkov d1469f9e1d feat: Add ability to disable clone and copy for view links (#2983)
## Description


### HAS MIGRATION, CAN'T BE TESTED ONLINE


Pro users can add additional permissions to auth tokens
<img width="358" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/df294ac3-e98c-465d-8115-f74ff075ff2d">

In case of cloning is disabled user will see

<img width="448" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/c77e5598-ba0a-4a40-82fc-3aab7c1d107f">

In case of copying

<img width="506" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a92ec66f-0b7a-4666-aa20-911de51c9d28">





## 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-11 08:52:37 +03:00
Oleg Isonen 233d6bf429 chore: Improve copy to clipboard experience (#2920)
## Description

- more decent copy to clipboard button with tooltip expaining the state

## 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-02-16 14:23:58 +01:00
Oleg Isonen 6e503ce98a fix: Fix shared link deletion crash (#2899)
## Description

When deleting a link, blur event from link name triggers an update,
which executes after link has been deleted

## Steps for reproduction

1. create a link
2. delete it
3. should not crash

## 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-02-12 14:04:37 +01:00
Oleg Isonen a34afe8160 fix: Show advanced typography styles state using ellipsis icon dots (#2888)
## Description

Since advanced typography options are 1 menu click hidden, there was no
way to know if they are set when looking at the panel, I decided to get
creative and used the ellipsis icon dots same way we use dots on the
panel title, slightly increased their size to make it visible

<img width="236" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/388f6309-9ae2-4a7e-a43e-557d3cf97530">


## Steps for reproduction

1. define advanced typography options
2. see dots change colors, same way as the section title dots when
closed

## 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-02-10 19:47:50 +01:00
Oleg Isonen dbf84eb990 chore: Update wording on the view permission (#2894)
## Description

Description was outdated

## 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-02-10 19:46:19 +01:00
Oleg Isonen 42c882f213 feat: Make publish permission visible for everyone but enabled for pro (#2848)
## Description

Publish permission was hidden for non-pro accounts but this makes it
hard to discover.

<img width="151" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e880d535-bbf6-431b-834f-f0fa1f1324c6">

## Steps for reproduction

1. open share dialog
2. see publish permission is disabled for non-pro
3. enabled for pro
4. has a tooltip that explains it
5. has link button that leads to the pricing page

## 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-01-31 12:16:55 +01:00
Oleg Isonen 5930064678 feat: Rename Site to Project because we are not just building a site builder (#2718)
## Description

Site is too narrow name for things that are pssible with webstudio


## 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
2023-12-30 10:40:09 +01:00
Jaya Krishna NamburuandOleg Isonen ad55b6d93f fix: Handle empty input values from the share project popover (#1978)
fixes #1966 

The steps to reproduce are in the linked issue. The popover shouldn't
close when the name in the input field is empty.

@taylornowotny i would like you to check this one for the error state
please, the Input field didn't have a red outline for error as defined
in the figma file. I added it now, So, in order to check the effects of
this in other place. It would be great if you can check it once.

![Screenshot 2023-07-25 at 17 35
51](https://github.com/webstudio-is/webstudio-builder/assets/11075561/db8087b5-13f0-401d-8874-a7c9e248b350)

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-11-20 17:49:50 +01:00
Ivan Starkov a87789f261 feat: Add fields to transaction log, add userPlanSettings (#2633)
## Description

Add additional fields to transaction log, so we can create billing
portal for users to unsubscribe/change etc of subscriptions

Plus:
- [x] Allow unlimited domains to all "pro" users
- [x] Add subscriptions link to users with subscriptions (created by n8n
schema on click)
<img width="213" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/08d40835-3273-4ca9-a0e3-8a4f7614da93">

- [x] Allow admin link sharing

## 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
2023-11-19 22:43:31 +02:00
Ivan Starkov 5c3af9daec Update permission level tooltips to reflect recent changes (#2243)
## Description

ref #2226

<img width="379" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ee316434-07f7-470c-9bee-1db68f1a9afa">

Everything except Button aligned to the design, we don't have Button
with Menu Item style

## 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
2023-09-05 17:48:45 +03:00
Ivan Starkov 905b8287f3 Use pending state on button in Share panel (#2248)
## Description

closes #2225

## Steps for reproduction

Add/delete/update/load links see button has pending state

## 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
2023-09-05 17:39:23 +03:00
Ivan Starkov f3f7f88df3 Add admin (publish) permissions to tokens (#2221)
## Description

Add admin permissions to shared links

<img width="328" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/972a46b9-154b-4426-9d8c-ab62ebf9a9e3">

<img width="283" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/d187da84-4d49-4308-b6ea-f09cb7a09e8c">


Share links for now disabled for admin role. Will do in the next
iteration after releasing above.


## Steps for reproduction

Create admin token link.
Open in incognito, see Publish is working.

## 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
2023-09-04 12:10:29 +03:00
Oleg Isonen 3885b86f89 Attempt to fix useFetch for all our trpc calls (#1948)
## Description

I moved the fix to trpc layer to affect other calls as well. Turned out
the hook is called many times - as many as there are items in dashboard,
so I think relying on state dependency even though it works for
completely unknown reasons is better from perf standpoint (I think ...
who knows ...)

## 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
2023-07-19 18:23:14 +02:00
Roman Pominov 8c27c75f93 Input Field (#954)
## Description

1. Added `InputField` aligned with Figma.
[Demo](https://input-field--638245578b47d4399fba191a.chromatic.com/?path=/story/library-input-field--demo).
Closes #614
2. Added `NestedSelectButton` that should be used as `InputField`'s
suffix.
[Demo](https://input-field--638245578b47d4399fba191a.chromatic.com/?path=/story/library-nested-select-button--demo)
3. Deprecated `TextField`
4. Used `InputField` instead of `TextField` in `CssValueInput`
5. Added support for `<input>` in `ArrowFocus`. Closes #1364

## Steps for reproduction

1. Open style panel
6. Test `CssValueInput`'s
2023-04-04 16:12:10 +03:00
Bogdan Chadkin 9c316b0499 Enable typescript preserveValueImports (#1341)
This option forces all type imports to have "type" specifier even though
there are other value imports.

TS 5 forces it when new verbatimModuleSyntax is enabled.
2023-04-01 17:47:55 +07:00
Roman Pominov d8af510c0c Fix panel color (#1324)
## Description

1. Fixed panel color. Closes #1245 
2. Also fixed backgrounds in TextField and ToggleGroup

## Steps for reproduction

1. Check a panel with controls like Style Panel
2. Background of the panel have changed and all controls have white
background
2023-03-31 11:27:07 +03:00
Oleg Isonen f71cc3facb Share UI improvements (#1029)
## Description

1. Close second popover after editing link label on enter
2. migrate deprecated popover



## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)

## 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
2023-02-14 21:58:39 +01:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00