Claude Code for Product Designers
Lesson 13 of 49, 0 of 49 lessons completed
Sign in
Watch on YouTubePlay

Plays from YouTube. Google's privacy policy (opens in a new tab) applies.

Up next

1.9 From the browser to Figma and back

Next lesson in 8 s

1.8 The phone layout

With no phone design in Figma, Adam has his main session start a sub-session for the mobile layout, where Claude shows sketch options and asks questions he answers as the designer. Claude then builds it in phases, and Adam checks it at desktop, tablet and phone widths.

What you'll learn

  1. You don't need every screen in Figma; a good design system lets Claude extend it in code.
  2. A session can create a sub-session for a new topic while staying in the loop.
  3. Stop a session that starts too early, switch it to Plan mode, and restate the brief.
  4. Claude can show visual sketch options before planning.
  5. Answer layout questions from the main use case (booking on the day or the day before).
  6. Sometimes reviewing the built result is faster than reading a long plan.
  7. Check the result at desktop, tablet and phone widths.

Chapters

  1. 00:00Designing mobile without a mockup
  2. 02:08Starting a sub-session in Plan mode
  3. 05:28Comparing visual sketch options
  4. 07:56Answering Claude's layout questions
  5. 09:19Building it in five phases
  6. 11:08Checking desktop, tablet and phone
  1. 00:00Okay, so our desktop implementation is coming together quite nicely.
  2. 00:04We're actually reaching a point in which we'll have to talk about making our first commit and working with Git in general.
  3. 00:12But before we, you know, call it a day for that V one implementation, there is one last thing that I would like us to take care of, which is
  4. 00:19the mobile layout. Now, I don't have any designs in Figma for what a mobile layout could look like for this parking application.
  5. 00:27And this is very much on purpose.
  6. 00:29And I am hoping that in this video, we are going to take a look on how Claude Code when, you know, handed a pretty decent design system.
  7. 00:38So solid set of basic UI components as well as color variables can, you know, start helping it can actually help expedite our design iterations in code directly.
  8. 00:52And the mobile layout is going to be one example of working this way.
  9. 00:57So I'm going to come back to Claude Code desktop application.
  10. 01:01And here is the thing.
  11. 01:03So all this time, everything we've been discussing about this first initial implementation has been happening within one singular Claude Code session.
  12. 01:12It's okay because through auto things like auto compaction, we are only at 13% of our context window.
  13. 01:19But working on a mobile layout is conceptually, you know, such a new and such a different thing that I would really like to discuss it with a different agent.
  14. 01:30However, I would like this main agent to be included and always be in the loop of, you know, whatever we are working on on this mobile layout and step
  15. 01:40in with the context it has whenever that order agent is going to require or need it.
  16. 01:47So there is a pretty neat way in Claude Code to do that.
  17. 01:52So rather than just starting a new session or continuing the conversation in this one, I'm going to ask this Claude Code session to create a new like a like
  18. 02:02a new body that we'll we're going to be able to talk to independently and yet this agent is going to be kept in the loop.
  19. 02:11Okay, thank you Claude.
  20. 02:12Um now I would like to start working on the mobile layout um and I would like to handle this implementation with a new sub session.
  21. 02:22Can you create a new session for me uh such that you will be included in the loop and will know what is happening on that mobile design front?
  22. 02:35Okay. I'm going to send it right away hoping that Claude will be uh able to understand me.
  23. 02:42Uh let's see. Okay, it took a little bit of time.
  24. 02:46I guess we have some internet connection issues today in the office but it has done the thing.
  25. 02:52So it has created a new sub session and I can actually see it here in the layout.
  26. 02:56It shows up as a nested session.
  27. 02:58Um it gave it like the first initial prompt.
  28. 03:01Oh and it says build a mobile phone layout.
  29. 03:04So I'm going to stop it because I don't want this session to get into building right away.
  30. 03:08I actually want to go back to the plan mode here and I'm going to actually change this effort to high.
  31. 03:18Um okay, so let's um let's start with our basic prompt.
  32. 03:25Uh okay, it seems like again that main session has already tried to um uh try to instruct this agent on a couple of things.
  33. 03:35I'm just going to restate the problem and I'm going to ask it to uh do a proper exploration and planning with me.
  34. 03:43Uh hey Claude, as you already know in this session I would like you to work on uh building a mobile layout for this application.
  35. 03:51I would like you to explore the code base um analyze the options we have, ask me questions, plan the implementation and then implement it in phases.
  36. 04:05Okay. Really the only reason I left this message is to put emphasis on two things, plan and asking me questions.
  37. 04:13I would like Claude to suggest things for us to consider.
  38. 04:18Um, okay, so let's give it a second.
  39. 04:23Right, um, so there is an interesting thing happening here.
  40. 04:26Okay, I'm going to allow again yeah, it actually wants to use Figma.
  41. 04:32Um, I should have probably mentioned that we don't have Figma designs for this.
  42. 04:35This is probably why it wants to read through Figma files.
  43. 04:39Okay, that's that's okay.
  44. 04:40Um, what I wanted to um, what I wanted to emphasize is that that like a little sentence, I'll read the key files directly.
  45. 04:48Why it's here? Well, typically Claude is going to spawn sub agents spontaneously when it wants to like do an exploration.
  46. 04:57Rather than having this agent read through tons of file itself, it's going to create a couple of sub agents and it's going to ask these sub agents to read
  47. 05:06these files and come back to it with just a plain summary of you know what we are working with.
  48. 05:12But since this code base is small as this Claude agent has noticed, um, it actually decided that it's going to be easier and faster if it reads all of
  49. 05:21these files itself. Um, okay.
  50. 05:24Right, this is an interesting thing happening.
  51. 05:28Uh, so Claude code is going to probably take a stab at um, creating sketch options.
  52. 05:35This is going to be fun.
  53. 05:37Oh, I just hit escape accidentally.
  54. 05:39Sorry, carry on. Um, so we are going to have an opportunity to review like different options before actually committing uh, to them.
  55. 05:51Let's see how it comes out.
  56. 05:54Okay, uh, again because Claude code is in this planning mode, it's going to throw plenty of plenty of um, um, asking for permissions kind of things.
  57. 06:06Okay, this is a really nice way to preview our options before actually um committing to any of them.
  58. 06:15Seems like Claude is um uh Claude has put these up in order to uh help us make a better decision.
  59. 06:22First of all, let's take a look at what's going on here.
  60. 06:25We have two options, A and B.
  61. 06:27Um one screen plus details sheet.
  62. 06:30Okay, let's see. This is an interesting approach.
  63. 06:33So we select days through a horizontal scroll, and then we select parking spots like this, and then the details panel is displayed through um a drawer.
  64. 06:45Okay, that's interesting. Option B is having like okay, I can see uh so we first of all have a list of days, and then we um have a list
  65. 06:55of parking spots. Um okay, got it.
  66. 06:59I see. That's an interesting that's an interesting design choice.
  67. 07:02So I would say um reading like I would say like option B is probably more convenient if I really want to uh check the availability for a couple of
  68. 07:14different days, and I really need to switch in between days quite quickly.
  69. 07:18This is because uh horizontal like vertical scroll is a bit more of a natural gesture, as we all know, uh as opposed to having like doing the the the
  70. 07:27horizontal scroll. Um in this case, um imagining that the um primary use case for this application is going to be to log in either on the day of your
  71. 07:37arrival uh into the office or maybe the day before.
  72. 07:42And in this case, I believe having the ability to see parking spots right away is going to be a little bit better.
  73. 07:49So I'm going to follow Claude's recommendation here and go with option A.
  74. 07:53But first, let's see what kind of question it has.
  75. 07:56So which phone flow?
  76. 07:57Okay, so the first question is about this exact thing.
  77. 08:00So I'm going to just hit A.
  78. 08:02Uh if we go with A, should uh people pick a day on a phone?
  79. 08:07Um how should people a day on a phone?
  80. 08:10So we have swipable strip or tap to open a day list.
  81. 08:15Okay, I'm going to go with a swipable strip here.
  82. 08:18Um, let's go. Uh, the parking spot cards are 216 pixels tall on the desktop.
  83. 08:25How should they look like on a phone?
  84. 08:28Uh, they should definitely be a bit more compact.
  85. 08:31Um, we should have like Claude suggests three parking spots per row.
  86. 08:36Um, I'm not sure if that is a good idea.
  87. 08:39I would say two two cards per row for a mobile layout.
  88. 08:44Three that sounds a bit cramped.
  89. 08:48Uh, and then on a phone, what happens after someone taps confirm and book?
  90. 08:53We're going to close the sheet and throw a toast or keep the sheet open.
  91. 08:57I'm going to go with closing the sheet and throwing a toast.
  92. 09:02So these are exactly the types of questions that I really wanted to see Claude me asking.
  93. 09:09Uh, it's making me much more convenient about the final shape of the implementation.
  94. 09:17Uh, okay, I'm going to close this and I'm going to let Claude write its own plan.
  95. 09:21Another nice thing about working with like sub sessions is that this Claude, like the main session, can still keep an eye on the original plan we've been building, which
  96. 09:33we have over here.
  97. 09:35And then this Claude session can be working around a totally different plan which we don't have yet, but it would it's going to it's going to come up very
  98. 09:44shortly. Okay, writing the plan now.
  99. 09:48Let's give it a sec.
  100. 09:51Okay, the plan is ready.
  101. 09:53We can skim it or we can actually use the accept and auto mode.
  102. 09:59I feel like I've already have seen enough, so I'm quite confident in the plan.
  103. 10:04It's going to be actually a little bit faster for me to review the implementation sometimes and address on like the real thing rather than taking a few minutes to
  104. 10:13go through a long wall of text.
  105. 10:16So, it's broken this down into five phases.
  106. 10:18I didn't ask it to work with sub-agents here because I don't believe it's that much of a big deal here.
  107. 10:26And we can see, you know, Claude is also handling or it appears it's going to be handling all of the work itself.
  108. 10:33So, let's wait around and see what is the end result going to be looking like.
  109. 10:42Okay, seems like my Claude decided to take a pause between each phases.
  110. 10:46I'm going to say, yeah, just carry on with all the phases and pause when the work is finished all together.
  111. 11:03Okay. Okay, my Claude has finished.
  112. 11:09Let's go ahead and take a look.
  113. 11:11I'm going to actually use this browser here.
  114. 11:14Okay, and I can already see this thing working.
  115. 11:17Let me switch over to a wider browser so that we can see.
  116. 11:22Okay. So, over here we have a nice desktop layout and then let's see.
  117. 11:29And then we have the the tablet layout and then we have the mobile layout.
  118. 11:37Okay, so I can see the number of spots in a grid is changing depending on the viewport size.
  119. 11:45And let's see. I 'm going to use my touchpad here to scroll left and right.
  120. 11:52Okay, I really like how this is not clipped here and yet we are and that we allow for these elements to go slightly like outside of the parent container.
  121. 12:03Seems like my Claude decided to use a bit of like a snap scrolling with CSS, which is a really nice touch I wasn't expecting.
  122. 12:11And let's see how changing between days works.
  123. 12:14Okay, very nice. Okay, perfect.
  124. 12:18Okay, it seems like I'm quite happy with this implementation.
  125. 12:21Now let's go ahead and and try uh let's go ahead and try actually booking a place.
  126. 12:27So I'm going to book a spot here.
  127. 12:31I can see a nice drawer coming from the bottom.
  128. 12:36All right. Okay, let's see.
  129. 12:39I'm going to just leave it with the default data.
  130. 12:43I'm going to hit confirm and book.
  131. 12:45Okay, booking confirmed at the top.
  132. 12:47Okay, and then let me see.
  133. 12:49This is my booking, so I'm going to delete it.
  134. 12:52Okay, that's nice. Right.
  135. 12:57Okay. So it looks cool.
  136. 13:02Okay, I think I like the general shape of this implementation.
  137. 13:07Everything works, so that is definitely a good thing.
  138. 13:11I like these micro micro interactions.
  139. 13:16I don't necessarily like the layout, however.
  140. 13:18This feels like very packed, very like we are definitely running short on the empty space.
  141. 13:25And there are a couple of things that I would like to iron out, but it would be quite tedious for me to keep describing this using my own words.
  142. 13:33So that 's why in the next video we're going to take a look at how we can, you know, go back to Figma and just keep coming back between
  143. 13:41Figma and real living implementation to iterate a little bit faster with Claude Code.
  144. 13:48So thank you so much and I'll see you in the next video.

The cheat sheet is for signed-in viewers. Inside: the lesson's prompts ready to reuse, the commands and shortcuts, useful links and what to watch out for.

Sign in to get the cheat sheet

Loading the cheat sheet…