From 747facc5457a9a0dce20ded1d7d1eec36aaa31f2 Mon Sep 17 00:00:00 2001 From: Ivan Starkov Date: Fri, 16 Jun 2023 00:30:18 +0300 Subject: [PATCH] Add animated loading icon on publish button (#1778) ## Description Add animated loading icon on publish button ref #1715 image Todo: - [x] - https://discord.com/channels/955905230107738152/1117940560574021782 Errors are now aligned image ## 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 --------- Co-authored-by: Oleg Isonen --- .../app/builder/features/topbar/domains.tsx | 1 + .../app/builder/features/topbar/entri.tsx | 4 +- .../app/builder/features/topbar/publish.tsx | 52 +++++++++---------- packages/icons/package.json | 4 +- 4 files changed, 31 insertions(+), 30 deletions(-) diff --git a/apps/builder/app/builder/features/topbar/domains.tsx b/apps/builder/app/builder/features/topbar/domains.tsx index bc09274957..778d5b46b1 100644 --- a/apps/builder/app/builder/features/topbar/domains.tsx +++ b/apps/builder/app/builder/features/topbar/domains.tsx @@ -571,6 +571,7 @@ const DomainItem = (props: { handleUpdateStatus(); }} + isPublishing={props.isPublishing} /> diff --git a/apps/builder/app/builder/features/topbar/entri.tsx b/apps/builder/app/builder/features/topbar/entri.tsx index a6873be80c..3b499567e9 100644 --- a/apps/builder/app/builder/features/topbar/entri.tsx +++ b/apps/builder/app/builder/features/topbar/entri.tsx @@ -10,10 +10,12 @@ export const Entri = ({ dnsRecords, domain, onClose, + isPublishing, }: { dnsRecords: DnsRecord[]; domain: string; onClose: (detail: EntriCloseDetail) => void; + isPublishing: boolean; }) => { entriGlobalStyles(); const { error, isOpen, showDialog } = useEntri({ @@ -27,7 +29,7 @@ export const Entri = ({ {error !== undefined && {error}}