Skip to content

Commit fdd6007

Browse files
authored
feat: integrate-flows (#94)
* feat: intigrate-flows * fix: spacing in e-passport page * fix: page connectivity * feat: app page transitions * fix: z index * fix: pages * fix: view transition effect on splashscreen * fix: drawer pill and cancel button removed * fix: share button removed when onboarding * fix: remove share and view button when on onboarding flow * fix: remove view button * fix: ci checks * fix: transitions * fix: transititon according to direction * fix: lint error * fix: loop holes
1 parent 15ddc11 commit fdd6007

File tree

14 files changed

+164
-21
lines changed

14 files changed

+164
-21
lines changed

infrastructure/eid-wallet/src/app.css

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,96 @@ body {
7676
padding-left: env(safe-area-inset-left);
7777
padding-right: env(safe-area-inset-right);
7878
}
79+
80+
/* Ensure background remains correct during transitions */
81+
:root[data-transition]::view-transition-group(root),
82+
:root[data-transition]::view-transition-old(root),
83+
:root[data-transition]::view-transition-new(root) {
84+
background-color: white !important; /* Default to white */
85+
}
86+
87+
.dark:root[data-transition]::view-transition-group(root),
88+
.dark:root[data-transition]::view-transition-old(root),
89+
.dark:root[data-transition]::view-transition-new(root) {
90+
background-color: #0b0d13 !important; /* Use dark background in dark mode */
91+
}
92+
93+
/* Prevent flickering */
94+
:root[data-transition]::view-transition-old(root),
95+
:root[data-transition]::view-transition-new(root) {
96+
contain: paint;
97+
will-change: transform, opacity;
98+
}
99+
100+
/* Slide-in from the right without fade */
101+
@keyframes slide-from-right {
102+
from {
103+
transform: translateX(100%); /* Start from the right */
104+
opacity: 1; /* Ensure fully visible */
105+
}
106+
to {
107+
transform: translateX(0); /* Move to original position */
108+
opacity: 1;
109+
}
110+
}
111+
112+
/* Slide-out to the right without fade */
113+
@keyframes slide-to-right {
114+
from {
115+
transform: translateX(0); /* Start at original position */
116+
opacity: 1;
117+
}
118+
to {
119+
transform: translateX(100%); /* Move to the right */
120+
opacity: 1;
121+
}
122+
}
123+
124+
/* Slide-in from the left without fade */
125+
@keyframes slide-from-left {
126+
from {
127+
transform: translateX(-100%); /* Start from the left */
128+
opacity: 1;
129+
}
130+
to {
131+
transform: translateX(0); /* Move to original position */
132+
opacity: 1;
133+
}
134+
}
135+
136+
/* Slide-out to the left without fade */
137+
@keyframes slide-to-left {
138+
from {
139+
transform: translateX(0); /* Start at original position */
140+
opacity: 1;
141+
}
142+
to {
143+
transform: translateX(-100%); /* Move to the left */
144+
opacity: 1;
145+
}
146+
}
147+
148+
@keyframes fade-out {
149+
from {
150+
opacity: 1;
151+
}
152+
to {
153+
opacity: 0;
154+
}
155+
}
156+
157+
:root[data-transition]::view-transition-old(root) {
158+
animation: 400ms ease-out both fade-out;
159+
}
160+
161+
:root[data-transition="right"]::view-transition-new(root) {
162+
animation: 200ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
163+
position: relative;
164+
z-index: 1;
165+
}
166+
167+
:root[data-transition="left"]::view-transition-new(root) {
168+
animation: 200ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-left;
169+
position: relative;
170+
z-index: 1;
171+
}

infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,21 @@ const baseClasses = `relative ${variant === "eName" ? "bg-black-900" : variant =
5353
<div class="flex justify-between">
5454
{#if variant === 'eName'}
5555
<HugeiconsIcon size={30} strokeWidth={2} className="text-secondary" icon={CheckmarkBadge02Icon} />
56-
<div class="flex gap-3 items-center">
56+
<div class="flex gap-3 items-center">
57+
{#if shareBtn}
5758
<Button.Icon icon={Upload03Icon} iconColor={"white"} strokeWidth={2} onclick={shareBtn} />
59+
{/if}
60+
{#if viewBtn}
5861
<Button.Icon icon={ViewIcon} iconColor={"white"} strokeWidth={2} onclick={viewBtn} />
62+
{/if}
5963
</div>
6064
{:else if variant === 'ePassport'}
6165
<p class="bg-white text-black flex items-center leading-0 justify-center rounded-full h-7 px-5 text-xs font-medium">HIGH SECURITY</p>
66+
{#if viewBtn}
6267
<Button.Icon icon={ViewIcon} iconColor={"white"} strokeWidth={2} onclick={viewBtn} />
63-
68+
{/if}
6469
{:else if variant === 'eVault'}
65-
<h3 class="text-black-300 text-3xl font-semibold mb-3">{state.progressWidth} Used</h3>
70+
<h3 class="text-black-300 text-3xl font-semibold mb-3 z-[1]">{state.progressWidth} Used</h3>
6671
{/if}
6772
</div>
6873
<div>

infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type { HTMLAttributes } from "svelte/elements";
77
88
interface IDrawerProps extends HTMLAttributes<HTMLDivElement> {
99
isPaneOpen?: boolean;
10-
isCancelRequired?: boolean;
1110
children?: Snippet;
1211
handleSwipe?: (isOpen: boolean | undefined) => void;
1312
}
@@ -17,7 +16,6 @@ let pane: CupertinoPane;
1716
1817
let {
1918
isPaneOpen = $bindable(),
20-
isCancelRequired = false,
2119
children = undefined,
2220
handleSwipe,
2321
...restProps
@@ -36,7 +34,7 @@ $effect(() => {
3634
backdropOpacity: 0.5,
3735
backdropBlur: true,
3836
bottomClose: true,
39-
buttonDestroy: isCancelRequired,
37+
buttonDestroy: false,
4038
showDraggable: true,
4139
upperThanTop: true,
4240
breaks: {
@@ -89,6 +87,7 @@ $effect(() => {
8987
}
9088
9189
:global(.move) {
90+
display: none !important;
9291
margin-block: 6px !important;
9392
}
9493
</style>

infrastructure/eid-wallet/src/routes/(app)/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ let currentRoute = $derived(page.url.pathname.split("/").pop() || "home");
1515
</div>
1616
{/if}
1717

18-
<div class="p-6 mb-16">
18+
<div class="p-6">
1919
{@render children()}
2020
</div>

infrastructure/eid-wallet/src/routes/(app)/+page.svelte renamed to infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@ function shareQR() {
5959
/>
6060
{/snippet}
6161

62-
{@render Section("eName", eName)}
63-
{@render Section("ePassport", ePassport)}
64-
{@render Section("eVault", eVault)}
62+
<main class="pb-16">
63+
{@render Section("eName", eName)}
64+
{@render Section("ePassport", ePassport)}
65+
{@render Section("eVault", eVault)}
66+
</main>
6567

6668
<Drawer
6769
title="Scan QR Code"
6870
bind:isPaneOpen={shareQRdrawerOpen}
69-
isCancelRequired={true}
7071
class="flex flex-col gap-4 items-center justify-center"
7172
>
7273
<div class="flex justify-center relative items-center overflow-hidden h-full bg-gray rounded-3xl p-8">

infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ let flashlightOn = $state(false);
6161
<Drawer
6262
title="Scan QR Code"
6363
bind:isPaneOpen={codeScannedDrawerOpen}
64-
isCancelRequired={true}
6564
class="flex flex-col gap-4 items-center justify-center"
6665
>
6766
<div class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]">
@@ -108,7 +107,6 @@ let flashlightOn = $state(false);
108107
<Drawer
109108
title="Scan QR Code"
110109
bind:isPaneOpen={loggedInDrawerOpen}
111-
isCancelRequired={true}
112110
class="flex flex-col gap-4 items-center justify-center"
113111
>
114112
<div class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]">

infrastructure/eid-wallet/src/routes/(app)/settings/+layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { runtime } from "$lib/global/runtime.svelte";
55
const { children } = $props();
66
</script>
77

8-
<main class="h-[100vh] px-[5vw] pb-[4.5vh]">
8+
<main>
99
<AppNav title={runtime.header.title ?? ""}/>
1010
{@render children?.()}
1111
</main>

infrastructure/eid-wallet/src/routes/(app)/settings/pin/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ $effect(() => {
4545
<ButtonAction class="w-full" callback={handleChangePIN}>Change PIN</ButtonAction>
4646
</main>
4747

48-
<Drawer bind:isPaneOpen={showDrawer} isCancelRequired={true}>
48+
<Drawer bind:isPaneOpen={showDrawer}>
4949
<div class="relative bg-gray w-[72px] h-[72px] rounded-[24px] flex justify-center items-center mb-[2.3vh]">
5050
<span class="relative z-[1]">
5151
<HugeiconsIcon icon={CircleLock01Icon} color="var(--color-primary)"/>

infrastructure/eid-wallet/src/routes/(auth)/e-passport/+page.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<script lang="ts">
2+
import { goto } from "$app/navigation";
23
import { Hero } from "$lib/fragments";
34
import IdentityCard from "$lib/fragments/IdentityCard/IdentityCard.svelte";
45
import { ButtonAction } from "$lib/ui";
56
6-
const handleFinish = async () => {};
7+
const handleFinish = async () => {
8+
await goto("/main");
9+
};
710
</script>
811

912

@@ -15,7 +18,6 @@ const handleFinish = async () => {};
1518
class="mb-2"
1619
/>
1720
<IdentityCard variant= "ePassport"
18-
viewBtn= {() => alert("View")}
1921
userData= {{
2022
Name: "Ananya",
2123
Dob: "29 Nov 2003",
@@ -25,7 +27,7 @@ const handleFinish = async () => {};
2527
</section>
2628
<section class="mt-[4vh] mb-[9vh]">
2729
<h4>Your eVault</h4>
28-
<p class="text-black-700">We’ve also created your eVault—secure cloud storage for your personal data. W3DS platforms access it directly, keeping you in control.</p>
30+
<p class="text-black-700 mb-[1vh]">We’ve also created your eVault—secure cloud storage for your personal data. W3DS platforms access it directly, keeping you in control.</p>
2931
<IdentityCard variant= "eVault"
3032
usedStorage= {15}
3133
totalStorage= {80}/>

infrastructure/eid-wallet/src/routes/(auth)/register/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $effect(() => {
8181
{/if}
8282

8383

84-
<Drawer bind:isPaneOpen={showDrawer} isCancelRequired={true}>
84+
<Drawer bind:isPaneOpen={showDrawer}>
8585
{#if !isBiometricScreen}
8686
<div class="relative bg-gray w-[72px] h-[72px] rounded-[24px] flex justify-center items-center mb-[2.3vh]">
8787
<span class="relative z-[1]">

0 commit comments

Comments
 (0)