Skip to content

Migrate to navigation3 - #31

Merged
Syntey merged 3 commits into
mainfrom
feature/navigation3
Jun 15, 2026
Merged

Syntey merged 3 commits into
mainfrom
feature/navigation3

Conversation

@Syntey

@Syntey Syntey commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +12 to +22
/**
* Renders a spacer in Column-based layouts.
*/
@Composable
fun ColumnScope.VerticalSpacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.height(size))

/**
* Renders a spacer in Row-based layouts.
*/
@Composable
fun RowScope.HorizontalSpacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.width(size))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protip from sinasamaki's mDC workshop https://github.com/sinasamaki/MDevCampWorkshop/blob/main/shared/src/commonMain/kotlin/com/sinasamaki/mdevcampworkshop/util/Spacer.kt

Suggested change
/**
* Renders a spacer in Column-based layouts.
*/
@Composable
fun ColumnScope.VerticalSpacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.height(size))
/**
* Renders a spacer in Row-based layouts.
*/
@Composable
fun RowScope.HorizontalSpacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.width(size))
/**
* Renders a spacer in Column-based layouts.
*/
@Composable
fun ColumnScope.Spacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.height(size))
/**
* Renders a spacer in Row-based layouts.
*/
@Composable
fun RowScope.Spacer(size: Dp, modifier: Modifier = Modifier) = Spacer(modifier = modifier.width(size))

works the same way thanks to Scope, no need to choose between horizontal and vertical variant

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, but I'll do it in the next PR.

Base automatically changed from feature/ktor to main June 15, 2026 10:05
@Syntey
Syntey merged commit e1ea731 into main Jun 15, 2026
1 check passed
@Syntey
Syntey deleted the feature/navigation3 branch June 15, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants