Skip to content

Commit 8e99f2b

Browse files
chore: add platform tabs for CMP screenshots (#424)
1 parent 15f72c7 commit 8e99f2b

File tree

2 files changed

+51
-20
lines changed

2 files changed

+51
-20
lines changed

topics/compose-onboard/compose-multiplatform-modify-project.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,17 @@ To use the `kotlinx-datetime` library:
144144
145145
You can now rerun the application using the same run configurations for Android, iOS, desktop, and web:
146146
147-
![First Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-2.png){width=500}
148-
149-
![First Compose Multiplatform app on desktop](first-compose-project-on-desktop-2.png){width=400}
150-
151-
![First Compose Multiplatform app on web](first-compose-project-on-web-2.png){width=400}
147+
<tabs>
148+
<tab id="mobile-app" title="Android and iOS">
149+
<img src="first-compose-project-on-android-ios-2.png" alt="First Compose Multiplatform app on Android and iOS" width="500"/>
150+
</tab>
151+
<tab id="desktop-app" title="Desktop">
152+
<img src="first-compose-project-on-desktop-2.png" alt="First Compose Multiplatform app on desktop" width="400"/>
153+
</tab>
154+
<tab id="web-app" title="Web">
155+
<img src="first-compose-project-on-web-2.png" alt="First Compose Multiplatform app on web" width="400"/>
156+
</tab>
157+
</tabs>
152158
153159
<!--
154160
> You can find this state of the project in our [GitHub repository](https://github.com/kotlin-hands-on/get-started-with-cm/tree/main/ComposeDemoStage1).

topics/compose-onboard/compose-multiplatform-new-project.md

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,14 @@ a `TextField` composable:
143143
2. Follow the IDE's instructions to import the missing dependencies.
144144
3. Run the application on each platform you're targeting:
145145
146-
![User input in the Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-4.png){width=500}
147-
148-
![User input in the Compose Multiplatform app on desktop](first-compose-project-on-desktop-5.png){width=350}
146+
<tabs>
147+
<tab id="mobile-user-input" title="Android and iOS">
148+
<img src="first-compose-project-on-android-ios-4.png" alt="User input in the Compose Multiplatform app on Android and iOS" width="500"/>
149+
</tab>
150+
<tab id="desktop-user-input" title="Desktop">
151+
<img src="first-compose-project-on-desktop-5.png" alt="User input in the Compose Multiplatform app on desktop" width="350"/>
152+
</tab>
153+
</tabs>
149154
150155
## Calculate time
151156
@@ -209,9 +214,14 @@ The next step is to use the given input to calculate time. To do this, create a
209214
5. Run the application again and enter a valid timezone.
210215
6. Click the button. You should see the correct time:
211216

212-
![Time display in the Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-5.png){width=500}
213-
214-
![Time display in the Compose Multiplatform app on desktop](first-compose-project-on-desktop-6.png){width=350}
217+
<tabs>
218+
<tab id="mobile-time-display" title="Android and iOS">
219+
<img src="first-compose-project-on-android-ios-5.png" alt="Time display in the Compose Multiplatform app on Android and iOS" width="500"/>
220+
</tab>
221+
<tab id="desktop-time-display" title="Desktop">
222+
<img src="first-compose-project-on-desktop-6.png" alt="Time display in the Compose Multiplatform app on desktop" width="350"/>
223+
</tab>
224+
</tabs>
215225

216226
## Improve the style
217227

@@ -264,9 +274,14 @@ time message could be rendered more prominently.
264274
265275
3. Run the application to see how the appearance has improved:
266276
267-
![Improved style of the Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-6.png){width=500}
268-
269-
![Improved style of the Compose Multiplatform app on desktop](first-compose-project-on-desktop-7.png){width=350}
277+
<tabs>
278+
<tab id="mobile-improved-style" title="Android and iOS">
279+
<img src="first-compose-project-on-android-ios-6.png" alt="Improved style of the Compose Multiplatform app on Android and iOS" width="500"/>
280+
</tab>
281+
<tab id="desktop-improved-style" title="Desktop">
282+
<img src="first-compose-project-on-desktop-7.png" alt="Improved style of the Compose Multiplatform app on desktop" width="350"/>
283+
</tab>
284+
</tabs>
270285
271286
<!--
272287
> You can find this state of the project in our [GitHub repository](https://github.com/kotlin-hands-on/get-started-with-cm/tree/main/ComposeDemoStage2).
@@ -356,9 +371,14 @@ list.
356371
2. Follow the IDE's instructions to import the missing dependencies.
357372
3. Run the application to see the redesigned version:
358373

359-
![The country list in the Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-7.png){width=500}
360-
361-
![The country list in the Compose Multiplatform app on desktop](first-compose-project-on-desktop-8.png){width=350}
374+
<tabs>
375+
<tab id="mobile-country-list" title="Android and iOS">
376+
<img src="first-compose-project-on-android-ios-7.png" alt="The country list in the Compose Multiplatform app on Android and iOS" width="500"/>
377+
</tab>
378+
<tab id="desktop-country-list" title="Desktop">
379+
<img src="first-compose-project-on-desktop-8.png" alt="The country list in the Compose Multiplatform app on desktop" width="350"/>
380+
</tab>
381+
</tabs>
362382

363383
<!--
364384
> You can find this state of the project in our [GitHub repository](https://github.com/kotlin-hands-on/get-started-with-cm/tree/main/ComposeDemoStage3).
@@ -479,9 +499,14 @@ code to load and display them:
479499
5. Follow the IDE's instructions to import the missing dependencies.
480500
6. Run the application to see the new behavior:
481501
482-
![The country flags in the Compose Multiplatform app on Android and iOS](first-compose-project-on-android-ios-8.png){width=500}
483-
484-
![The country flags in the Compose Multiplatform app on desktop](first-compose-project-on-desktop-9.png){width=350}
502+
<tabs>
503+
<tab id="mobile-flags" title="Android and iOS">
504+
<img src="first-compose-project-on-android-ios-8.png" alt="The country flags in the Compose Multiplatform app on Android and iOS" width="500"/>
505+
</tab>
506+
<tab id="desktop-flags" title="Desktop">
507+
<img src="first-compose-project-on-desktop-9.png" alt="The country flags in the Compose Multiplatform app on desktop" width="350"/>
508+
</tab>
509+
</tabs>
485510
486511
<!--
487512
> You can find this state of the project in our [GitHub repository](https://github.com/kotlin-hands-on/get-started-with-cm/tree/main/ComposeDemoStage4).

0 commit comments

Comments
 (0)