1
00:00:05,280 --> 00:00:13,200
I live inside my own world of 
make believe kids screaming in 

2
00:00:13,360 --> 00:00:21,760
the cradles profanities, I see 
the water ice covered in ink and

3
00:00:22,120 --> 00:00:27,560
witch cross are the ones who 
helped my cries and watched me 

4
00:00:27,760 --> 00:00:30,840
weep. 
This episode of apparently I 

5
00:00:30,840 --> 00:00:35,360
have to edit because that was 
back when the last episode was 

6
00:00:35,360 --> 00:00:38,200
by El Golia. 
Thanks for sponsoring at El 

7
00:00:38,200 --> 00:00:41,240
Golia. 
I'm I'm so far behind. 

8
00:00:41,360 --> 00:00:44,320
I I'm just getting back. 
Paulo, I just want to say, first

9
00:00:44,320 --> 00:00:46,440
of all, before I forget, 
welcome. 

10
00:00:46,480 --> 00:00:49,640
Thank you for joining us today. 
Thank you too for having me. 

11
00:00:49,920 --> 00:00:54,280
Get, so we actually like Full 
disclosure, we, we did this 

12
00:00:54,280 --> 00:00:57,480
recording once and I completely 
botched it. 

13
00:00:58,160 --> 00:01:02,960
Basically we had, we did what, 
like 90 minutes and ended up, I 

14
00:01:02,960 --> 00:01:06,000
had no audio out of it, which 
was fantastic 'cause we were 

15
00:01:06,000 --> 00:01:09,640
using OBS and blah, blah, blah. 
And hopefully we've put this 

16
00:01:09,640 --> 00:01:12,800
together a little bit more 
cleanly now. 

17
00:01:14,440 --> 00:01:18,080
So today we're talking all about
svelte. 

18
00:01:18,200 --> 00:01:23,160
Is it svelte kit or it's felt? 
Kit it's felt kit view 

19
00:01:23,160 --> 00:01:28,960
transition and yeah, it's 
because like it's using it's 

20
00:01:28,960 --> 00:01:33,520
using like there's bot kit hook 
on navigate. 

21
00:01:33,960 --> 00:01:37,760
So it's only for us Bot kit. 
Nice. 

22
00:01:38,320 --> 00:01:42,680
So I want to spend a couple 
minutes as, as people gather 

23
00:01:42,680 --> 00:01:48,080
around the water cooler, if it 
will, kind of chatting with you 

24
00:01:48,080 --> 00:01:51,120
about what you've been up to. 
I, I see some things kind of 

25
00:01:51,120 --> 00:01:53,920
coming up in February. 
You're doing some cool talks. 

26
00:01:53,920 --> 00:01:56,560
Is that true? 
Yeah, I mean it's not actually a

27
00:01:57,160 --> 00:01:59,760
talk. 
I'm we are doing a couple of 

28
00:01:59,760 --> 00:02:05,400
workshop which I will like. 
I don't know what's what's the 

29
00:02:05,400 --> 00:02:08,720
role of who is taking the 
workshop? 

30
00:02:08,720 --> 00:02:10,840
Like who is? 
Yeah. 

31
00:02:10,840 --> 00:02:12,600
Are you the teacher? 
Are you the leader? 

32
00:02:12,600 --> 00:02:15,320
I mean, I don't know if it's a 
teacher, but I mean. 

33
00:02:16,080 --> 00:02:19,720
We have a couple of workshop MP 
for the whole like thing, so 

34
00:02:19,720 --> 00:02:23,880
it's it's not that. 
Yeah, basically we are doing a 

35
00:02:23,880 --> 00:02:29,800
couple of workshop, One is in 
Munich the 23rd of February. 

36
00:02:30,720 --> 00:02:34,760
So if you want to join us, like 
it's my, my company, my matter, 

37
00:02:34,760 --> 00:02:41,000
it's sponsoring the, the, the 
workshop and it, it will be 

38
00:02:41,000 --> 00:02:43,720
free. 
So if you happen to be in 

39
00:02:43,720 --> 00:02:48,080
Munich, feel free to join us. 
And we will also do a free 

40
00:02:48,080 --> 00:02:54,720
workshop during, I mean there 
will be probably an official 

41
00:02:54,720 --> 00:02:58,400
announcement about this, but we 
will, we will also do a workshop

42
00:02:58,560 --> 00:03:05,880
during that war 2024, which it's
in Amsterdam and it should be 

43
00:03:05,880 --> 00:03:10,400
the 29th of February, the extra 
day that we got. 

44
00:03:10,640 --> 00:03:13,880
We are spending the extra day 
that we got this year talking 

45
00:03:13,880 --> 00:03:17,920
about basket. 
I have my recording browser 

46
00:03:17,920 --> 00:03:20,560
screen open. 
Let me see if oh Yep, I didn't 

47
00:03:20,560 --> 00:03:23,560
know if I could open this on 
LinkedIn or not so let's let me 

48
00:03:23,560 --> 00:03:27,720
show that real quick. 
So this is this is the one 

49
00:03:27,720 --> 00:03:29,720
workshop. 
Yes. 

50
00:03:30,600 --> 00:03:32,880
That's really cool. 
Are you excited about it? 

51
00:03:33,000 --> 00:03:33,880
Are you nervous? 
I'm. 

52
00:03:35,120 --> 00:03:39,400
I'm pretty excited. 
I mean, I I don't mind publicly 

53
00:03:39,400 --> 00:03:44,240
speaking, so it's fine to me. 
You do a great job at it so. 

54
00:03:45,360 --> 00:03:48,840
I mean, I am, I am not 
struggling. 

55
00:03:48,840 --> 00:03:54,920
Maybe I don't know if I'm doing 
a great job and like in general,

56
00:03:54,920 --> 00:03:58,280
I, I also love to teach and I 
mean, it's about svelte and 

57
00:03:58,280 --> 00:04:00,680
svelte kids. 
So I'm always excited about 

58
00:04:00,680 --> 00:04:03,440
that. 
So I'll drop, I'll drop the 

59
00:04:03,440 --> 00:04:06,400
LinkedIn link, maybe there's 
another one, but I'll put that 

60
00:04:06,400 --> 00:04:09,600
one out in the chat out there so
people can get to it. 

61
00:04:12,040 --> 00:04:14,080
That's really awesome. 
I want to go back. 

62
00:04:14,280 --> 00:04:17,279
I was just in Singapore and I'm 
like burned out from travel that

63
00:04:17,440 --> 00:04:22,960
that 17 hour flight there and 
like 14 1/2 back was like plus I

64
00:04:22,960 --> 00:04:25,960
had to get to Michigan. 
After that we're basically lost 

65
00:04:25,960 --> 00:04:31,160
24 hours each way, which. 
I will have to do a bit of quite

66
00:04:31,160 --> 00:04:35,760
a bit of traveling during 
February and I will be in Munich

67
00:04:35,760 --> 00:04:40,520
the 23rd, in Amsterdam the 29th.
So I will need to do a bit of 

68
00:04:40,520 --> 00:04:42,520
traveling the during February 
and March. 

69
00:04:42,520 --> 00:04:45,240
But I mean, at the end of the 
day, it is what it is. 

70
00:04:45,920 --> 00:04:46,760
That's great. 
Yeah. 

71
00:04:46,760 --> 00:04:49,440
If I, if I didn't have family 
and stuff, I'd just hang out in 

72
00:04:49,440 --> 00:04:53,200
Europe for like four months and 
like do all the the circuit of, 

73
00:04:53,760 --> 00:04:56,000
of conferences and stuff. 
I think it would be awesome 

74
00:04:56,720 --> 00:05:00,920
yeah. 
So I think last time we we ran 

75
00:05:00,920 --> 00:05:05,400
up on to like the hour or so. 
So I think maybe we'll get 

76
00:05:05,400 --> 00:05:09,240
started and hopefully people 
have questions and stuff. 

77
00:05:09,240 --> 00:05:13,800
Feel free to ask live and we'll 
go through those and we'll get 

78
00:05:13,800 --> 00:05:18,320
going here. 
So Oh and I I wanted to say this

79
00:05:18,320 --> 00:05:22,920
and I totally forgot to. 
So it's felt lab if you've never

80
00:05:22,920 --> 00:05:26,880
seen it. 
So this all came from this is 

81
00:05:26,880 --> 00:05:29,640
Apollo's, in my opinion. 
This is what brought you on the 

82
00:05:29,640 --> 00:05:30,960
map. 
Like this is what you were known

83
00:05:30,960 --> 00:05:34,680
for. 
So I wanted to show this off. 

84
00:05:34,680 --> 00:05:37,920
This was part of like a spelled 
hackathon. 

85
00:05:38,000 --> 00:05:42,800
Was that right? 
We, me and Antonio Sashevik did 

86
00:05:43,280 --> 00:05:47,600
the did built this together in 
two months. 

87
00:05:47,960 --> 00:05:52,120
I mean, we actually continued 
working on it and we should work

88
00:05:52,120 --> 00:05:56,320
a bit more on it honestly, but 
time it's, it's rough. 

89
00:05:57,200 --> 00:06:03,200
But yeah, we built that during 
the Veltakaton and we won't. 

90
00:06:04,120 --> 00:06:08,600
Yeah, and you should have it. 
It's amazing product and I know 

91
00:06:08,600 --> 00:06:11,400
you know, we can always keep 
fixing and upgrading and blah, 

92
00:06:11,400 --> 00:06:14,680
blah, blah, but it's amazing the
way it is, so it's really cool. 

93
00:06:14,680 --> 00:06:16,440
Definitely check it out. 
If you're doing anything in 

94
00:06:16,440 --> 00:06:20,120
Svelt and want to create stuff, 
here's our podcast that we did 

95
00:06:20,120 --> 00:06:22,440
all about it. 
So definitely go check that out 

96
00:06:22,440 --> 00:06:24,680
too and you can dive in further 
to see it. 

97
00:06:25,600 --> 00:06:28,920
Yeah, I mean, at the end of the 
day, like the reason why we 

98
00:06:28,920 --> 00:06:33,040
built this is is because we 
wanted something similar to this

99
00:06:33,040 --> 00:06:37,080
velt for Apple, but for velt 
kit, which because sometimes you

100
00:06:37,080 --> 00:06:39,760
need velt kit. 
Like for example, if I don't 

101
00:06:39,760 --> 00:06:43,120
know if you we are going to use 
it today, but we used it last 

102
00:06:43,120 --> 00:06:49,280
time and like it's super like 
it's, it's refreshing to be able

103
00:06:49,280 --> 00:06:54,520
to just launch a spell kit 
project very quickly and set up 

104
00:06:54,520 --> 00:06:57,720
everything and then you can 
share it with the word very, 

105
00:06:57,720 --> 00:07:00,400
very easily. 
Yeah, yeah, it's really cool. 

106
00:07:01,480 --> 00:07:05,600
I probably will stick with VS 
Code just 'cause I'm at that for

107
00:07:05,600 --> 00:07:07,880
now, but yeah, definitely check 
it out. 

108
00:07:08,960 --> 00:07:16,440
All right, I'm going to create a
spell kit, basically just a 

109
00:07:16,440 --> 00:07:19,320
starter project. 
And then Paulo's going to 

110
00:07:19,640 --> 00:07:23,360
essentially tell me the rest 
'cause even though we finally 

111
00:07:23,360 --> 00:07:26,040
find the the repo that we 
created the first time, I 

112
00:07:26,040 --> 00:07:28,760
guarantee I've forgotten it all 
'cause I haven't touched the 

113
00:07:28,760 --> 00:07:31,160
keyboard in a while. 
I mean work stuff. 

114
00:07:31,160 --> 00:07:33,640
But like, I haven't programmed 
it's felt in a while. 

115
00:07:33,640 --> 00:07:36,560
So bear with me folks, here we 
go. 

116
00:07:36,880 --> 00:07:41,120
I'm happy that I will be able to
to let you like go back to, to, 

117
00:07:41,120 --> 00:07:45,200
to to programming a bit. 
I know it's I'm This is why I do

118
00:07:45,200 --> 00:07:47,960
code with coding CAD keep my 
skills somewhat fresh. 

119
00:07:47,960 --> 00:07:50,200
It's it's a struggle when you 
don't code for a while. 

120
00:07:51,160 --> 00:07:55,440
All right, so we called the last
ones felt view something I'm 

121
00:07:55,440 --> 00:07:57,720
going to do this one. 
I think we actually did Pokémon.

122
00:07:57,880 --> 00:08:03,240
So view transition Pokémon. 
We'll go from there. 

123
00:08:06,200 --> 00:08:08,000
What do you think? 
Skeleton project? 

124
00:08:09,000 --> 00:08:12,080
Yeah, usually I go with skeleton
because it's the like the one 

125
00:08:12,080 --> 00:08:19,120
with no no boilerplate around. 
Some we did some ES lint a 

126
00:08:19,120 --> 00:08:21,560
little prettier. 
I don't know that we'll use the 

127
00:08:21,560 --> 00:08:24,240
rest. 
So it's about 5. 

128
00:08:24,240 --> 00:08:27,640
Not yet. 
I mean you, I think you should 

129
00:08:27,640 --> 00:08:30,040
be able to use it, but I mean 
it's fine. 

130
00:08:31,160 --> 00:08:34,640
I'm actually no, I'm not using 
this library with both 5, but 

131
00:08:34,919 --> 00:08:35,679
it's up to you. 
I'll take. 

132
00:08:35,679 --> 00:08:37,760
It off, I'll take it off. 
Yeah, OK. 

133
00:08:39,799 --> 00:08:43,240
All right, Oh, Brittany showed 
me how to do this the other day 

134
00:08:43,240 --> 00:08:46,000
and I've already forgotten. 
It was a couple of months ago. 

135
00:08:46,000 --> 00:08:51,160
So there's a way to do code and 
then directly open and I can't 

136
00:08:51,160 --> 00:08:54,680
remember what it is now. 
It's like Dash something, I 

137
00:08:54,680 --> 00:08:58,840
don't remember what it is. 
I think with code you should be 

138
00:08:58,840 --> 00:09:01,280
able to open VS Code in that 
folder. 

139
00:09:03,640 --> 00:09:05,520
We'll just do it that way. 
That's that's the way I'm used 

140
00:09:05,520 --> 00:09:08,480
to doing it. 
There's a way to like just open 

141
00:09:08,480 --> 00:09:11,120
it directly in that view? 
OK, OK, sorry. 

142
00:09:11,120 --> 00:09:15,400
I was because for example, one 
thing that I do is I create with

143
00:09:15,440 --> 00:09:18,240
iterm. 
I create, I launch PMPM with 

144
00:09:18,240 --> 00:09:23,400
iterm, and then I what I love to
do is I I do code dot code dot 

145
00:09:23,560 --> 00:09:27,560
and PMPMI so that while VS Code 
is opening, it's also 

146
00:09:27,600 --> 00:09:30,080
automatically installing. 
I should have. 

147
00:09:30,240 --> 00:09:31,240
I should have done that. 
Yeah. 

148
00:09:31,320 --> 00:09:35,000
Good call. 
Actually not that I think about,

149
00:09:35,040 --> 00:09:37,680
I I have to create a a custom 
command for that? 

150
00:09:39,800 --> 00:09:41,400
I think we're, we're up and 
going. 

151
00:09:41,400 --> 00:09:42,760
I must have something else 
running. 

152
00:09:42,760 --> 00:09:47,200
So around 5174 for the port. 
But this is this is it. 

153
00:09:47,200 --> 00:09:49,200
I mean, this is all you get with
the bare bones. 

154
00:09:49,200 --> 00:09:53,560
You kind of get like this Lib 
and a route and that's, that's 

155
00:09:53,560 --> 00:09:55,800
it. 
So that's our, our whole app at 

156
00:09:55,800 --> 00:09:58,400
this point. 
And we're gonna we're gonna 

157
00:09:58,400 --> 00:10:00,840
start breaking stuff down. 
Yes. 

158
00:10:00,880 --> 00:10:09,000
So I think last time we we again
we did a Pokémon showcase right 

159
00:10:09,760 --> 00:10:13,280
so one thing that we can do is I
mean I I will start probably 

160
00:10:13,280 --> 00:10:15,960
with just creating the list of 
Pokémon. 

161
00:10:17,120 --> 00:10:19,760
I think we had. 
I don't know do we needed, I 

162
00:10:19,760 --> 00:10:22,400
mean do we need an API key or we
can just. 

163
00:10:22,400 --> 00:10:23,920
I don't think so. 
I think it's open. 

164
00:10:24,000 --> 00:10:26,200
OK, we can we can cheat a little
bit here. 

165
00:10:26,200 --> 00:10:27,360
Let's see. 
We did. 

166
00:10:27,760 --> 00:10:29,040
We had Brown. 
Yeah. 

167
00:10:29,760 --> 00:10:35,560
And I think this is, yeah, Yep. 
So I'll tell you, I'll steal 

168
00:10:35,560 --> 00:10:39,000
this whole thing. 
And so can you tell, can you 

169
00:10:39,000 --> 00:10:41,920
tell the folks that haven't done
this before or what the plus 

170
00:10:41,920 --> 00:10:45,880
page server does? 
Yeah, the plus page dot server 

171
00:10:45,880 --> 00:10:49,400
dot yes, basically it's the 
loading of Zvelt. 

172
00:10:49,720 --> 00:10:54,040
So basically if you export a 
load function from there, Zvelt 

173
00:10:54,040 --> 00:10:58,480
will run this concurrently while
rendering the page and it will 

174
00:10:58,480 --> 00:11:03,080
provide this data to the plus 
page that's belt inside the data

175
00:11:03,080 --> 00:11:07,240
prop so. 
If you if we wanted this on our 

176
00:11:07,240 --> 00:11:16,240
main page we would do a script 
Lang equals TS and then let. 

177
00:11:16,360 --> 00:11:18,520
Export. 
Export let. 

178
00:11:18,880 --> 00:11:20,800
Data. 
See, I'm rusty. 

179
00:11:24,200 --> 00:11:28,760
I believe if this had decent 
typing we would actually see 

180
00:11:28,760 --> 00:11:32,800
what data was made out of even 
last exactly just Pokémon you 

181
00:11:32,800 --> 00:11:34,480
would have kind of the rest of 
that. 

182
00:11:34,520 --> 00:11:35,760
So. 
Yep. 

183
00:11:36,880 --> 00:11:40,480
I mean, yeah, you're still 
getting the fact that it's any 

184
00:11:40,480 --> 00:11:45,000
because unfortunately like fetch
returns just any. 

185
00:11:45,040 --> 00:11:50,040
But like, if you validate these,
you will get proper type safe. 

186
00:11:50,520 --> 00:11:54,600
Yeah, end to end type save. 
So I guess we can I, I, I guess 

187
00:11:54,600 --> 00:11:58,480
we can also cheat a bit and go 
back to the to the plus page 

188
00:11:58,480 --> 00:12:00,440
that's about to retrieve the 
list. 

189
00:12:02,320 --> 00:12:06,840
Yes, this one here. 
Yep, I like it. 

190
00:12:06,880 --> 00:12:11,400
I like cheating a little bit 
just because we typed all of 

191
00:12:11,400 --> 00:12:13,800
this out of. 
OK, let's remove the set up the 

192
00:12:13,800 --> 00:12:17,320
transition for the moment so 
that we can do it later. 

193
00:12:17,560 --> 00:12:18,600
So. 
Remove. 

194
00:12:19,320 --> 00:12:21,440
All of that remove the use 
transition. 

195
00:12:22,320 --> 00:12:24,160
This is a bit of a spoiler, but 
yeah. 

196
00:12:24,640 --> 00:12:26,160
Don't go look. 
Yeah, OK, Now look. 

197
00:12:27,440 --> 00:12:29,440
Yeah, OK. 
So essentially what we're doing 

198
00:12:29,440 --> 00:12:32,200
here is we're looping through 
the data that we get back from 

199
00:12:32,200 --> 00:12:35,240
that Pokémon API, and we're just
gonna stick it out in a a 

200
00:12:35,600 --> 00:12:39,600
unordered list and have it 
clickable at that point, right? 

201
00:12:39,720 --> 00:12:44,240
Yep. 
So if we go back to our 5174, 

202
00:12:44,240 --> 00:12:45,920
sure enough. 
Yes. 

203
00:12:46,320 --> 00:12:48,880
We have Pokémon. 
Yeah, fucking wrong. 

204
00:12:50,560 --> 00:12:53,800
And I mean, one of the things 
that we did last time was 

205
00:12:53,800 --> 00:13:00,800
basically create a detail page 
where we can basically like show

206
00:13:00,920 --> 00:13:03,360
the title and stuff like that. 
Yeah. 

207
00:13:03,360 --> 00:13:07,000
So let's I think just a new 
route folder. 

208
00:13:08,040 --> 00:13:11,640
Yes, we can create the ID for 
example. 

209
00:13:12,480 --> 00:13:21,080
Perfect and plus page that's 
well there yeah and probably we 

210
00:13:21,080 --> 00:13:26,240
want to I I guess we we still 
want a plus page dot server dot 

211
00:13:26,280 --> 00:13:30,600
JS dot yes. 
So that like we can load the the

212
00:13:30,720 --> 00:13:35,600
data for that specific Pokémon, 
which should be something like 

213
00:13:35,600 --> 00:13:41,800
Pok api.com API Video V2. 
And I don't know I'm I'm gonna 

214
00:13:42,120 --> 00:13:44,200
in the meantime, I'm gonna take 
a look at. 

215
00:13:44,760 --> 00:13:47,280
I can I can choose too. 
It's it's. 

216
00:13:47,280 --> 00:13:47,920
Fine. 
Yeah, we can. 

217
00:13:48,480 --> 00:13:52,560
We can keep, we can keep being 
actually it doesn't look like we

218
00:13:52,560 --> 00:13:58,080
used another one. 
So we had our yeah, just our 

219
00:13:58,080 --> 00:14:00,320
layout and our page and that was
it. 

220
00:14:06,080 --> 00:14:08,520
So I don't. 
I think we must have passed just

221
00:14:08,520 --> 00:14:11,120
the name and that was it. 
But we can. 

222
00:14:11,200 --> 00:14:15,200
I guess, I mean we can, yeah, we
can do a a like given that we 

223
00:14:15,200 --> 00:14:19,280
have a bit more time now we can,
we can have a full, we can make 

224
00:14:19,280 --> 00:14:22,080
a fully fledged application. 
That's right. 

225
00:14:23,400 --> 00:14:28,720
So let's see, instead of just 
this, let's take a peek out here

226
00:14:29,760 --> 00:14:33,720
I. 
Think we can do slash, V2 slash,

227
00:14:33,720 --> 00:14:37,120
Pokémon slash the name of the 
Pokémon or the ID of the 

228
00:14:37,120 --> 00:14:40,720
Pokémon? 
We'll have to get that in and so

229
00:14:40,760 --> 00:14:44,400
instead of just fetch, we'll 
also need param. 

230
00:14:44,560 --> 00:14:47,360
Is it? 
Yes param and then you can get 

231
00:14:47,640 --> 00:14:56,120
ID from that. 
Fine. 

232
00:14:56,400 --> 00:14:59,800
Change this to a string 
template. 

233
00:15:02,320 --> 00:15:06,760
Cool. 
See, now we should be getting 

234
00:15:06,760 --> 00:15:11,200
back whenever this gets back, so
we have abilities and wow, all 

235
00:15:11,200 --> 00:15:13,200
kinds of stuff that comes back. 
That's great. 

236
00:15:14,400 --> 00:15:18,640
I mean, we probably want 
something like I remember seeing

237
00:15:18,640 --> 00:15:25,520
something like the the obviously
we want the name, but we 

238
00:15:25,520 --> 00:15:29,320
probably like, I think there's 
yeah, there's price, which is 

239
00:15:29,480 --> 00:15:36,400
also cool to get. 
So we can do Jason dot stringify

240
00:15:36,560 --> 00:15:40,080
data all. 
Right, let's see if I click on 

241
00:15:40,080 --> 00:15:41,880
Bulbasaur now. 
Boom. 

242
00:15:42,240 --> 00:15:44,760
Look at all that Jason 
beautifulness. 

243
00:15:46,880 --> 00:15:50,880
So I think you can get something
like sprites back default. 

244
00:15:51,040 --> 00:15:57,480
I mean maybe front default to to
get a URL with a Sprite. 

245
00:15:59,000 --> 00:15:59,360
See. 
Look. 

246
00:15:59,360 --> 00:16:02,160
Where the heck's that thing at? 
So that's on the the root of it.

247
00:16:02,880 --> 00:16:05,000
Yep, here. 
We'll we'll take this in and 

248
00:16:05,000 --> 00:16:14,720
make it look a little nicer. 
The new page, Oh, it picked up 

249
00:16:14,720 --> 00:16:23,240
as JavaScript instead of Jason. 
Oops, what am I doing? 

250
00:16:23,240 --> 00:16:30,920
And. 
Let me see if we actually get 

251
00:16:32,840 --> 00:16:39,360
would be cool to have. 
It's so weird. 

252
00:16:39,360 --> 00:16:44,720
I don't know if it keeps 
sticking me at the end that 

253
00:16:44,800 --> 00:16:49,520
let's do a format real quick. 
There we go. 

254
00:16:50,840 --> 00:16:52,840
That's probably why I was 
unhappy. 

255
00:16:54,040 --> 00:16:57,640
But here's our our full Jason. 
I'll shrink that down a little 

256
00:16:57,640 --> 00:17:04,720
bit. 
OK, so we should be able to get 

257
00:17:04,720 --> 00:17:09,839
something like so Pokémon we. 
Got moves? 

258
00:17:09,839 --> 00:17:14,160
We got all these. 
Sprites, so it should be Pokémon

259
00:17:14,160 --> 00:17:22,200
dot Sprite dot. 
All right, so back in our ID 

260
00:17:22,200 --> 00:17:28,920
page, if if we want to do it 
here, we can do that Pokémon dot

261
00:17:29,040 --> 00:17:34,000
sprites and if we want, I don't 
know if this is the best way to 

262
00:17:34,000 --> 00:17:40,440
do this or not, we could do let 
sprites equal that I think. 

263
00:17:41,080 --> 00:17:44,280
Mm hmm, yeah, I think you need a
reactive label. 

264
00:17:44,320 --> 00:17:49,440
Here it goes. 
So it's just, it's just this. 

265
00:17:49,480 --> 00:17:52,480
Dollar sign Dollar sign colon. 
Colon. 

266
00:17:52,600 --> 00:17:57,800
That's right, I just forget. 
OK, so now we could just put in 

267
00:17:57,800 --> 00:18:00,320
a string of ice still but 
sprites. 

268
00:18:04,040 --> 00:18:05,960
I think you still need no? 
Maybe. 

269
00:18:06,200 --> 00:18:08,800
Yeah, I think we're. 
I think we're good. 

270
00:18:09,640 --> 00:18:13,800
Yep. 
OK, so this is an array and no 

271
00:18:13,800 --> 00:18:18,840
it's not an array, sorry. 
It's an object we'd I think the 

272
00:18:19,240 --> 00:18:22,480
the one of the decent one is 
front default. 

273
00:18:22,960 --> 00:18:28,000
OK. 
And then that's that's gonna be 

274
00:18:28,000 --> 00:18:30,920
a SVG. 
Do we want to do like show these

275
00:18:30,920 --> 00:18:32,960
off? 
Yeah, probably. 

276
00:18:34,360 --> 00:18:37,080
It looks like there's more than 
one front. 

277
00:18:37,080 --> 00:18:40,040
There's also a home. 
Yeah, because like they are 

278
00:18:40,040 --> 00:18:45,960
separated by like name game if 
you want, but I think there is a

279
00:18:46,120 --> 00:18:49,320
general one which should be from
default and should be like the 

280
00:18:49,400 --> 00:18:53,040
OG one. 
So this is this is like the that

281
00:18:53,040 --> 00:18:56,640
one. 
Yeah, that's the newest one, but

282
00:18:56,640 --> 00:19:02,120
if you do just from default it 
should be the the the the OG 

283
00:19:02,120 --> 00:19:04,840
one. 
Sprites front. 

284
00:19:05,000 --> 00:19:08,880
I think that's it. 
Yep, so. 

285
00:19:08,960 --> 00:19:13,040
This we can do this as a image I
guess. 

286
00:19:13,480 --> 00:19:18,720
Yeah, it should be image source.
It's equal to. 

287
00:19:20,080 --> 00:19:26,080
He deleted everything. 
And then that and that, that. 

288
00:19:29,440 --> 00:19:33,840
I think now so that will yell at
you because it needs an alt 

289
00:19:34,840 --> 00:19:37,520
which could be just the pop on 
name do. 

290
00:19:40,400 --> 00:19:46,520
This again and do data dot, 
Pokémon dot what was it? 

291
00:19:46,960 --> 00:19:50,880
Is there a name? 
Height moves. 

292
00:19:51,680 --> 00:19:53,440
Yeah, just name. 
Name. 

293
00:19:53,480 --> 00:19:54,520
Is it just name? 
OK. 

294
00:19:55,800 --> 00:20:00,560
Ah, yeah. 
So let's see if it works. 

295
00:20:01,800 --> 00:20:04,640
Look at that little Sprite. 
Yes. 

296
00:20:06,000 --> 00:20:09,400
OK. 
So one thing that we can do, we 

297
00:20:09,400 --> 00:20:14,400
can also show the the name maybe
just so that yeah, I have 

298
00:20:14,400 --> 00:20:20,520
multiple things here. 
It'll do like AH1. 

299
00:20:24,520 --> 00:20:32,760
Yep, all bizarre. 
And now I think one very neat 

300
00:20:32,760 --> 00:20:39,600
thing would be to like if we go 
back to the to the list, I 

301
00:20:39,600 --> 00:20:43,240
didn't think there is a way to 
also get this price directly. 

302
00:20:43,240 --> 00:20:46,600
So I think we should actually 
fetch each one of those 

303
00:20:48,480 --> 00:20:52,240
separately to get this the the 
images because it would be cool 

304
00:20:52,240 --> 00:20:55,680
to have like images and name and
then you click on it and it goes

305
00:20:55,680 --> 00:20:59,640
to the detail page. 
OK, so do you want to do all of 

306
00:20:59,640 --> 00:21:02,920
this fetch here as well at the 
same time? 

307
00:21:03,960 --> 00:21:08,880
Like yes, I think I think what 
you should do like we either 

308
00:21:09,040 --> 00:21:15,840
loop over like because we know 
that the the idea are 1/2 150 or

309
00:21:15,840 --> 00:21:19,800
we can get the response and by 
that response you will be able 

310
00:21:19,800 --> 00:21:24,800
to get the the the the URL for 
every. 

311
00:21:24,800 --> 00:21:27,040
So if you try to open these in 
the browser, literally. 

312
00:21:28,080 --> 00:21:30,480
Yeah, let's do, let's do this. 
It'll be cool. 

313
00:21:31,640 --> 00:21:34,720
So we'll take the list and then 
we'll do a a for loop. 

314
00:21:35,720 --> 00:21:39,120
I'm terrible at like promises of
promises, but there's like a 

315
00:21:39,120 --> 00:21:43,400
part all version of this, right?
Yeah, I mean what you can do is 

316
00:21:43,400 --> 00:21:48,960
literally just create the fetch 
for every number basically. 

317
00:21:48,960 --> 00:21:53,560
And then like you put everything
inside an array and then you do 

318
00:21:53,560 --> 00:21:56,160
await promise dot all and. 
It works. 

319
00:21:56,360 --> 00:21:58,000
It should work. 
Talk me through it. 

320
00:21:58,000 --> 00:22:01,520
Talk me through it. 
OK so the Pokémon list should 

321
00:22:01,520 --> 00:22:04,880
basically return you an object 
weed. 

322
00:22:06,160 --> 00:22:09,720
So what's the exact thing that 
you are searching? 

323
00:22:10,360 --> 00:22:14,640
Limit 10, right? 
Yep, so we should get 10 Pokémon

324
00:22:14,640 --> 00:22:18,360
back? 
OK, So what you get is basically

325
00:22:19,920 --> 00:22:23,360
an object that has a results in 
it. 

326
00:22:24,160 --> 00:22:27,400
OK. 
So you should basically loop 

327
00:22:27,400 --> 00:22:33,160
over these results so you can do
four construction result of 

328
00:22:34,320 --> 00:22:42,200
Pokémon list dot results. 
You wanna do a for each or 

329
00:22:42,200 --> 00:22:46,080
there's a map? 
OK, if you yeah, you can do a 

330
00:22:46,080 --> 00:22:48,680
map at this. 
Point let's do, let's do open my

331
00:22:48,680 --> 00:22:55,520
list map. 
Result and then you can return. 

332
00:22:59,000 --> 00:23:06,920
Instead of returning result, you
can return a fetch to pock API. 

333
00:23:07,360 --> 00:23:10,760
Sorry, you know you need to 
return you you can return to 

334
00:23:12,000 --> 00:23:14,880
result dot URL. 
It's easier because you don't 

335
00:23:14,880 --> 00:23:18,440
have to. 
So this result will contain a a 

336
00:23:18,680 --> 00:23:21,240
URL. 
Now you need to get the result 

337
00:23:21,240 --> 00:23:25,960
as a parameter and fetch is 
toward result dot URL and. 

338
00:23:27,640 --> 00:23:29,960
Then. 
You can remove the the the base 

339
00:23:29,960 --> 00:23:32,840
basically because the URL will 
already contain. 

340
00:23:33,080 --> 00:23:34,640
Oh. 
The the. 

341
00:23:36,560 --> 00:23:39,640
Results dot URL. 
Yes, something. 

342
00:23:39,760 --> 00:23:44,240
Like that, OK. 
Yeah, this isn't implicit any I 

343
00:23:45,560 --> 00:23:50,520
can just. 
Go so it does yell at us all the

344
00:23:50,520 --> 00:24:00,840
time. 
Interesting this We could also 

345
00:24:00,840 --> 00:24:03,520
just say it's got oh. 
No, because this it's not. 

346
00:24:04,320 --> 00:24:06,520
You don't need to, sorry. 
You don't need. 

347
00:24:06,960 --> 00:24:08,600
To the yeah, exactly. 
Sorry. 

348
00:24:08,960 --> 00:24:10,840
Thank you. 
It's fine. 

349
00:24:12,440 --> 00:24:16,560
OK, so this will basically give 
you an array of promises. 

350
00:24:17,040 --> 00:24:18,960
So if you store it in a 
variable. 

351
00:24:21,640 --> 00:24:24,680
Can we just do the promise all 
and finish it up? 

352
00:24:25,120 --> 00:24:28,040
OK, Yeah, you can do await 
promise all. 

353
00:24:30,640 --> 00:24:34,280
And actually probably, I mean, I
mean we can do promise all 

354
00:24:34,280 --> 00:24:37,800
because in theory like the best 
practice should be promised all 

355
00:24:37,800 --> 00:24:43,240
settled because if one of these 
fetch fails every, every, the 

356
00:24:43,240 --> 00:24:44,640
whole promise that all will 
fail. 

357
00:24:44,920 --> 00:24:48,960
But it's fine in this case. 
So you can do await. 

358
00:24:54,680 --> 00:24:58,640
Something like that. 
Yeah, and this will this should 

359
00:24:58,640 --> 00:25:04,320
give you a big old Jason, 
because it will contain every 

360
00:25:04,320 --> 00:25:09,000
Pokémon. 
So all right, let's see what 

361
00:25:10,920 --> 00:25:14,680
what we got. 
So there's a 500. 

362
00:25:14,920 --> 00:25:18,720
Awesome. 
Let's see what the fiber is. 

363
00:25:18,720 --> 00:25:24,680
It's not a function. 
It's Jason at that point, right?

364
00:25:25,040 --> 00:25:27,280
Gotta wait. 
I. 

365
00:25:27,320 --> 00:25:31,600
Oh, because yes, you need to do 
Pokémon list dot result dot 

366
00:25:31,680 --> 00:25:38,040
results dot. 
Thank you like that. 

367
00:25:38,560 --> 00:25:48,800
Yes, undefined is not iterable. 
That's probably coming out of 

368
00:25:48,800 --> 00:25:53,720
the front end I would guess. 
No, it should be on the server 

369
00:25:53,720 --> 00:25:58,520
because it's logged there, so 
it's not iterable. 

370
00:25:59,280 --> 00:26:02,920
Try to log Pokémon list dot 
results, because it should be 

371
00:26:07,680 --> 00:26:12,480
Pokémon List dot results and you
probably need to log it before. 

372
00:26:12,480 --> 00:26:21,200
Yeah, yeah. 
OK. 

373
00:26:21,200 --> 00:26:25,800
So. 
Is URL not a direct? 

374
00:26:27,920 --> 00:26:37,160
No, it should be direct, because
if you see, it's actually. 

375
00:26:40,760 --> 00:26:42,440
That's interesting. 
So it's all. 

376
00:26:44,360 --> 00:26:46,840
It seems like actually like it's
working. 

377
00:26:47,200 --> 00:26:55,840
I don't know why. 
Oh, you know what? 

378
00:26:56,160 --> 00:27:00,400
No, no, OK, this is from the 
plus page dot belt because we 

379
00:27:00,440 --> 00:27:04,280
need yeah, yeah, this is from 
the plus page dot belt. 

380
00:27:04,280 --> 00:27:07,640
You're still getting error there
because you're doing Pokémon 

381
00:27:07,680 --> 00:27:12,600
data dot Pokémon dot results and
instead here you have the whole 

382
00:27:12,600 --> 00:27:15,640
Pokémon. 
So Pokémon is already an array 

383
00:27:15,640 --> 00:27:21,880
is not inside the results. 
So OK, and now we should 

384
00:27:21,880 --> 00:27:25,840
probably like we will probably 
still get some error because 

385
00:27:26,680 --> 00:27:33,760
there's no Pokémon name, non? 
Pogos looks like there's some 

386
00:27:34,320 --> 00:27:36,200
some crazy data we might have to
make our own. 

387
00:27:36,960 --> 00:27:41,480
Let me see the plus page dot dot
plus page dot server dot yes, 

388
00:27:41,480 --> 00:27:46,960
because it's probably oh, you 
know what? 

389
00:27:47,360 --> 00:27:49,600
You do, Jason still. 
Yeah, exactly. 

390
00:27:49,600 --> 00:27:52,280
You need to dot Jason. 
So in theory you can do. 

391
00:27:52,280 --> 00:27:58,760
You can do it in line. 
You can do fetch dot den right 

392
00:27:58,760 --> 00:28:01,240
after the fetch. 
Oh, sorry, yeah. 

393
00:28:01,560 --> 00:28:06,880
Dot den and then you get the 
response and then you return 

394
00:28:06,880 --> 00:28:14,240
response dot Jason. 
This should fix it. 

395
00:28:14,840 --> 00:28:16,880
Looking a lot better already. 
Yeah. 

396
00:28:17,880 --> 00:28:19,800
All right, we got some. 
OK. 

397
00:28:20,240 --> 00:28:22,960
That's what I I meant to console
log. 

398
00:28:24,240 --> 00:28:27,800
Yeah, not here, sorry. 
That's why I I'm going to put 

399
00:28:27,800 --> 00:28:31,040
that so people could see kind of
all of the data coming out. 

400
00:28:32,760 --> 00:28:35,680
It should be a lot to. 
Do this. 

401
00:28:39,720 --> 00:28:44,840
Now we see an array over here, 
so I don't know how hard this is

402
00:28:44,840 --> 00:28:47,240
to see but. 
We can zoom in. 

403
00:28:47,800 --> 00:28:50,440
Here is what we're actually 
getting instead of just that 

404
00:28:50,440 --> 00:28:52,440
base Pokémon now. 
Yep. 

405
00:28:53,040 --> 00:28:57,320
We have all of this stuff. 
We still have the name and we 

406
00:28:57,400 --> 00:29:00,560
also have this price here so we 
can do the same thing that we 

407
00:29:00,560 --> 00:29:04,480
were doing before. 
So we can like show the image of

408
00:29:05,120 --> 00:29:14,080
Pokémon dot Sprite dot. 
So each Li I guess we could we 

409
00:29:14,080 --> 00:29:17,360
have we have the name, maybe we 
just put the image I guess. 

410
00:29:17,720 --> 00:29:22,680
Yep. 
And this needs to be Pokémon. 

411
00:29:23,600 --> 00:29:26,880
Dot sprites, yeah, be safe. 
About it, it's. 

412
00:29:30,640 --> 00:29:34,360
Probably Pokémon dot Name. 
Yeah, probably. 

413
00:29:34,360 --> 00:29:37,720
You still want these? 
I don't know. 

414
00:29:38,360 --> 00:29:42,040
No, it's fine. 
OK. 

415
00:29:43,440 --> 00:29:50,920
So now we can go to the juicy 
part because I think, yeah, you 

416
00:29:51,520 --> 00:29:53,440
don't save perfect. 
Perfect. 

417
00:29:54,760 --> 00:29:58,040
Now, currently, like the, the 
transition between the two pages

418
00:29:58,040 --> 00:30:03,040
is pretty boring because you 
just remove from one end and add

419
00:30:03,040 --> 00:30:05,440
it to the other. 
So we can change that. 

420
00:30:05,960 --> 00:30:09,480
And yeah, we can change that. 
That's what it looks like right 

421
00:30:09,480 --> 00:30:12,000
now, folks. 
OK. 

422
00:30:12,760 --> 00:30:18,680
And we can we can go like if you
install my library which is belt

423
00:30:18,680 --> 00:30:28,360
key to view transition let's. 
Do PMPM install SPL kit? 

424
00:30:29,160 --> 00:30:32,280
Is it all one? 
No, it's dash view, dash 

425
00:30:32,280 --> 00:30:37,160
transition. 
Perfect. 

426
00:30:37,920 --> 00:30:43,280
Now if you go to the plus page 
that's belt and you you can 

427
00:30:43,280 --> 00:30:47,600
import, set up the transition 
inside the Yeah, exactly. 

428
00:30:48,280 --> 00:30:52,040
You can import set up the 
transition from the transition. 

429
00:30:53,800 --> 00:30:57,400
Just to be clear and like let 
everyone know, this is Paulo's 

430
00:30:59,400 --> 00:31:01,320
library. 
This isn't like part of 

431
00:31:01,320 --> 00:31:03,720
Sveltkit, so you'll have to like
install it separately. 

432
00:31:03,920 --> 00:31:08,000
Do we want to do it before with 
like how you should do it in 

433
00:31:08,000 --> 00:31:13,560
Sveltkit to demonstrate how you 
will do something like this? 

434
00:31:14,680 --> 00:31:17,920
Say that again, Sir. 
If you want to do it before 

435
00:31:18,800 --> 00:31:21,920
doing, doing it with my library.
If you want to do it, does 

436
00:31:21,920 --> 00:31:24,160
Sveltkit weigh just to show 
basically Oh. 

437
00:31:24,720 --> 00:31:28,000
Yeah, how you will do it, if 
that makes sense? 

438
00:31:28,080 --> 00:31:29,080
Yeah, sure. 
OK. 

439
00:31:29,240 --> 00:31:33,880
We can do it, yes. 
So OK to do it in in in Velt 

440
00:31:33,880 --> 00:31:35,800
kit. 
Basically you need to import on 

441
00:31:35,800 --> 00:31:46,480
navigate OK and that comes from 
dollar sign. 

442
00:31:46,600 --> 00:31:56,240
No, I guess it's at Velt JS 
slash kit and I it should be 

443
00:31:56,240 --> 00:31:59,600
with capital N. 
Could be like that, right? 

444
00:31:59,880 --> 00:32:04,800
That's the type. 
Oh, right on navigate. 

445
00:32:05,240 --> 00:32:09,720
OK, I think it's not from here, 
but it's from dollar sign up 

446
00:32:09,720 --> 00:32:13,120
slash navigation. 
OK, that makes sense. 

447
00:32:17,840 --> 00:32:21,520
There we go. 
Now this is basically a callback

448
00:32:21,600 --> 00:32:28,560
that will run right before the 
right before the the page 

449
00:32:28,560 --> 00:32:32,200
transition right? 
So if you do it with before 

450
00:32:32,200 --> 00:32:35,160
navigate, it will run before the
load function. 

451
00:32:35,480 --> 00:32:39,960
With this on navigate it will 
run immediately before the page 

452
00:32:39,960 --> 00:32:43,440
is about to transition. 
So if you call on navigate 

453
00:32:43,920 --> 00:32:49,160
inside the script tag you can 
register the callback and this 

454
00:32:49,160 --> 00:32:51,960
will take a function that it's 
the callback that you are 

455
00:32:52,320 --> 00:32:57,680
returning. 
Now this is where it gets a bit 

456
00:32:57,680 --> 00:33:02,280
complicated because basically 
from these on navigate you have 

457
00:33:02,280 --> 00:33:09,640
to return a new promise. 
Just any new promise. 

458
00:33:10,800 --> 00:33:16,920
You need to return this OK. 
And by returning this new 

459
00:33:16,920 --> 00:33:21,200
promise, you're basically 
telling Veltkit to wait to move 

460
00:33:21,200 --> 00:33:24,520
to the new page until this 
promise resolve. 

461
00:33:25,640 --> 00:33:28,480
So to resolve this promise, 
obviously you need to retrieve 

462
00:33:28,480 --> 00:33:30,240
the resolve function from the 
promise. 

463
00:33:30,480 --> 00:33:36,960
So you need to pass a function 
to the promise and this function

464
00:33:36,960 --> 00:33:42,320
will take a a a resolve function
that you can call to resolve the

465
00:33:42,320 --> 00:33:45,480
whole function. 
It will take this resolve as a 

466
00:33:45,560 --> 00:33:55,680
as an argument. 
So yeah, exactly so and now when

467
00:33:55,680 --> 00:34:01,520
you need to resolve this 
function, basically inside this 

468
00:34:01,520 --> 00:34:04,840
new promise you need to start 
the real transition. 

469
00:34:04,840 --> 00:34:07,480
So you can do document dot start
with transition. 

470
00:34:10,199 --> 00:34:12,719
This is document like just the 
window. 

471
00:34:12,920 --> 00:34:16,159
The the window document because 
start the view transition API is

472
00:34:16,159 --> 00:34:21,040
actually a a Dom API, so you can
do start view transition and 

473
00:34:21,040 --> 00:34:26,199
this has no typing unfortunately
because it's not official yet. 

474
00:34:26,199 --> 00:34:37,280
So start view transition with 
capital V and capital T and this

475
00:34:37,280 --> 00:34:41,000
basically it's a function that 
takes a function as input. 

476
00:34:42,800 --> 00:34:45,159
Welcome to JavaScript functions 
of functions folks. 

477
00:34:46,840 --> 00:34:50,239
OK, so basically what you're 
telling here is the browser. 

478
00:34:50,239 --> 00:34:53,040
You're telling the browser, hey,
I want you to take a screenshot 

479
00:34:53,040 --> 00:34:57,240
of the current page. 
And then I think you need an at 

480
00:34:57,240 --> 00:34:58,800
before. 
Yes, ignore. 

481
00:35:00,000 --> 00:35:05,440
Thank you. 
You're telling JavaScript I want

482
00:35:05,440 --> 00:35:10,000
to take you the screenshot of 
the page and once you are inside

483
00:35:10,000 --> 00:35:15,520
the view transition, you can 
actually let TypeScript let's 

484
00:35:15,520 --> 00:35:19,200
know that the view transition 
has started so you can call 

485
00:35:19,200 --> 00:35:27,240
resolve and now you have to wait
for Zelkit to finish the 

486
00:35:27,240 --> 00:35:30,720
navigation. 
So to do that on navigate takes 

487
00:35:30,720 --> 00:35:35,920
a props as input. 
So take a parameter as input 

488
00:35:36,160 --> 00:35:38,200
which is prop props I don't 
know. 

489
00:35:40,480 --> 00:35:45,240
And you can then inside the 
start to be transition do await.

490
00:35:46,040 --> 00:35:47,840
Are we doing that before the 
resolve? 

491
00:35:48,320 --> 00:35:49,880
After the resolve. 
After OK. 

492
00:35:51,920 --> 00:35:57,280
Await props dot and should have 
complete and this is not a 

493
00:35:57,280 --> 00:35:59,600
function. 
This is literally a promise that

494
00:35:59,600 --> 00:36:03,360
will resolve when JavaScript 
when TypeScript sorry, when's 

495
00:36:03,360 --> 00:36:05,720
Beltkit completed the 
navigation. 

496
00:36:07,360 --> 00:36:11,120
So by doing so, basically what 
you are doing is you're telling 

497
00:36:11,120 --> 00:36:15,920
Beltkit, hey, when you are 
navigating before actually like 

498
00:36:15,920 --> 00:36:22,320
do the the navigation, wait, 
then you start the transition, 

499
00:36:22,680 --> 00:36:25,760
then you resolve the view 
transition like the the the 

500
00:36:25,760 --> 00:36:27,920
promise. 
And this tells Beltkit, OK now 

501
00:36:27,920 --> 00:36:32,440
go ahead and navigate and then 
when the props dot complete 

502
00:36:32,440 --> 00:36:37,160
resolve is that telling you OK 
I've finished navigating and 

503
00:36:37,160 --> 00:36:41,200
then you are completing the 
start of your transition call so

504
00:36:41,200 --> 00:36:43,800
that the browser can do the the 
fade between the two. 

505
00:36:44,240 --> 00:36:47,440
So. 
By doing this in theory, now if 

506
00:36:47,440 --> 00:36:51,560
we try to navigate, we should 
see a fadeaway and a fading. 

507
00:36:51,680 --> 00:36:54,120
So if you say. 
Tweet like is there a way to 

508
00:36:54,520 --> 00:36:58,560
exaggerate the time on this? 
You can do it with with CSS. 

509
00:36:58,560 --> 00:37:06,280
So if you create a style tag 
here, you can do colon root 

510
00:37:08,680 --> 00:37:16,360
dash, dash, sorry, colon colon 
everyone view transition new 

511
00:37:18,640 --> 00:37:23,440
yeah. 
And parent like parenthesis 

512
00:37:24,640 --> 00:37:27,960
inside view transition new new. 
And you need to pass parentheses

513
00:37:27,960 --> 00:37:32,560
root, OK. 
And you also need to do not 

514
00:37:32,560 --> 00:37:35,920
without the column, just root, 
because this is the root view 

515
00:37:35,920 --> 00:37:37,040
transition. 
So bad at CSS. 

516
00:37:37,400 --> 00:37:38,880
Thank you. 
Yeah, no, don't worry. 

517
00:37:39,720 --> 00:37:45,760
And you also need to do view 
transition old root so that we 

518
00:37:45,760 --> 00:37:50,040
can apply the same at both the 
old image and the new image. 

519
00:37:50,040 --> 00:37:55,400
And you need a comma between the
two and then you can open the 

520
00:37:55,920 --> 00:38:01,400
the square bracket and then you 
can do animation, animation 

521
00:38:02,920 --> 00:38:10,040
direction and you can tell 
something like 5 seconds. 

522
00:38:13,800 --> 00:38:17,200
You can. 
You either need to write 5S or 

523
00:38:17,200 --> 00:38:20,680
500 Ms. Nice. 
OK, that's cool. 

524
00:38:22,000 --> 00:38:26,800
OK, so this should work. 
So if we try to navigate now, 

525
00:38:27,720 --> 00:38:31,520
you should see a very slow 
transition between one page and 

526
00:38:31,520 --> 00:38:34,360
the other. 
Now the problem is like if you 

527
00:38:34,360 --> 00:38:38,440
try to click back it happens 
immediately. 

528
00:38:39,640 --> 00:38:42,920
And the reason why it happens is
immediately is because like to 

529
00:38:43,080 --> 00:38:46,640
actually do this you should do 
the same on the other page. 

530
00:38:46,640 --> 00:38:49,640
Like you should create the same 
on navigate and stuff like that.

531
00:38:49,920 --> 00:38:54,960
You can create this in our 
layout for example and like do 

532
00:38:56,000 --> 00:38:59,360
do the same. 
But I mean this kind of get 

533
00:38:59,480 --> 00:39:03,800
complicated fast because then 
usually what you have to do 

534
00:39:03,800 --> 00:39:07,920
inside the transition API is 
also like for example adding 

535
00:39:07,960 --> 00:39:12,240
class before navigating and do 
stuff like that. 

536
00:39:12,240 --> 00:39:18,040
So it can get complicated with 
this kind of stuff and you have 

537
00:39:18,040 --> 00:39:21,920
to remember the whole like 
process of new promise start 

538
00:39:21,960 --> 00:39:23,320
with transition and stuff like 
that. 

539
00:39:24,400 --> 00:39:26,240
Don't forget any awaits or 
anything else. 

540
00:39:26,280 --> 00:39:29,320
Holy smoke. 
And that's what my library tries

541
00:39:29,320 --> 00:39:33,160
to like abstract away. 
So. 

542
00:39:33,600 --> 00:39:37,960
So with my library, what with my
library, what you can do is you 

543
00:39:37,960 --> 00:39:41,120
can. 
OK, all right. 

544
00:39:41,120 --> 00:39:45,280
I was just gonna, before I lose 
everything we did, just at least

545
00:39:45,280 --> 00:39:49,680
put a little commit and then 
maybe create a new branch like 

546
00:39:49,680 --> 00:39:57,160
with library or something. 
God, I can't type. 

547
00:39:57,920 --> 00:40:04,120
I'll get view transition, change
it out OK. 

548
00:40:04,600 --> 00:40:09,440
OK with my library what you can 
do is remove all this code and 

549
00:40:09,480 --> 00:40:22,160
remove the import and you can do
import setup the transition from

550
00:40:24,280 --> 00:40:31,520
Zvaldkit view transition and I 
think you need commas. 

551
00:40:35,800 --> 00:40:39,480
I'll say I've said it a million 
times, I'll say it again, that 

552
00:40:39,720 --> 00:40:42,600
whoever decided we should put 
the thing you're getting and 

553
00:40:42,600 --> 00:40:44,560
then where are you getting it 
from last? 

554
00:40:44,680 --> 00:40:46,200
I agree. 
I agree. 

555
00:40:46,520 --> 00:40:50,040
I think if you are using the 
import snippet from VS Code it 

556
00:40:50,040 --> 00:40:53,040
actually help you. 
Like if you do import and then 

557
00:40:53,040 --> 00:40:55,880
you do tab it will move the 
cursor. 

558
00:40:55,960 --> 00:40:58,960
Yeah, import statement. 
It will move the cursor first 

559
00:40:58,960 --> 00:41:01,000
to. 
The as a language. 

560
00:41:01,560 --> 00:41:02,600
Yeah, I agree. 
I. 

561
00:41:03,120 --> 00:41:05,640
Agree like twice and been like 
huh we should move that. 

562
00:41:07,800 --> 00:41:11,960
I mean I think it this was told 
before TypeScript was a thing, 

563
00:41:11,960 --> 00:41:14,440
so it was not really helpful do 
it in the other. 

564
00:41:14,440 --> 00:41:18,320
Well, there's other languages 
that do that correctly so 

565
00:41:18,920 --> 00:41:21,920
anyways. 
Yeah, I agree. 

566
00:41:22,600 --> 00:41:26,440
And now if you call, set up the 
transition inside your script 

567
00:41:26,440 --> 00:41:28,640
tag. 
That's it. 

568
00:41:29,160 --> 00:41:31,240
That's the only thing that you 
need to do. 

569
00:41:31,640 --> 00:41:35,280
It's a function, that's it. 
That's the only thing that you 

570
00:41:35,280 --> 00:41:37,360
need to do to to get the same 
result. 

571
00:41:37,600 --> 00:41:40,680
You're kidding if you. 
Yeah, if you go back, you will 

572
00:41:40,680 --> 00:41:46,040
still see the slow transition. 
So you still need to do in the 

573
00:41:46,040 --> 00:41:49,320
other page if you want to have 
the transition when you navigate

574
00:41:49,320 --> 00:41:52,800
back. 
But obviously like this will 

575
00:41:52,800 --> 00:41:55,560
also come with other goodies 
that we can explore now. 

576
00:41:56,240 --> 00:42:01,240
And the reason is because like 
what you need to do like OK, in 

577
00:42:01,240 --> 00:42:06,920
this very moment, what the 
browser is doing is the moment 

578
00:42:06,920 --> 00:42:11,320
you navigate and you call start 
the transition, the browser will

579
00:42:11,320 --> 00:42:14,320
take a screenshot of the current
page, the whole current page, 

580
00:42:15,000 --> 00:42:23,360
and then it will change the Dom 
behind that screenshot and it 

581
00:42:23,360 --> 00:42:27,040
will then slowly morph one 
between the other, right? 

582
00:42:27,560 --> 00:42:30,560
And I think we we showed this 
off a little better last time. 

583
00:42:31,040 --> 00:42:34,960
You can if you open the 
animation tab, which I think 

584
00:42:34,960 --> 00:42:37,880
it's under the three, the the 
vertical dots. 

585
00:42:38,400 --> 00:42:41,200
This one, yeah, vertical. 
More tools. 

586
00:42:43,680 --> 00:42:46,760
More tools, animation. 
Thank you, I can never find that

587
00:42:46,760 --> 00:42:49,360
thing. 
Yeah, basically if you want, and

588
00:42:49,360 --> 00:42:53,360
this is like if you want to 
debug the transition API, that's

589
00:42:53,360 --> 00:42:57,480
how you can do it. 
If you pause the animations and 

590
00:42:57,480 --> 00:43:01,760
then you try to navigate, you 
can see that a new entry is 

591
00:43:01,760 --> 00:43:04,000
created, but the page did not 
change. 

592
00:43:04,120 --> 00:43:08,560
And if you click on that entry, 
you can slowly move between the 

593
00:43:08,560 --> 00:43:11,760
two and like see what's 
happening. 

594
00:43:12,160 --> 00:43:16,400
And rather interesting factor is
that you can literally see how 

595
00:43:16,520 --> 00:43:20,400
everything works in the Dome. 
So if you go to the Elements 

596
00:43:20,400 --> 00:43:29,240
tab, there will be now the view 
transition like right before, 

597
00:43:29,560 --> 00:43:34,160
right after the HTML there is 
the column column view 

598
00:43:34,160 --> 00:43:39,520
transition that you can expand 
right before the HTML, the HTML 

599
00:43:39,520 --> 00:43:43,160
tag, oh right before it, sorry, 
right after. 

600
00:43:43,280 --> 00:43:46,200
OK, I got you. 
Basically this column column 

601
00:43:46,200 --> 00:43:51,320
view transition is literally 
images of the Dome that the 

602
00:43:51,320 --> 00:43:53,320
browser has took a screenshot 
of. 

603
00:43:53,760 --> 00:43:58,600
So basically if you click on one
of those like in in in this 

604
00:43:58,600 --> 00:44:04,200
cases they you can see that the 
whole page lights up blue. 

605
00:44:04,720 --> 00:44:08,280
And that's because what you are 
what we are telling to the 

606
00:44:08,280 --> 00:44:14,600
browser is I want the whole page
to be able to be take into 

607
00:44:14,600 --> 00:44:17,520
account. 
And so it's transitioning 

608
00:44:17,520 --> 00:44:21,280
between the old and the new and 
you can treat those literally as

609
00:44:21,280 --> 00:44:24,240
images inside the your your 
Dome. 

610
00:44:24,240 --> 00:44:26,720
So you can style them literally 
as images. 

611
00:44:27,120 --> 00:44:31,440
Wow that's bonanza. 
So like we put CSS in to say 

612
00:44:31,440 --> 00:44:33,920
like background red in a 
transition. 

613
00:44:34,520 --> 00:44:41,440
Yes, you can do it. 
So instead of just animation we 

614
00:44:41,440 --> 00:44:45,360
could do here. 
Yep, obviously. 

615
00:44:45,360 --> 00:44:49,360
I don't know if now you can see,
but for example, yes, you can 

616
00:44:49,680 --> 00:44:51,960
literally specify the opacity. 
You can. 

617
00:44:52,280 --> 00:44:53,920
I think you can specify the 
border. 

618
00:44:55,360 --> 00:45:04,760
To border whatever do you have 
to do color still or type? 

619
00:45:07,320 --> 00:45:10,920
I think you can do for RAM solid
black. 

620
00:45:10,920 --> 00:45:17,440
For example, you can do it as a 
as a shortcut and do it for RAM 

621
00:45:17,440 --> 00:45:20,600
solid. 
See, I I'm so used to tell when 

622
00:45:20,600 --> 00:45:23,000
I don't know how to do it so 
bad. 

623
00:45:27,160 --> 00:45:29,600
All right, so let's. 
OK, first thing first, yeah, you

624
00:45:29,600 --> 00:45:33,000
need to refresh, you need to 
unpause the the animations. 

625
00:45:33,280 --> 00:45:35,880
Now we are on the new page, so 
you need to go back. 

626
00:45:37,240 --> 00:45:41,400
Thank you. 
If you pause the animation, if 

627
00:45:41,400 --> 00:45:48,160
you try to navigate, yeah. 
Yes, the border definitely took 

628
00:45:48,160 --> 00:45:51,640
off on that thing. 
Yep, and the reason why you have

629
00:45:51,640 --> 00:45:55,160
this border is because you are 
setting the border on the image.

630
00:45:55,160 --> 00:45:59,280
So this is literally an image. 
That's so crazy to me that the 

631
00:45:59,280 --> 00:46:03,600
entire page has become an image.
That's that's just wild. 

632
00:46:04,080 --> 00:46:08,960
Yes, but obviously, like if it 
was just that, it would be 

633
00:46:08,960 --> 00:46:11,440
pretty useless. 
Like yeah, you get this fade in 

634
00:46:11,440 --> 00:46:13,760
and fade out, but it would be 
pretty useless. 

635
00:46:13,960 --> 00:46:19,040
When view transition really 
shines is when you are actually 

636
00:46:20,000 --> 00:46:25,200
taking a screenshot of one 
single thing, because what you 

637
00:46:25,200 --> 00:46:29,320
can do is literally use one 
single thing to. 

638
00:46:29,320 --> 00:46:32,320
So let's try to do something 
very, very fast. 

639
00:46:33,880 --> 00:46:36,400
What you can do is. 
Remove on time this time. 

640
00:46:36,400 --> 00:46:38,560
Probably probably remove the 
border. 

641
00:46:40,080 --> 00:46:43,000
Yeah, I think I we have 45 
minutes to play around and 

642
00:46:43,000 --> 00:46:47,400
whatever, whatever you want. 
OK, so let's do for example one 

643
00:46:47,400 --> 00:46:51,360
very simple thing on the image. 
Let's add a style. 

644
00:46:53,000 --> 00:46:54,960
On the actual image or just down
here? 

645
00:46:55,920 --> 00:47:00,200
On the actual image, OK, yeah 
you can do style and you can use

646
00:47:00,200 --> 00:47:07,000
the spelled syntax. 
So you can do style column and 

647
00:47:07,000 --> 00:47:08,840
you can use view transition 
name. 

648
00:47:09,600 --> 00:47:11,720
So style column view transition 
name. 

649
00:47:13,640 --> 00:47:19,440
Like literally view. 
Yes, view dash transition dash 

650
00:47:19,440 --> 00:47:31,120
name equal and then you have the
the the the curly braces and you

651
00:47:31,120 --> 00:47:36,480
can use Pokémon dot name. 
So what this is telling is 

652
00:47:36,480 --> 00:47:40,200
telling the browser, hey, this 
image has the view transition 

653
00:47:40,200 --> 00:47:43,600
name of Pokémon dot name. 
OK. 

654
00:47:44,480 --> 00:47:49,720
Now if you go to the other plus 
page dot belt, you can do the 

655
00:47:49,720 --> 00:47:53,400
same here. 
So you can do image, image 

656
00:47:53,520 --> 00:47:58,760
style, Yeah. 
And I think you need data dot, 

657
00:47:58,760 --> 00:48:06,240
Pokémon dot name. 
OK, Now when you navigate 

658
00:48:06,240 --> 00:48:10,800
between those two pages, you are
telling the browser that you 

659
00:48:10,800 --> 00:48:17,040
want the that you want the the 
browser to take a screenshot of 

660
00:48:17,760 --> 00:48:22,160
just Bulbasaur or just Evisaur 
or just Venusaur. 

661
00:48:22,440 --> 00:48:24,480
OK. 
And also the browser. 

662
00:48:24,480 --> 00:48:29,120
So now if you click on Boubazar 
you should see the the Sprite 

663
00:48:29,240 --> 00:48:36,280
move to its place. 
Oh wow. 

664
00:48:37,000 --> 00:48:42,360
And I mean in this case like we 
are not styling these like the 

665
00:48:42,440 --> 00:48:44,480
the duration, it's only for the 
root. 

666
00:48:45,080 --> 00:48:48,560
So the image will actually like 
it's actually pretty fast. 

667
00:48:49,080 --> 00:48:53,960
So if we remove the the 
direction there or if we add the

668
00:48:53,960 --> 00:48:56,200
duration to the image too, it's 
up to you. 

669
00:48:56,280 --> 00:49:00,200
So you can either remove the the
animation direction there. 

670
00:49:01,240 --> 00:49:03,680
Let's. 
Do this. 

671
00:49:03,680 --> 00:49:05,960
You need to style the view 
transition. 

672
00:49:05,960 --> 00:49:09,800
So you still need to add. 
So what you can do is instead of

673
00:49:10,640 --> 00:49:14,840
doing animation direction 5 
second on the image, you need to

674
00:49:14,840 --> 00:49:18,680
style the view transition new of
the Pokémon name. 

675
00:49:19,360 --> 00:49:25,400
So is it up here then? 
No, you need to create a new 

676
00:49:25,400 --> 00:49:28,000
class. 
So you should still add root 

677
00:49:28,000 --> 00:49:31,560
view transition new. 
OK. 

678
00:49:33,760 --> 00:49:38,560
And instead of root there you 
have to specify the view 

679
00:49:38,560 --> 00:49:40,960
transition name that you want to
to. 

680
00:49:40,960 --> 00:49:43,360
So in this case it should be 
Bulbasaur basically. 

681
00:49:43,680 --> 00:49:46,560
Oh my gosh. 
So how would you do it for more?

682
00:49:46,800 --> 00:49:50,200
OK, I'll, I'll start there. 
We'll get to that, don't worry. 

683
00:49:50,680 --> 00:49:53,600
And and it's literally Bulbasaur
like without columns. 

684
00:49:54,040 --> 00:49:55,520
OK. 
Oh, OK. 

685
00:49:58,040 --> 00:50:03,840
And you need to do the same with
transition hold OK and then also

686
00:50:03,840 --> 00:50:07,240
I think for the movement, let's 
see if it works. 

687
00:50:07,240 --> 00:50:10,960
So let's add the the the 
animation direction back to five

688
00:50:10,960 --> 00:50:11,400
seconds. 
Let. 

689
00:50:11,880 --> 00:50:21,600
Me just go back and then. 
Let's see if it works because I 

690
00:50:21,600 --> 00:50:27,360
think for the for the movement, 
yeah, it's still fast because 

691
00:50:27,360 --> 00:50:30,960
you don't want to add these. 
This is a a quirk of the view 

692
00:50:30,960 --> 00:50:33,800
transition API. 
Basically you don't want to add 

693
00:50:33,800 --> 00:50:37,800
it to the view transition new, 
but you want to add to view 

694
00:50:37,800 --> 00:50:46,360
transition group Bulbasaur, 
which is another another Yeah, 

695
00:50:46,360 --> 00:50:50,480
exactly here group Bulbasaur and
you can add just for the group. 

696
00:50:50,800 --> 00:50:57,520
So now if you go back to to the 
page, we should see Boubazar 

697
00:50:57,520 --> 00:51:01,960
slowly moving yeah to its place.
That's awesome. 

698
00:51:02,160 --> 00:51:03,040
Which is pretty. 
Cool. 

699
00:51:03,520 --> 00:51:08,600
It's crazy to me that it knows 
enough that those two images are

700
00:51:08,600 --> 00:51:13,920
alike because we're technically 
loading those on 2 pages. 

701
00:51:14,160 --> 00:51:16,240
Yeah. 
And the reason like in in 

702
00:51:16,240 --> 00:51:18,960
reality it doesn't know that 
they are alike. 

703
00:51:19,720 --> 00:51:23,560
It is just that given that they 
have the same view transition 

704
00:51:23,560 --> 00:51:28,920
name, basically the browser is 
giving is giving you the burden 

705
00:51:28,920 --> 00:51:32,880
to choose like to be sure that 
those two images will be the 

706
00:51:32,880 --> 00:51:35,320
same. 
But in theory that could be a 

707
00:51:35,320 --> 00:51:39,920
completely different image and 
it will move and fade with 

708
00:51:39,920 --> 00:51:42,480
between the twos. 
So let's do, let's do something 

709
00:51:42,480 --> 00:51:44,040
crazy. 
I'm gonna, I'm gonna click on 

710
00:51:44,040 --> 00:51:48,440
this one. 
I'm gonna click inspect just to 

711
00:51:48,440 --> 00:51:51,200
see. 
Let me grab this. 

712
00:51:52,400 --> 00:51:55,880
So I think what I'm hearing you 
say is if I were to change this 

713
00:51:55,880 --> 00:52:00,000
page to only ever show where's 
my image? 

714
00:52:01,240 --> 00:52:02,360
This. 
Yep. 

715
00:52:05,720 --> 00:52:10,000
If I go back, the Bulbasaur will
turn into Ivy. 

716
00:52:10,000 --> 00:52:11,040
Sore now. 
Yes. 

717
00:52:12,880 --> 00:52:14,880
Ah, yes. 
OK, cool. 

718
00:52:15,000 --> 00:52:16,240
I get it. 
That's neat. 

719
00:52:16,840 --> 00:52:20,640
As you correctly pointed out 
like when you have multiple 

720
00:52:20,640 --> 00:52:25,240
elements how does it will like? 
How can I make this work? 

721
00:52:25,400 --> 00:52:34,280
Now in reality, they actually or
just spec like they merged the 

722
00:52:34,280 --> 00:52:39,080
PR in for the the transition 
spec to also add a view 

723
00:52:39,080 --> 00:52:42,520
transition class, which will 
help greatly with this kind of 

724
00:52:42,520 --> 00:52:45,880
situation. 
But in reality, there is one one

725
00:52:45,880 --> 00:52:48,240
thing that you need to be aware 
when you are using the 

726
00:52:48,240 --> 00:52:51,080
transition API. 
And it's the fact that like this

727
00:52:51,080 --> 00:52:54,920
is very intensive for the 
browser because it needs to take

728
00:52:54,920 --> 00:52:56,880
a screenshot of every single 
part. 

729
00:52:56,880 --> 00:52:59,120
It needs to morph one part to 
the other. 

730
00:52:59,120 --> 00:53:04,360
So in reality, you we are 
wasting a bunch of resource. 

731
00:53:04,640 --> 00:53:07,960
Why? 
Because we are moving like we 

732
00:53:07,960 --> 00:53:11,160
are taking a screenshot of 
Bourbazar, Rivizar, Venusaur 

733
00:53:11,160 --> 00:53:14,880
and, and all the images. 
But on the new page, there's 

734
00:53:14,880 --> 00:53:18,760
only one image that's that's the
the one that you clicked, right?

735
00:53:19,880 --> 00:53:24,160
And so in reality, what you 
should do is you should not add 

736
00:53:24,280 --> 00:53:29,640
a view transition name of on 
every of every single image. 

737
00:53:29,880 --> 00:53:33,200
You should add a single view 
transition name that could be 

738
00:53:33,320 --> 00:53:38,440
image in the in both pages. 
And then you should add. 

739
00:53:38,440 --> 00:53:47,280
So let's try to do this. 
So if you go back here, instead 

740
00:53:47,280 --> 00:53:51,400
of having the view transition 
name be the Pokémon name, you 

741
00:53:51,400 --> 00:53:54,360
can do view transition name. 
It's equal Pokémon. 

742
00:53:54,600 --> 00:53:57,280
Well, I don't know. 
Yeah, image, Sprite, whatever 

743
00:53:57,280 --> 00:54:00,840
you want, OK. 
And this needs to be in quotes, 

744
00:54:00,840 --> 00:54:04,040
obviously and. 
This is like. 

745
00:54:05,480 --> 00:54:09,920
OK, so obviously like you, you 
need to style it with Sprite at 

746
00:54:09,920 --> 00:54:13,760
the same time without quotes 
here. 

747
00:54:14,200 --> 00:54:16,040
Sorry. 
Yeah, that kind of throws me 

748
00:54:16,040 --> 00:54:16,720
off. 
I get it. 

749
00:54:16,720 --> 00:54:18,960
Like it's a naming thing. 
Yeah. 

750
00:54:18,960 --> 00:54:22,000
Exactly. 
And you need to change it in the

751
00:54:22,000 --> 00:54:26,200
plus page as belt too. 
In the other plus page as belt. 

752
00:54:26,200 --> 00:54:29,960
So here you need a view 
transition name. 

753
00:54:29,960 --> 00:54:32,360
It should be Sprite. 
Yeah, perfect. 

754
00:54:33,040 --> 00:54:36,640
Now when you try to do this and 
if you try to navigate, you will

755
00:54:36,640 --> 00:54:39,840
see that it doesn't work and you
will see an error in the 

756
00:54:39,840 --> 00:54:42,560
console. 
So it doesn't work anymore. 

757
00:54:45,280 --> 00:54:49,320
Now why it doesn't work? 
Because the new transition name 

758
00:54:49,640 --> 00:54:54,440
needs to be unique because like 
the browser cannot know that 

759
00:54:54,440 --> 00:54:57,640
there will be only one in the 
next one that cannot know that 

760
00:54:57,960 --> 00:55:01,800
you are clicking on that link. 
And so you don't want to. 

761
00:55:01,800 --> 00:55:05,560
So it's pretty complex and 
that's why that's what I was 

762
00:55:05,840 --> 00:55:09,400
talking about before. 
Usually with the transition API,

763
00:55:09,680 --> 00:55:13,280
you need to do stuff right 
before the transition happen. 

764
00:55:13,680 --> 00:55:19,720
So what you should do basically 
is add the class right like 

765
00:55:19,720 --> 00:55:24,600
right when you click on it. 
OK, now we could do this with 

766
00:55:25,160 --> 00:55:26,760
stout. 
So you can you can add a non 

767
00:55:26,760 --> 00:55:30,560
click on the link and when you 
click on the link, you change 

768
00:55:30,560 --> 00:55:36,800
the the ID of the of the of the 
Pokémon that needs to be 

769
00:55:36,800 --> 00:55:41,720
transitioned and you update the 
view transition name right only 

770
00:55:41,720 --> 00:55:47,160
for that Pokémon. 
I I think we can avoid all this 

771
00:55:47,160 --> 00:55:50,120
hassle because this is also a 
problem that my library solve. 

772
00:55:51,160 --> 00:55:57,000
So to actually do this what you 
can do is after you call set up 

773
00:55:57,000 --> 00:56:02,640
the transition, you get back an 
object and you can the structure

774
00:56:02,640 --> 00:56:10,680
from that object and you can the
structure transition. 

775
00:56:10,920 --> 00:56:17,840
This transition is an action. 
And if you use this action on an

776
00:56:17,840 --> 00:56:21,760
image, you can do basically 
instead of style the transition 

777
00:56:21,760 --> 00:56:32,810
name, you can do use transition 
and you can you can pass bot a 

778
00:56:32,810 --> 00:56:37,690
string or an object and I will 
tell you what what it does. 

779
00:56:37,690 --> 00:56:42,210
So if you do use transition 
equal, you don't need the yeah, 

780
00:56:42,290 --> 00:56:47,770
equal curly braces. 
And you can pass for the moment,

781
00:56:47,770 --> 00:56:50,690
let's pass a string which is 
Sprite. 

782
00:56:53,440 --> 00:57:04,760
You can do the same on the other
plus page that spelled obviously

783
00:57:04,760 --> 00:57:08,440
here you need to import and call
set up the transition again. 

784
00:57:08,440 --> 00:57:17,840
Yeah, OK, So what these use 
transition Sprite does is it add

785
00:57:17,840 --> 00:57:21,720
the view transition name of 
Sprite to this to this image. 

786
00:57:22,280 --> 00:57:26,440
Now in this very moment we are 
basically just doing the same 

787
00:57:26,440 --> 00:57:30,040
thing that we were doing before.
So it it will not work anymore 

788
00:57:30,720 --> 00:57:34,280
like anyway. 
So if you go back, you will 

789
00:57:34,280 --> 00:57:38,000
still see that the error because
it has multiple stuff. 

790
00:57:38,440 --> 00:57:42,480
But what you can do is in the 
page where you have multiple 

791
00:57:43,400 --> 00:57:47,960
images, you can go and instead 
of passing so the the one the 

792
00:57:47,960 --> 00:57:52,320
exact, instead of passing a 
string you can actually pass an 

793
00:57:52,360 --> 00:57:54,960
object. 
So here. 

794
00:57:55,200 --> 00:57:59,600
Yes. 
And this object has different. 

795
00:57:59,600 --> 00:58:04,400
No, it's like an inline object, 
basically inline object. 

796
00:58:04,920 --> 00:58:07,480
Yeah, exactly. 
And this has multiple properties

797
00:58:07,520 --> 00:58:10,920
on it. 
One is name, so it should be 

798
00:58:11,920 --> 00:58:17,440
Sprite, but there are also other
properties. 

799
00:58:17,440 --> 00:58:21,680
So if you do control space you 
can see that there is apply 

800
00:58:21,680 --> 00:58:24,560
immediately classes and should 
apply. 

801
00:58:25,320 --> 00:58:30,360
Now we can talk about what the 
other things does but what we 

802
00:58:30,360 --> 00:58:34,960
are interested in is should 
apply with this should apply. 

803
00:58:34,960 --> 00:58:40,520
This is a function that you can 
pass and this function takes as 

804
00:58:40,520 --> 00:58:43,480
in as a parameter the navigation
object. 

805
00:58:44,120 --> 00:58:48,000
So you can this structure the 
navigation object from the from 

806
00:58:48,000 --> 00:58:51,200
the parameters. 
Sorry for. 

807
00:58:51,920 --> 00:58:55,240
This is a function and as a 
parameter take an object and 

808
00:58:55,240 --> 00:58:59,000
from this object you can 
structure the navigation object.

809
00:58:59,000 --> 00:59:02,480
So you can do params dot 
navigation and this navigation 

810
00:59:02,480 --> 00:59:05,720
object is the navigation object 
that's belt kit provides you. 

811
00:59:05,800 --> 00:59:10,240
So on that you have a bunch of 
properties and you also have the

812
00:59:10,280 --> 00:59:14,240
dot exactly you can see .2 for 
example. 

813
00:59:14,480 --> 00:59:19,720
So in this case the .2 will 
contain the page that you are 

814
00:59:19,720 --> 00:59:25,760
navigating to. 
So if you do dot to dot you can 

815
00:59:25,760 --> 00:59:32,360
see params root URL. 
So if you do params, this params

816
00:59:32,400 --> 00:59:36,480
object is the parameter of the 
page you are navigating to. 

817
00:59:37,000 --> 00:59:40,400
So we know that we want to go to
ID. 

818
00:59:40,400 --> 00:59:46,160
So if you do params dot ID. 
Are we doing dot ID or dot name?

819
00:59:46,160 --> 00:59:49,000
Oh, I see. 
Not ID because that's the 

820
00:59:49,000 --> 00:59:52,000
parameter like that's the route 
we are navigating to. 

821
00:59:52,200 --> 00:59:54,000
Gotcha. 
It's the folder name. 

822
00:59:54,160 --> 00:59:56,600
OK, Yeah. 
So dot ID. 

823
00:59:57,720 --> 01:00:02,520
Now if all of these and this can
be undefined obviously. 

824
01:00:02,520 --> 01:00:05,320
So you need to account for that 
without question mark. 

825
01:00:06,680 --> 01:00:10,040
If all of these, it's equal to 
Pokémon dot name. 

826
01:00:10,200 --> 01:00:12,800
This means that we are 
navigating to that page. 

827
01:00:14,640 --> 01:00:16,600
Should we check then or? 
You can do. 

828
01:00:17,960 --> 01:00:19,480
You need to return a boolean 
from. 

829
01:00:19,480 --> 01:00:22,760
This should apply. 
So you can return if all of 

830
01:00:22,760 --> 01:00:30,200
these is equal to Pokémon dot 
name and this will basically do 

831
01:00:30,200 --> 01:00:33,280
what I told you that you'd 
sometimes need to do. 

832
01:00:33,600 --> 01:00:37,400
So it will call this function 
right before navigating and if 

833
01:00:37,400 --> 01:00:42,560
you return true from this, it 
will apply the name only to what

834
01:00:42,560 --> 01:00:46,920
you are returning through from. 
So if you return all of these, 

835
01:00:47,280 --> 01:00:49,280
this is giving you an error 
because you need to return. 

836
01:00:50,160 --> 01:00:53,240
Basically what it does is like 
you are navigating to slash 

837
01:00:53,240 --> 01:00:58,080
Bulbazaar and if you are 
navigating to slash bulbazaar 

838
01:00:58,080 --> 01:01:01,240
and the Pokémon name is 
bulbazaar, it will apply the 

839
01:01:01,240 --> 01:01:04,160
Sprite class otherwise it will 
not apply the Sprite. 

840
01:01:04,160 --> 01:01:08,400
Class. 
By doing these, if you save we 

841
01:01:08,400 --> 01:01:13,240
now solved the problem so we can
style our Sprite separately. 

842
01:01:13,320 --> 01:01:17,960
But now if you navigate it will 
actually move the Sprite. 

843
01:01:17,960 --> 01:01:21,360
There so it's like that instant 
before it's. 

844
01:01:21,360 --> 01:01:23,040
Put exactly. 
Right down to it. 

845
01:01:23,440 --> 01:01:27,000
Exactly, and now given that you 
are the the stop the transition 

846
01:01:27,000 --> 01:01:32,600
in the other page too, if you 
click back it will still fade 

847
01:01:32,600 --> 01:01:33,160
away. 
Gotcha. 

848
01:01:35,320 --> 01:01:38,400
Now the fun part is that like 
now even if you click on 

849
01:01:38,400 --> 01:01:42,720
something down below like 
Venusaur or Charizard, it will 

850
01:01:42,720 --> 01:01:49,200
still move like from the point 
you are to the next to to to its

851
01:01:49,200 --> 01:01:50,680
proper spot Basically. 
Yep. 

852
01:01:51,000 --> 01:01:54,240
Makes sense? 
Now you have seen something 

853
01:01:54,240 --> 01:02:00,000
already and that's the fact that
if you are navigating back, you 

854
01:02:00,000 --> 01:02:04,440
are not getting the fun effect 
of the like. 

855
01:02:06,000 --> 01:02:07,960
Like if you click on Wilbur Dao 
let. 

856
01:02:08,440 --> 01:02:11,120
Me redo this. 
There we go. 

857
01:02:11,960 --> 01:02:15,400
Like the list goes back and then
it slows the fade fade away, 

858
01:02:15,400 --> 01:02:19,320
right? 
The reason because it does this 

859
01:02:19,320 --> 01:02:23,720
is because like on the new page,
on the detail page you actually 

860
01:02:23,720 --> 01:02:27,440
have the the the class the view 
transition name right of the 

861
01:02:27,480 --> 01:02:31,160
Sprite. 
But as we said the the the view 

862
01:02:31,160 --> 01:02:36,440
transition name of Sprite only 
gets applied when you are 

863
01:02:36,840 --> 01:02:40,600
navigating right. 
So when you are coming to the 

864
01:02:40,600 --> 01:02:47,120
page you don't have the the the 
view transition name on the 

865
01:02:47,120 --> 01:02:52,360
image and so the browser will 
not like interpolate between the

866
01:02:52,360 --> 01:02:54,160
two. 
Correlate the two together. 

867
01:02:54,440 --> 01:02:57,560
Yeah, exactly. 
So basically it's fading away 

868
01:02:57,560 --> 01:03:01,880
just because for what the 
browser is aware of that view 

869
01:03:01,880 --> 01:03:03,520
transition name is just 
disappeared. 

870
01:03:03,520 --> 01:03:07,720
To solve this issue you have the
other function which is apply 

871
01:03:07,720 --> 01:03:12,800
immediately, so the few parts. 
Apply immediately, OK. 

872
01:03:13,320 --> 01:03:18,240
Here, Yeah, it's another. 
It's another parameter of the 

873
01:03:18,240 --> 01:03:20,520
object, so you should put a 
comma after that. 

874
01:03:20,520 --> 01:03:26,520
Yeah, apply immediately means 
that like if you return through 

875
01:03:26,520 --> 01:03:30,720
from this function, my library 
will actually add the view 

876
01:03:30,720 --> 01:03:34,840
transition name while it's 
navigating and remove it 

877
01:03:34,840 --> 01:03:38,560
immediately after. 
So when should you return 

878
01:03:38,560 --> 01:03:42,280
through this params dot 
navigation also contains another

879
01:03:42,280 --> 01:03:45,840
property which is the from. 
So if you do basically you 

880
01:03:45,840 --> 01:03:49,640
should do the same thing but 
instead of the programs dot 

881
01:03:49,640 --> 01:03:54,360
navigation .2 exactly because 
now this function is run when 

882
01:03:54,360 --> 01:03:59,160
you are on the on the old page 
and you are coming from here so.

883
01:03:59,360 --> 01:04:02,560
And so this is what instant 
before the? 

884
01:04:02,640 --> 01:04:04,920
Instant before it's coming to 
this page. 

885
01:04:04,920 --> 01:04:08,400
Like this page is already being 
rendered under the browser but 

886
01:04:08,400 --> 01:04:10,640
the view transition is not 
finished yet. 

887
01:04:10,960 --> 01:04:14,440
Yep, that makes sense. 
If just by doing this, if you 

888
01:04:14,440 --> 01:04:18,560
then go back to to the page and 
you click on Bull Bizarre, for 

889
01:04:18,560 --> 01:04:23,800
example, or Evizarre, now 
Evizarre is moving there, but 

890
01:04:23,800 --> 01:04:28,080
when you click back, Evizarre is
moving to. 

891
01:04:28,360 --> 01:04:29,440
This. 
That's. 

892
01:04:29,840 --> 01:04:33,920
Awesome, I love that. 
And if we if we jazz this up 

893
01:04:33,920 --> 01:04:36,680
like it probably should be like 
if you're doing like a one 

894
01:04:36,680 --> 01:04:40,400
second, yes, it's still like 
look a lot cooler, right? 

895
01:04:41,040 --> 01:04:46,880
Yep, and there is also another 
fun thing that is that you can 

896
01:04:46,880 --> 01:04:49,960
have multiple of those like in 
this case we are just animating 

897
01:04:49,960 --> 01:04:53,080
the Sprite, but let's also 
animate the title for example, 

898
01:04:53,240 --> 01:04:56,320
OK? 
Should we copy all of this? 

899
01:04:56,320 --> 01:05:00,240
Yeah, and you can basically do 
the same thing and you can apply

900
01:05:00,240 --> 01:05:08,680
to to the a Sorry. 
I meant to put it up here. 

901
01:05:11,240 --> 01:05:12,960
Obviously you need to change the
name. 

902
01:05:13,800 --> 01:05:15,720
This will be like Sprite name 
or. 

903
01:05:16,120 --> 01:05:17,640
Yeah, you can. 
You can call it whatever you 

904
01:05:17,640 --> 01:05:18,680
want. 
This is just. 

905
01:05:18,960 --> 01:05:23,600
My name or whatever and then 
we'll need this again. 

906
01:05:24,360 --> 01:05:26,920
It's similar on this side, 
right? 

907
01:05:28,240 --> 01:05:32,920
Yes, let's here. 
Use transition on H1. 

908
01:05:36,360 --> 01:05:39,080
Something like that, yes. 
OK. 

909
01:05:40,280 --> 01:05:43,680
Now if you try to click it. 
Yeah. 

910
01:05:43,760 --> 01:05:45,680
Oh yeah, I see. 
It's pretty quick, let me slow 

911
01:05:45,680 --> 01:05:50,720
it down again. 
Yes and obviously like this is 

912
01:05:50,720 --> 01:05:55,120
targeting only the Sprite. 
So you need to target the the 

913
01:05:55,120 --> 01:05:56,920
view transition name, Sprite 
name. 

914
01:05:57,200 --> 01:06:04,280
Oh yeah, I forgot so same but 
this. 

915
01:06:06,960 --> 01:06:13,000
Yep, exactly. 
That's weird. 

916
01:06:13,000 --> 01:06:16,320
It goes like down like that. 
Yeah, and the reason why it does

917
01:06:16,320 --> 01:06:23,600
this is because you're animating
between an inline element and an

918
01:06:23,600 --> 01:06:28,960
H1, which is a block element. 
So the actual size of the H1 is 

919
01:06:28,960 --> 01:06:31,680
much larger. 
So fix these. 

920
01:06:31,760 --> 01:06:37,160
You can actually do on the H1, 
you can style it as an inline. 

921
01:06:38,200 --> 01:06:41,920
So in the plus pages belt you 
can style it as an inline. 

922
01:06:41,920 --> 01:06:43,640
Just do. 
Whoops. 

923
01:06:50,800 --> 01:06:57,960
It needs to be. 
Display in liner. 

924
01:06:59,840 --> 01:07:03,280
Display. 
Yeah, I think it's display in 

925
01:07:03,280 --> 01:07:05,920
line. 
And this also means that you 

926
01:07:05,920 --> 01:07:09,720
probably won't yet to add. 
Yeah, exactly. 

927
01:07:10,880 --> 01:07:13,440
I think you can also like. 
Part of the reason why it's 

928
01:07:13,440 --> 01:07:19,560
doing this weird things is also 
because there is marching and 

929
01:07:19,560 --> 01:07:22,320
padding. 
So you can remove those two. 

930
01:07:22,320 --> 01:07:24,960
I think for like to to ease the 
experience. 

931
01:07:25,280 --> 01:07:29,640
This is one weird stuff like 
it's very difficult to debug 

932
01:07:29,640 --> 01:07:32,840
this kind of stuff with the 
transition API. 

933
01:07:33,480 --> 01:07:38,240
This unfortunately is all like 
you are literally styling an 

934
01:07:38,240 --> 01:07:41,240
image. 
So if the image is much larger. 

935
01:07:43,640 --> 01:07:45,680
Oh, you're thinking around the 
image it's doing. 

936
01:07:46,200 --> 01:07:49,400
Yeah, exactly. 
And you can also see that like 

937
01:07:49,400 --> 01:07:55,680
if you if you inspect the the 
view transition, what's the 

938
01:07:55,680 --> 01:07:56,360
animation? 
I don't. 

939
01:08:04,080 --> 01:08:06,880
Know if it's? 
Is it this one? 

940
01:08:11,200 --> 01:08:16,520
And let's pause the animation 
and go back. 

941
01:08:16,760 --> 01:08:22,640
OK, so now if you inspect the if
you inspect the the elements 

942
01:08:22,640 --> 01:08:28,240
inside the HTML and you go to 
view transition I'm. 

943
01:08:28,479 --> 01:08:31,680
Going to do this this way and 
hopefully it'll help out. 

944
01:08:31,760 --> 01:08:38,160
Yeah, I don't know. 
So if you go elements and there 

945
01:08:38,160 --> 01:08:41,760
is oh I think we should probably
do it again. 

946
01:08:41,760 --> 01:08:46,680
I think it the changing the the 
dev tools actually broke. 

947
01:08:47,399 --> 01:08:50,439
Oh, OK. 
So hit refresh. 

948
01:08:51,000 --> 01:08:53,800
OK, click on Bulbasaur. 
Now if you click on the 

949
01:08:53,800 --> 01:08:58,040
animation, oops, hold on, come 
on. 

950
01:08:58,680 --> 01:09:06,359
Hey guys, it's just so big. 
OK, now if you inspect the HTML.

951
01:09:07,920 --> 01:09:10,040
It's interesting it's not doing 
it, but OK. 

952
01:09:11,960 --> 01:09:13,920
Yeah, it's strange that it's not
doing it. 

953
01:09:14,359 --> 01:09:19,000
Why it's not doing it? 
If I hit play, no, let me go 

954
01:09:19,000 --> 01:09:23,439
back one that way it's kind of 
doing it. 

955
01:09:23,439 --> 01:09:27,760
Let me refresh completely. 
Let's see. 

956
01:09:29,040 --> 01:09:35,120
OK, alright, OK. 
Now if you the put it mid weight

957
01:09:35,120 --> 01:09:37,800
basically midway. 
OK. 

958
01:09:38,520 --> 01:09:41,240
OK, stop it now. 
And if you open the view 

959
01:09:41,240 --> 01:09:45,840
transition panel so. 
Oops shit, I cannot touch that. 

960
01:09:46,560 --> 01:09:51,080
That's that's my problem. 
OK, paused. 

961
01:09:51,640 --> 01:09:56,560
OK, go back. 
OK, just refresh and then 

962
01:09:56,600 --> 01:09:59,320
forward and then don't reside 
Galaxy. 

963
01:09:59,960 --> 01:10:05,840
OK, OK, Now if you open the view
transition like yeah, drop down 

964
01:10:06,400 --> 01:10:12,160
and you click on Sprite name, 
open it again, you can click on 

965
01:10:12,240 --> 01:10:16,600
image pair again. 
Now you're literally seeing from

966
01:10:17,000 --> 01:10:19,640
when to where is now is on the 
meeting. 

967
01:10:20,440 --> 01:10:24,680
So if you like, you can see that
it took the screenshot of that 

968
01:10:24,680 --> 01:10:28,360
part of the browser. 
So if you go ahead another bit, 

969
01:10:28,840 --> 01:10:35,800
you should see that oh, this is 
kind of weird. 

970
01:10:36,040 --> 01:10:39,720
Though it's, it's definitely 
like seeing a width. 

971
01:10:40,000 --> 01:10:43,360
Change. 
Yeah, I think it's also. 

972
01:10:43,360 --> 01:10:45,920
That I don't know. 
If you go to like, compute it, 

973
01:10:45,920 --> 01:10:50,800
if it's showing, yeah, it's got 
like a negative position, but 

974
01:10:50,800 --> 01:10:55,240
not a margin or a padding. 
Because I I actually filed a bug

975
01:10:55,240 --> 01:11:01,000
for Chrome because with inline 
elements was kind of having some

976
01:11:01,000 --> 01:11:06,000
problem rendering them. 
But I told that this was fixed. 

977
01:11:06,240 --> 01:11:08,640
So let's try just to fix this 
kind of stuff. 

978
01:11:08,680 --> 01:11:12,720
Let's try to instead of making 
the H1 an E line element, let's 

979
01:11:12,720 --> 01:11:16,440
try to make the H ref block 
element. 

980
01:11:18,840 --> 01:11:26,440
So take remove, yeah, remove 
that and save and let's do a 

981
01:11:26,520 --> 01:11:31,320
style. 
It's equal display of block. 

982
01:11:41,920 --> 01:11:46,920
This should interior fix stuff 
around, but I mean I mean this 

983
01:11:46,920 --> 01:11:50,640
is not that important, it's just
a quirk of the transition API. 

984
01:11:50,960 --> 01:11:54,280
Right, right. 
All right, Let's see. 

985
01:11:54,280 --> 01:11:56,640
Let's let's just keep that 
played. 

986
01:11:57,440 --> 01:11:59,200
Yeah, yeah, it's a little 
cleaner. 

987
01:11:59,920 --> 01:12:04,040
Yeah, also I mean in this case 
the the font size is changing, 

988
01:12:04,040 --> 01:12:07,400
so that's why you are seeing. 
Like all kinds of stuff going 

989
01:12:07,400 --> 01:12:08,680
on. 
Yeah, yeah, exactly. 

990
01:12:09,360 --> 01:12:11,360
But I I mean, I think it's. 
Generally. 

991
01:12:11,920 --> 01:12:13,240
Yeah, Yeah, I think it's 
generally cool. 

992
01:12:13,240 --> 01:12:16,120
That's cool. 
And you just also highlighted 

993
01:12:16,120 --> 01:12:22,880
another small problem here and 
it's the fact that if you are 

994
01:12:24,040 --> 01:12:29,600
animating between something that
is outside of the of the of the 

995
01:12:29,600 --> 01:12:34,880
viewport like Scroll down and we
should probably before doing 

996
01:12:34,880 --> 01:12:38,200
this, we should probably put a 
link to the homepage back in the

997
01:12:38,440 --> 01:12:39,920
in the detail page. 
OK. 

998
01:12:41,440 --> 01:12:44,680
Because if you click back on the
browser, it will actually 

999
01:12:44,680 --> 01:12:49,960
restore the the the navigations,
the scroll navigation, while if 

1000
01:12:49,960 --> 01:12:52,800
you navigate back it will 
restore to the top. 

1001
01:12:53,160 --> 01:12:59,960
So now if you click on Charles 
Dart, which is way below OK, it 

1002
01:12:59,960 --> 01:13:01,000
works totally. 
It's good too. 

1003
01:13:01,640 --> 01:13:03,960
Did you see it like it? 
Did that was interesting. 

1004
01:13:05,360 --> 01:13:09,600
Basically like given that when 
you go back, the Pokémon is out 

1005
01:13:09,600 --> 01:13:14,640
of the of the of the viewport, 
it flies over out of the 

1006
01:13:14,640 --> 01:13:18,000
viewport and that's something 
that like it's not that good, 

1007
01:13:18,000 --> 01:13:21,120
especially if some Pokémon which
is way below. 

1008
01:13:21,120 --> 01:13:23,760
Like maybe it's OK, though. 
It's kind of like, oh, it's down

1009
01:13:23,760 --> 01:13:24,520
there. 
I don't know. 

1010
01:13:24,680 --> 01:13:31,880
Yeah, maybe it's OK, but let's 
scroll for example to to to 

1011
01:13:31,880 --> 01:13:35,360
Caterpie, right? 
Or, or maybe even like, OK, just

1012
01:13:35,360 --> 01:13:39,560
with Caterpie, probably you can 
see when you click on home, it 

1013
01:13:39,560 --> 01:13:43,280
goes. 
And now we are just using 10 

1014
01:13:43,280 --> 01:13:46,240
Pokémon. 
But let's say that like try to 

1015
01:13:46,240 --> 01:13:51,720
import all 150 of. 
Them it's probably like black 

1016
01:13:51,720 --> 01:13:59,040
missing this one 'cause we're 
fetching all the details now 

1017
01:13:59,040 --> 01:14:04,760
too. 
OK, so now let's go back to MU 

1018
01:14:04,760 --> 01:14:12,480
right, the last one, MU two. 
Now, if you if you click home, 

1019
01:14:13,120 --> 01:14:19,760
which will happen, it flies off 
because it has to like to to to 

1020
01:14:19,760 --> 01:14:23,360
go all the way down. 
And this is not something very, 

1021
01:14:23,360 --> 01:14:26,080
very good, right? 
And I think they are probably 

1022
01:14:26,200 --> 01:14:29,680
thinking of having a way to 
detect these directly in the 

1023
01:14:29,680 --> 01:14:32,600
view transition API. 
But in the meantime, we are 

1024
01:14:32,600 --> 01:14:35,680
using JavaScript. 
So my library also provide you 

1025
01:14:35,680 --> 01:14:37,280
with something that helps with 
this. 

1026
01:14:37,280 --> 01:14:42,800
So if you go to the to the to, 
to the plus page that's belt 

1027
01:14:42,800 --> 01:14:48,120
where we are loading the the 
things the apply immediately 

1028
01:14:48,480 --> 01:14:52,640
also has params. 
I mean it it also like every 

1029
01:14:52,640 --> 01:14:58,920
function takes this parameter. 
But you can basically also 

1030
01:14:59,200 --> 01:15:02,760
together with the navigation, 
you also get a params dot is in 

1031
01:15:02,760 --> 01:15:06,280
viewport. 
OK, so basically what you can, 

1032
01:15:06,280 --> 01:15:10,920
what you can do is you can just 
say that if parameter dot is in 

1033
01:15:10,920 --> 01:15:16,440
viewport, it's a boolean, so dot
is in viewport. 

1034
01:15:18,960 --> 01:15:20,960
Yeah, that's one that. 
Is. 

1035
01:15:21,720 --> 01:15:28,680
In viewport, that's one. 
Basically you can avoid apply 

1036
01:15:28,680 --> 01:15:31,840
the class if it's not in 
viewport, so. 

1037
01:15:32,360 --> 01:15:36,280
This needs to be part of this. 
Of the yes exactly. 

1038
01:15:36,360 --> 01:15:39,320
So you should apply me the V for
that and params. 

1039
01:15:40,200 --> 01:15:43,520
This first and. 
Yeah, exactly. 

1040
01:15:44,080 --> 01:15:47,400
So by doing this, basically what
you are doing is if it's not in 

1041
01:15:47,400 --> 01:15:49,440
viewport, it will just fade 
away. 

1042
01:15:49,720 --> 01:15:52,680
If it's in viewport, it will 
move to the to the spot. 

1043
01:15:53,120 --> 01:15:56,880
Gotcha. 
OK, we can now try this with 

1044
01:15:57,440 --> 01:16:00,440
oops with. 
Bazaar is in viewport so it's 

1045
01:16:00,560 --> 01:16:04,480
move again and move away. 
Qatar P is not in viewport, so 

1046
01:16:04,480 --> 01:16:11,040
if you click home it will. 
Do you see is in viewport? 

1047
01:16:11,040 --> 01:16:14,120
And sorry, this is only on one 
of them. 

1048
01:16:14,960 --> 01:16:17,000
Oh. 
Yeah, here. 

1049
01:16:20,320 --> 01:16:25,280
Yeah. 
So Bulbasaur does work. 

1050
01:16:27,800 --> 01:16:31,760
Oh, this is one of the 
disadvantages of this is that as

1051
01:16:31,760 --> 01:16:35,000
long as the transition is 
happening, you are kind of 

1052
01:16:35,000 --> 01:16:36,840
stuck. 
I was just gonna say, is there a

1053
01:16:36,840 --> 01:16:40,600
way to get out of that loop? 
Oh, it still did it. 

1054
01:16:42,600 --> 01:16:47,400
Interesting, Did it? 
Yeah, it might be in the 

1055
01:16:47,400 --> 01:16:49,760
viewport, though it's 'cause I'm
so. 

1056
01:16:50,080 --> 01:16:56,640
It should not be in the 
viewport, maybe especially 

1057
01:16:56,640 --> 01:16:59,000
because. 
Let me let me load more and and 

1058
01:16:59,000 --> 01:17:04,040
see if that's the case. 
Like the only thing that I can 

1059
01:17:04,040 --> 01:17:11,080
think of is that if like when 
it's loading, maybe the images 

1060
01:17:11,080 --> 01:17:15,760
are not loading yet. 
So like all the images are 0 

1061
01:17:16,040 --> 01:17:19,800
height. 
Like in this case it's working. 

1062
01:17:21,000 --> 01:17:24,360
So I think what's happening is 
that given that it's loading the

1063
01:17:24,360 --> 01:17:28,920
images from an external 
resource, when the function run 

1064
01:17:29,400 --> 01:17:34,600
the image is not yet loaded and 
so like it has a height of 0 and

1065
01:17:34,600 --> 01:17:37,880
so it is in viewport and then 
when you click it's actually not

1066
01:17:37,880 --> 01:17:41,960
in viewport anymore. 
Maybe it did a image and then 

1067
01:17:41,960 --> 01:17:51,120
did kind of some style equals. 
Yeah, if you add a height it 

1068
01:17:51,120 --> 01:17:54,000
should work. 
Something crazy. 

1069
01:18:01,240 --> 01:18:05,240
Now if I go Caterpie, that's 
funny. 

1070
01:18:07,960 --> 01:18:13,080
Yeah, it's fading away. 
I would expect that to do 

1071
01:18:13,080 --> 01:18:15,840
nothing. 
Oh, the apply immediately is. 

1072
01:18:15,840 --> 01:18:21,800
Yeah, no, no, but also like it's
still fading away because it's 

1073
01:18:21,800 --> 01:18:25,760
still applying the transition. 
It's just not flying off of the 

1074
01:18:26,920 --> 01:18:29,200
it's just not flying off. 
The in my head what I was 

1075
01:18:29,200 --> 01:18:33,640
expecting is probably this where
we don't do anything right. 

1076
01:18:35,480 --> 01:18:38,880
Well, should apply only happen 
for forward navigation 

1077
01:18:38,880 --> 01:18:42,360
basically. 
But like again, the like you 

1078
01:18:42,360 --> 01:18:46,960
should probably put the the the 
exactly like the should apply 

1079
01:18:46,960 --> 01:18:50,600
false there. 
But honestly, like it's fine to 

1080
01:18:50,600 --> 01:18:54,000
me. 
It's just that you don't want it

1081
01:18:54,000 --> 01:18:59,360
to fly off the the the viewport.
One other thing that I want to 

1082
01:18:59,360 --> 01:19:01,200
show, I think we have enough 
time. 

1083
01:19:01,520 --> 01:19:03,040
We should have other other time 
here. 

1084
01:19:03,760 --> 01:19:08,320
That's another that's another 
thing that it's very often used.

1085
01:19:08,840 --> 01:19:13,480
So let's add a background color 
to the the first page. 

1086
01:19:14,560 --> 01:19:23,360
Just the whole page. 
Yes, should be body probably. 

1087
01:19:25,040 --> 01:19:30,960
Oh yeah, and this should 
probably be global for Velvet 

1088
01:19:30,960 --> 01:19:32,800
kit to not remove it. 
I don't. 

1089
01:19:33,960 --> 01:19:36,560
Know what color we want, but 
we'll go there. 

1090
01:19:37,880 --> 01:19:41,920
Is it this? 
Colon Global. 

1091
01:19:42,440 --> 01:19:46,480
Colon global that. 
Was it's it's before body? 

1092
01:19:47,120 --> 01:19:48,800
Yeah, exactly. 
And then you have to put the 

1093
01:19:49,360 --> 01:19:50,560
body inside it. 
Yeah. 

1094
01:19:50,560 --> 01:19:52,360
Oh, I. 
Forget that one. 

1095
01:19:53,640 --> 01:19:57,920
OK, so it's not very accessible,
but it's. 

1096
01:19:58,840 --> 01:20:04,480
Hard to look at, isn't it? 
I usually like to use like, I 

1097
01:20:04,480 --> 01:20:07,920
don't know, light green and 
tomato, something like that. 

1098
01:20:08,080 --> 01:20:10,480
Tomato I like all right. 
Cool, that's. 

1099
01:20:10,920 --> 01:20:14,720
A little better. 
And let's add a different color 

1100
01:20:14,720 --> 01:20:21,320
to the other page. 
OK, we have no style here. 

1101
01:20:25,200 --> 01:20:34,240
Let's add light green now. 
This should still work and it 

1102
01:20:34,240 --> 01:20:38,480
should fade away between. 
I don't know if this is. 

1103
01:20:38,680 --> 01:20:40,200
I see. 
I didn't think you'd have to do 

1104
01:20:40,200 --> 01:20:42,840
the global and I think it's 
overriding it, right? 

1105
01:20:44,920 --> 01:20:48,320
I mean, this is kind of like we 
should probably have a 

1106
01:20:48,320 --> 01:20:52,200
different, I don't know, main 
that covered the whole thing. 

1107
01:20:53,040 --> 01:20:57,520
Or even like a a section with 
what? 

1108
01:20:57,840 --> 01:20:59,480
Yeah, exactly. 
That should be good enough. 

1109
01:21:02,680 --> 01:21:04,840
Instead of this we just put 
section. 

1110
01:21:07,400 --> 01:21:10,400
And I think also in the other, 
in the other part, we, we can, 

1111
01:21:10,480 --> 01:21:22,000
we want that, but it's fine 
because like the thing that I 

1112
01:21:22,000 --> 01:21:27,560
wanted to show you is that let's
say, let's do some weird stuff, 

1113
01:21:27,560 --> 01:21:30,920
OK? 
I'm doing weird stuff. 

1114
01:21:32,560 --> 01:21:36,480
With this background. 
So what we can do is create a a 

1115
01:21:36,480 --> 01:21:40,320
custom animation for the root 
layout right? 

1116
01:21:41,000 --> 01:21:45,480
So as you can see, like you can 
do the view transition new 

1117
01:21:45,880 --> 01:21:48,360
route. 
So we go back to styling the 

1118
01:21:48,360 --> 01:21:52,960
whole page basically, right? 
Instead of do of doing column 

1119
01:21:52,960 --> 01:21:56,560
route V transition new boubazar 
and column route V transition 

1120
01:21:56,560 --> 01:21:59,800
old Boubazar, you put route 
there. 

1121
01:22:03,760 --> 01:22:06,880
So instead of just changing the 
animation direction, you can 

1122
01:22:06,880 --> 01:22:09,080
also change the animation at 
all. 

1123
01:22:09,080 --> 01:22:13,200
Like instead of doing the fade, 
you can do some other stuff, 

1124
01:22:13,520 --> 01:22:17,320
right? 
So let's define an animation and

1125
01:22:17,320 --> 01:22:19,000
you can do it with add 
keyframes. 

1126
01:22:19,600 --> 01:22:21,560
Do we do that outside of these 
though? 

1127
01:22:21,840 --> 01:22:27,840
Like yes OK, so add keyframes. 
Keyframes, yes, and you need to 

1128
01:22:27,840 --> 01:22:30,880
give it a name. 
In this case, we can do slide 

1129
01:22:33,520 --> 01:22:36,400
and you need open curly braces 
and close curly braces. 

1130
01:22:36,720 --> 01:22:38,600
For the moment, let's keep it 
like this. 

1131
01:22:39,120 --> 01:22:42,560
Let's go to view transition new 
route and view transition old 

1132
01:22:42,560 --> 01:22:45,360
route and let's add an animation
of. 

1133
01:22:46,000 --> 01:22:53,720
So you can do animation and you 
can do slide and then you can 

1134
01:22:53,720 --> 01:22:58,640
specify like, I don't know, one 
second linear, for example, 

1135
01:22:59,040 --> 01:23:04,600
stuff like that. 
OK, now we need to define what's

1136
01:23:04,600 --> 01:23:09,760
the what the animation does. 
And the way I like to do it is 

1137
01:23:09,760 --> 01:23:13,800
with CSS variables. 
So what we what I want basically

1138
01:23:13,800 --> 01:23:20,320
is that I want the whole root of
the the transition to slide away

1139
01:23:20,440 --> 01:23:23,360
while the new one comes in. 
OK. 

1140
01:23:24,320 --> 01:23:27,280
And given that those are images,
we can literally just use the 

1141
01:23:27,280 --> 01:23:32,200
transition. 
So the keyframes slide you can 

1142
01:23:32,320 --> 01:23:37,600
you want, you want it to go from
so you can do from curly braces 

1143
01:23:40,080 --> 01:23:44,200
and the from will be OK. 
So imagine that this is the 

1144
01:23:44,200 --> 01:23:49,880
whole image that will be 
transition from transition and. 

1145
01:23:49,920 --> 01:23:52,680
Will make you bigger for other 
people to see, yeah. 

1146
01:23:53,720 --> 01:23:59,520
So you want the transition. 
You want to transition from zero

1147
01:23:59,520 --> 01:24:04,560
percent transition to a -, 100% 
transition for the old one, and 

1148
01:24:04,560 --> 01:24:07,680
at the same time you want the 
new one to start with a 

1149
01:24:07,680 --> 01:24:11,440
transition of 100% and move back
to 0. 

1150
01:24:11,760 --> 01:24:15,080
OK, got it. 
OK, so if we go back to the 

1151
01:24:15,120 --> 01:24:18,040
code. 
Oh yeah, sorry, forgot it wasn't

1152
01:24:18,040 --> 01:24:18,680
showing. 
Thank you. 

1153
01:24:20,000 --> 01:24:22,120
So. 
From so you want from 

1154
01:24:22,160 --> 01:24:26,560
transition. 
Sorry, transform. 

1155
01:24:26,560 --> 01:24:28,480
I say transition, but it's 
transform. 

1156
01:24:29,160 --> 01:24:31,960
All good. 
OK, so you want a scale? 

1157
01:24:32,200 --> 01:24:38,680
Sorry, scale. 
Translate Translate X. 

1158
01:24:39,920 --> 01:24:45,280
Yep. 
So we're going from zero to -100

1159
01:24:45,280 --> 01:24:47,800
correct? 
Yeah, but you want from 

1160
01:24:47,880 --> 01:24:54,320
transform translate X. 
Sorry like. 

1161
01:24:55,200 --> 01:24:59,120
Translate X and this takes the 
the the thing and what you can 

1162
01:24:59,120 --> 01:25:02,600
do is you can use acss variable 
for it so that we can define 

1163
01:25:02,600 --> 01:25:07,240
this animation once. 
So you can do translate X. 

1164
01:25:07,240 --> 01:25:10,520
No, no, you don't need to define
it above like you can just do 

1165
01:25:10,760 --> 01:25:21,120
var parenthesis colon dash dash 
from. 

1166
01:25:23,680 --> 01:25:31,280
And then you want 2IN in this in
the keyframe slide OK, you want 

1167
01:25:31,280 --> 01:25:36,480
to do 2 and then you want to do 
transform translate X bar dash 

1168
01:25:36,480 --> 01:25:40,760
dash 2. 
Now we need to define those 

1169
01:25:41,960 --> 01:25:45,440
those variables basically. 
And So what you want to do is 

1170
01:25:45,440 --> 01:25:49,840
you want to, oh, maybe we should
do these in the layout though. 

1171
01:25:51,000 --> 01:25:53,840
Yeah, I guess so. 
I mean, it's fine, it's fine. 

1172
01:25:55,520 --> 01:25:57,640
We can copy, No, no, we can copy
and paste it. 

1173
01:25:57,640 --> 01:26:02,560
So don't worry. 
So basically what, what you want

1174
01:26:02,560 --> 01:26:09,600
to do is you want to go from I 
wonder if, OK, let's let's do it

1175
01:26:09,600 --> 01:26:11,840
for a moment and then we maybe 
we can refactor it. 

1176
01:26:13,120 --> 01:26:19,320
So inside the the root view 
transition new you want to 

1177
01:26:19,320 --> 01:26:25,040
define those CSS variables. 
So you want to you can copy the 

1178
01:26:25,040 --> 01:26:28,200
whole like from line 57 to line 
71. 

1179
01:26:29,160 --> 01:26:36,040
OK. 
Just 71 line 71. 70 or 61? 

1180
01:26:36,680 --> 01:26:39,320
So 61 sorry. 
That's OK. 

1181
01:26:40,200 --> 01:26:43,160
That one OK. 
OK, you can paste it below. 

1182
01:26:44,920 --> 01:26:48,160
Below everything down here. 
It's fine, It's the same. 

1183
01:26:48,800 --> 01:26:52,840
Remove the view transition new 
or the view transition old is 

1184
01:26:52,840 --> 01:26:55,640
the same because you need to to 
define those separately 

1185
01:26:55,640 --> 01:26:57,680
basically. 
OK. 

1186
01:26:58,080 --> 01:26:59,400
Yeah, you can just do this. 
Yeah. 

1187
01:26:59,840 --> 01:27:01,080
And you want to define the 
variable. 

1188
01:27:01,080 --> 01:27:06,280
So we say that in the new view 
transition, we want the new. 

1189
01:27:06,440 --> 01:27:08,040
No, it's root. 
It's fine. 

1190
01:27:08,440 --> 01:27:11,400
We just need to define the the 
the CSS variable. 

1191
01:27:11,640 --> 01:27:20,360
We want to go from 100% to 0 so 
we can do dash, dash from column

1192
01:27:23,000 --> 01:27:31,760
-100% or sorry, 100%. 
OK. 

1193
01:27:32,480 --> 01:27:44,640
And then we want the two to be 0
and you need columns there. 

1194
01:27:47,120 --> 01:27:53,480
Yeah you need a a semi colon 
after 100% and the old one you 

1195
01:27:53,480 --> 01:27:59,440
want the from 0% to -100%. 
So UPS. 

1196
01:28:00,840 --> 01:28:04,160
It's below inside the. 
Route. 

1197
01:28:04,160 --> 01:28:10,360
Sorry, gotcha. 
So it's from 0% to -100%. 

1198
01:28:12,320 --> 01:28:18,440
OK, so let's see if this works 
because we might need to. 

1199
01:28:19,600 --> 01:28:24,920
So if you click you should see 
the new page comes in. 

1200
01:28:26,240 --> 01:28:30,640
Now if we go back OK, it still 
works, which is good. 

1201
01:28:31,440 --> 01:28:33,040
We just need to go the other 
way, right? 

1202
01:28:35,040 --> 01:28:38,040
Yeah, exactly. 
That's what I was, I was going 

1203
01:28:38,040 --> 01:28:40,960
to. 
This is another thing that like 

1204
01:28:41,440 --> 01:28:45,280
maybe we want to move it on the 
other side. 

1205
01:28:45,560 --> 01:28:49,120
And this is one other thing that
we often need to do with the 

1206
01:28:49,120 --> 01:28:53,680
transition API because the way 
to do this is actually change 

1207
01:28:54,280 --> 01:29:03,440
something on a different class. 
So basically when when what you 

1208
01:29:03,440 --> 01:29:06,880
want to do is you want to know 
when you are navigating back. 

1209
01:29:07,360 --> 01:29:12,000
OK. 
OK, to do that, what you can do 

1210
01:29:12,080 --> 01:29:18,160
is you can use another property 
of the of the. 

1211
01:29:20,440 --> 01:29:24,840
When you do set up the 
transition, you can use another 

1212
01:29:24,840 --> 01:29:30,000
property like you can the 
structure, another field 

1213
01:29:30,000 --> 01:29:35,920
basically which is classes. 
And what it does is that when 

1214
01:29:36,000 --> 01:29:42,000
you are navigating away from 
this page, it add a class to the

1215
01:29:42,000 --> 01:29:44,640
root element that you can target
in your CSS. 

1216
01:29:45,080 --> 01:29:53,320
So we should probably do this 
on, I mean, yeah, OK, we can 

1217
01:29:53,320 --> 01:29:56,080
also do it here. 
So if you call these classes 

1218
01:29:58,760 --> 01:30:02,440
right after the set up the 
transition, you can just call. 

1219
01:30:02,440 --> 01:30:04,720
It's a function all. 
Right. 

1220
01:30:06,200 --> 01:30:14,320
This takes a function as input 
that again it takes the 

1221
01:30:14,320 --> 01:30:17,000
navigation object like you can 
the structure the navigation 

1222
01:30:17,000 --> 01:30:22,440
object from classes. 
From classes you can. 

1223
01:30:23,000 --> 01:30:26,600
The the the parameters that you 
take as input is a navigation 

1224
01:30:26,600 --> 01:30:28,000
object. 
Gotcha. 

1225
01:30:28,080 --> 01:30:33,120
So something like that. 
And with this navigation object,

1226
01:30:33,640 --> 01:30:36,680
it's that you can like it's 
inside the proper obviously. 

1227
01:30:36,720 --> 01:30:43,240
So NAV dot navigation you can 
see what like like this is the 

1228
01:30:43,240 --> 01:30:45,320
same navigation object that you 
used before. 

1229
01:30:45,320 --> 01:30:49,800
So you can check if you are 
coming from the the other page. 

1230
01:30:49,920 --> 01:30:57,040
So you can do for example from 
dot root dot ID. 

1231
01:30:59,000 --> 01:31:03,080
So this root ID is the ID of of 
this Veltkit route. 

1232
01:31:03,360 --> 01:31:09,640
So in this case the root ID of 
the the of the other page will 

1233
01:31:09,640 --> 01:31:19,120
be slash. 
I can, I can talk, I promise. 

1234
01:31:20,560 --> 01:31:24,240
Yeah, OK, we can check for this.
Basically if we are moving away 

1235
01:31:24,240 --> 01:31:29,560
from this class, from this page,
it will be slash, otherwise it 

1236
01:31:29,560 --> 01:31:34,040
will be a slash, curl, square 
brackets, right. 

1237
01:31:34,560 --> 01:31:38,400
And So what you can do is if we 
are moving away to from this, 

1238
01:31:38,440 --> 01:31:40,680
it's fine. 
But if you are not moving away 

1239
01:31:40,680 --> 01:31:47,320
from this, so you can do yeah. 
OK, So this is like you don't 

1240
01:31:47,320 --> 01:31:49,320
need to return a boolean from 
here. 

1241
01:31:49,960 --> 01:31:54,280
You need to return, yes. 
You need to return an array of 

1242
01:31:54,280 --> 01:31:57,320
strings though. 
OK, so we're doing something 

1243
01:31:57,320 --> 01:32:01,960
more like. 
Like you can either do if 

1244
01:32:02,160 --> 01:32:04,920
navigation and just return in 
that case. 

1245
01:32:05,400 --> 01:32:14,760
So OK, you can do if that and 
then you can return an array of 

1246
01:32:14,760 --> 01:32:18,920
string and the string can be for
example back. 

1247
01:32:21,160 --> 01:32:23,440
Otherwise. 
It's fine. 

1248
01:32:23,440 --> 01:32:26,240
You can also not return anything
and it will be fine. 

1249
01:32:26,600 --> 01:32:29,920
So in this case what the view 
transition like what my library 

1250
01:32:29,920 --> 01:32:34,000
is doing is that when you're 
navigating it's adding this back

1251
01:32:34,000 --> 01:32:38,400
class on the HTML and you can 
target that. 

1252
01:32:39,360 --> 01:32:46,000
So when you are navigating back,
it should add. 

1253
01:32:48,520 --> 01:32:53,000
I wonder if we should, I don't 
know if like it might be, but it

1254
01:32:53,000 --> 01:32:56,640
might also be that we need to 
add this in the other page. 

1255
01:32:56,720 --> 01:32:59,080
And that's why I was talking 
about the layout because the 

1256
01:32:59,080 --> 01:33:02,480
kind of stuff generally I don't 
know if like let let me see if 

1257
01:33:02,520 --> 01:33:06,720
it's actually. 
Also, is it always gonna be like

1258
01:33:06,720 --> 01:33:09,520
the forward slash 2? 
It might be empty. 

1259
01:33:09,680 --> 01:33:14,720
Oh yeah, I don't know like you 
can you can also log it maybe so

1260
01:33:15,600 --> 01:33:18,840
yeah, before checking it. 
If you do console log now dot 

1261
01:33:18,840 --> 01:33:32,720
navigation dot from dot route 
Yeah you I think you post the 

1262
01:33:32,720 --> 01:33:36,840
animation so. 
Oh yes, that caught us last time

1263
01:33:36,840 --> 01:33:40,080
too. 
It might be empty. 

1264
01:33:40,120 --> 01:33:42,000
Let's. 
See, let's see in the console 

1265
01:33:42,000 --> 01:33:46,320
what's what's what It's logged. 
Oh, actually, see. 

1266
01:33:46,400 --> 01:33:48,200
Yeah, there it goes. 
So slash. 

1267
01:33:49,240 --> 01:33:53,160
OK, let's go back to. 
Yeah, OK, so it is slash, but as

1268
01:33:53,160 --> 01:33:56,680
I was saying, like this is 
called whenever you are 

1269
01:33:56,680 --> 01:33:59,600
navigating, not when you are 
coming to the page. 

1270
01:34:00,200 --> 01:34:02,560
So it's getting. 
We either need to put these in 

1271
01:34:02,560 --> 01:34:05,160
the layout or we need to put it 
in the other page. 

1272
01:34:05,960 --> 01:34:08,880
So should we move? 
Is it easier just to move this? 

1273
01:34:09,000 --> 01:34:13,800
Yes, you can move it to the to 
the other page or you need to 

1274
01:34:13,960 --> 01:34:22,600
import classes there too. 
OK, now you can now target and I

1275
01:34:22,600 --> 01:34:27,760
think you need at this point you
need to you need to to to do NAV

1276
01:34:27,760 --> 01:34:30,880
dot navigation dot to root ID. 
Yeah. 

1277
01:34:31,000 --> 01:34:38,560
Thank you. 
OK so if we go back to the to 

1278
01:34:38,560 --> 01:34:42,080
the main page now basically what
we can do is we can target this 

1279
01:34:42,080 --> 01:34:46,120
dot back class before the view 
transition, old view transition,

1280
01:34:46,120 --> 01:34:50,440
new stuff basically. 
So if you go to the to the below

1281
01:34:50,520 --> 01:34:57,160
below, below below we can change
the CSS variables to change the 

1282
01:34:57,160 --> 01:35:00,800
from and to in case we are from 
a back navigation. 

1283
01:35:01,320 --> 01:35:04,880
So what you can do is instead of
doing dot root directly, you can

1284
01:35:04,880 --> 01:35:08,560
do dot back column root. 
OK, so should I do? 

1285
01:35:09,160 --> 01:35:15,280
Copy all of that, yes. 
And what you can do is you can 

1286
01:35:15,280 --> 01:35:20,040
do dot back. 
No, no, like it's still root. 

1287
01:35:20,040 --> 01:35:23,640
Like it's still the root view 
transition, but before the 

1288
01:35:23,640 --> 01:35:27,560
column root in the beginning of 
the line of the selector. 

1289
01:35:27,800 --> 01:35:31,720
You can put that dot back. 
With space, right? 

1290
01:35:33,520 --> 01:35:36,360
No, it needs to be attached like
needs to be this. 

1291
01:35:36,600 --> 01:35:41,560
OK, OK. 
And then OK. 

1292
01:35:41,600 --> 01:35:43,920
And now we want to change 
things, stuff. 

1293
01:35:43,960 --> 01:35:48,000
So I think, OK, so we want the 
one is the opposite. 

1294
01:35:48,000 --> 01:35:57,640
We want the new page to go from 
-100% to 0 and the old page to 

1295
01:35:57,640 --> 01:36:03,280
go from zero to 100%. 
Let's see if this works. 

1296
01:36:03,880 --> 01:36:06,720
All right, I'm just gonna 
refresh everything, make sure 

1297
01:36:08,120 --> 01:36:10,040
that way. 
Oh. 

1298
01:36:11,120 --> 01:36:22,760
OK, there is. 
Let me see. 

1299
01:36:25,040 --> 01:36:28,760
I think we we might have to 
leave this one to maybe some 

1300
01:36:28,760 --> 01:36:31,400
comments. 
Or we'll sorry, sorry. 

1301
01:36:32,040 --> 01:36:34,680
No, no, it's all good. 
It's just we're a little, we're 

1302
01:36:34,680 --> 01:36:37,480
a little over already. 
So, but we're powerful. 

1303
01:36:38,160 --> 01:36:42,040
Where can where can people find 
more about the actual? 

1304
01:36:43,040 --> 01:36:48,080
Yeah, I think it's 
github.com/polarituti slash. 

1305
01:36:48,080 --> 01:36:49,880
I will. 
I will send you the 

1306
01:36:49,880 --> 01:36:57,640
link.com/polariti. 
Feel free to put it in the like.

1307
01:36:57,800 --> 01:37:02,160
The spot level comments. 
I think it'll OK, that works. 

1308
01:37:03,080 --> 01:37:06,720
Copy that. 
Oh my gosh, I clicked print. 

1309
01:37:07,880 --> 01:37:12,000
So people, you can you can find 
more documentation out here. 

1310
01:37:12,800 --> 01:37:16,400
And then as always, we'll have 
our GitHub. 

1311
01:37:16,400 --> 01:37:18,880
We have one out there already, 
so I might just leave that one 

1312
01:37:18,880 --> 01:37:21,040
depending on how how different 
we did this. 

1313
01:37:21,560 --> 01:37:28,280
It'll be so it's coding cats 
coding cat dev slash felt view 

1314
01:37:28,280 --> 01:37:31,280
transition was our first one. 
I'll just make a second one too,

1315
01:37:31,320 --> 01:37:34,400
and that will be for this one. 
Check out both those. 

1316
01:37:34,400 --> 01:37:38,280
There's a slight differences in 
there, but really appreciate you

1317
01:37:38,280 --> 01:37:40,320
showing this. 
This is a really cool tool that 

1318
01:37:40,320 --> 01:37:43,040
you've created to reduce a lot 
of complexity. 

1319
01:37:43,520 --> 01:37:46,160
I. 
Think it's AI, think it's pretty

1320
01:37:46,160 --> 01:37:47,560
cool. 
I mean, I think in general the 

1321
01:37:47,560 --> 01:37:50,000
transition are pretty cool. 
They are kind of tricky to work 

1322
01:37:50,000 --> 01:37:54,160
with because in general like 
it's the the general API that is

1323
01:37:54,400 --> 01:37:58,000
kind of tricky. 
But I think like these are this 

1324
01:37:58,000 --> 01:38:01,640
library really add a bit of 
abstraction that really helped 

1325
01:38:01,640 --> 01:38:03,560
you. 
Yeah, totally. 

1326
01:38:04,200 --> 01:38:06,320
All right, peeps. 
Well, thank you and we'll see 

1327
01:38:06,320 --> 01:38:09,440
you next time. 
Thank you for having me and 

1328
01:38:09,440 --> 01:38:12,040
sorry for being a bit late. 
No, we're all good. 

1329
01:38:12,240 --> 01:38:12,440
See ya.
