Skip to content

Commit b3c18a0

Browse files
committed
address comments.
1 parent dbada9e commit b3c18a0

File tree

10 files changed

+32
-16
lines changed

10 files changed

+32
-16
lines changed

src/lib/components/regionEndpoint.svelte

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515

1616
<Copy value={getProjectEndpoint()} appendTo="parent" copyText="Copy endpoint">
1717
<div
18-
class="flex u-gap-12 u-cross-center interactive-text-output is-buttons-on-top u-text-center"
18+
class="flex u-gap-8 u-cross-center interactive-text-output is-buttons-on-top u-text-center"
1919
style:min-inline-size="0"
2020
style:display="inline-flex">
2121
<span
2222
style:white-space="nowrap"
2323
class="text u-line-height-1-5"
2424
style:overflow="hidden"
2525
style:word-break="break-all"
26-
use:truncateText>
26+
use:truncateText
27+
style:font-family="Inter, arial, sans-serif">
2728
{$projectRegion?.name}
2829
</span>
2930

@@ -35,11 +36,5 @@
3536
width={16}
3637
height={12} />
3738
{/if}
38-
39-
<div class="interactive-text-output-buttons">
40-
<button class="interactive-text-output-button is-hidden" aria-label="copy text">
41-
<span class="icon-duplicate" aria-hidden="true" />
42-
</button>
43-
</div>
4439
</div>
4540
</Copy>

src/lib/layout/wizard.svelte

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
export let finalAction = 'Create';
3131
export let finalMethod: () => Promise<void> = null;
3232
33+
// If the parent layout manages hiding the wizard via dispatched `exit` events,
34+
// the wizard won't hide automatically when `manualExitControl` is true. Handle it manually.
35+
export let manualExitControl = false;
36+
3337
const dispatch = createEventDispatcher();
3438
3539
let showExitModal = false;
@@ -41,8 +45,9 @@
4145
trackEvent('wizard_exit', {
4246
from: 'escape'
4347
});
44-
dispatch('exit');
45-
wizard.hide();
48+
49+
dispatch('exit', { optional: steps.get($wizard.step).optional });
50+
if (!manualExitControl) wizard.hide();
4651
}
4752
}
4853
@@ -53,8 +58,8 @@
5358
trackEvent('wizard_exit', {
5459
from: 'button'
5560
});
56-
dispatch('exit');
57-
wizard.hide();
61+
dispatch('exit', { optional: steps.get($wizard.step).optional });
62+
if (!manualExitControl) wizard.hide();
5863
}
5964
}
6065

src/lib/layout/wizardStep.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
<slot />
3535

3636
<style>
37+
header {
38+
margin-block-end: 1.25rem;
39+
}
40+
3741
.hide-divider {
3842
padding-block-end: 0;
3943
border-block-end: none;

src/routes/(console)/project-[region]-[project]/overview/header.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
<CoverTitle>
1010
{$project?.name}
1111
</CoverTitle>
12-
<Id value={$project.$id}>{$project.$id}</Id>
1312

14-
<RegionEndpoint />
13+
<div class="u-flex u-gap-8 u-cross-center">
14+
<Id value={$project.$id}>{$project.$id}</Id>
15+
16+
<RegionEndpoint />
17+
</div>
1518
</svelte:fragment>
1619
</Cover>

src/routes/(console)/project-[region]-[project]/overview/platforms/createAndroid.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Wizard
3434
title="Add an Android platform"
3535
steps={stepsComponents}
36+
manualExitControl
3637
on:finish={onPlatformSetupFinish}
3738
on:exit={onPlatformSetupFinish}
3839
finalAction="Go to dashboard" />

src/routes/(console)/project-[region]-[project]/overview/platforms/createApple.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Wizard
3434
title="Add an Apple platform"
3535
steps={stepsComponents}
36+
manualExitControl
3637
on:finish={onPlatformSetupFinish}
3738
on:exit={onPlatformSetupFinish}
3839
finalAction="Go to dashboard" />

src/routes/(console)/project-[region]-[project]/overview/platforms/createFlutter.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Wizard
3434
title="Add a Flutter platform"
3535
steps={stepsComponents}
36+
manualExitControl
3637
on:finish={onPlatformSetupFinish}
3738
on:exit={onPlatformSetupFinish}
3839
finalAction="Go to dashboard" />

src/routes/(console)/project-[region]-[project]/overview/platforms/createReactNative.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Wizard
3434
title="Add a React Native platform"
3535
steps={stepsComponents}
36+
manualExitControl
3637
on:finish={onPlatformSetupFinish}
3738
on:exit={onPlatformSetupFinish}
3839
finalAction="Go to dashboard" />

src/routes/(console)/project-[region]-[project]/overview/platforms/createWeb.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<Wizard
3434
title="Add a web platform"
3535
steps={stepsComponents}
36+
manualExitControl
3637
on:finish={onPlatformSetupFinish}
3738
on:exit={onPlatformSetupFinish}
3839
finalAction="Go to dashboard" />

src/routes/(console)/project-[region]-[project]/overview/platforms/wizard/skipped.svelte

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@
1717
* this sometimes caused outdated data to be visible for a brief moment.
1818
*/
1919
export async function invalidateDependencies(): Promise<void> {
20-
console.log('invalidateDependencies');
2120
await Promise.all([invalidate(Dependencies.PROJECT), invalidate(Dependencies.PLATFORMS)]);
2221
}
2322
2423
export async function onPlatformSetupFinish(event: CustomEvent): Promise<void> {
25-
const isSkipped = event.detail?.skipped ?? false;
24+
const type = event.type;
25+
const skipped = event.detail.skipped ?? false;
26+
const optional = event.detail.optional ?? false;
27+
28+
const isSkipped = type === 'finish' ? skipped : type === 'exit' ? optional : false;
29+
2630
showSkippedModal.set(isSkipped);
2731
2832
if (!isSkipped) {

0 commit comments

Comments
 (0)