refactor: core UI common#10942
Open
wmontwe wants to merge 6 commits into
Open
Conversation
… modifier to onboarding permissions module
^ Conflicts: ^ feature/navigation/drawer/dropdown/src/main/kotlin/net/thunderbird/feature/navigation/drawer/dropdown/ui/DrawerContent.kt
… common UI components
8acb94b to
e225f62
Compare
Contributor
|
✅ Validation Passed: All report and feature-flag labels are correctly set. |
rafaeltonholo
requested changes
May 5, 2026
Member
rafaeltonholo
left a comment
There was a problem hiding this comment.
There is a crash happening now because of the changes in the CalculateWindowSizeInfo.kt. Everything else is good.
| return remember(windowInfo) { | ||
| WindowSizeInfo( | ||
| screenWidthSizeClass = WindowSizeClass.fromWidth(windowInfo.containerSize.width), | ||
| screenHeightSizeClass = WindowSizeClass.fromHeight(windowInfo.containerSize.height), |
Member
There was a problem hiding this comment.
This is causing the app to crash due to an IllegalArgumentException. The previous version used configuration.screenWidthDp and configuration.screenHeightDp, but we are now using the pixel values, which is leading to this issue.
Stacktrace:
FATAL EXCEPTION: main
Process: net.thunderbird.android.debug, PID: 13363
java.lang.IllegalArgumentException: Padding must be non-negative
at androidx.compose.foundation.layout.internal.InlineClassHelperKt.throwIllegalArgumentException(InlineClassHelper.kt:34)
at androidx.compose.foundation.layout.PaddingValuesImpl.<init>(Padding.kt:479)
at androidx.compose.foundation.layout.PaddingValuesImpl.<init>(Padding.kt:0)
at androidx.compose.foundation.layout.PaddingKt.PaddingValues-YgX7TsA(Padding.kt:280)
at androidx.compose.foundation.layout.PaddingKt.PaddingValues-YgX7TsA$default(Padding.kt:279)
at net.thunderbird.core.ui.common.padding.CalculateResponsivePaddingKt.calculateResponsiveWidthPadding(CalculateResponsivePadding.kt:19)
at app.k9mail.core.ui.compose.designsystem.template.ResponsiveContentKt.ExpandedContent$lambda$1$0(ResponsiveContent.kt:107)
at app.k9mail.core.ui.compose.designsystem.template.ResponsiveContentKt.$r8$lambda$olhqj8zKdH2OFb37DfkmQIzTcjA(ResponsiveContent.kt:0)
at app.k9mail.core.ui.compose.designsystem.template.ResponsiveContentKt$$ExternalSyntheticLambda4.invoke(D8$$SyntheticClass:0)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:122)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:130)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:110)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:122)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.kt:52)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:378)
at androidx.compose.material3.SurfaceKt.Surface-T9BRK9s(Surface.kt:107)
at app.k9mail.core.ui.compose.designsystem.atom.SurfaceKt.Surface-_UMDTes(Surface.kt:50)
at app.k9mail.core.ui.compose.designsystem.template.ResponsiveContentKt.ExpandedContent(ResponsiveContent.kt:102)
at app.k9mail.core.ui.compose.designsystem.template.ResponsiveContentKt.ResponsiveContent(ResponsiveContent.kt:37)
at app.k9mail.feature.onboarding.welcome.ui.WelcomeContentKt.WelcomeContent$lambda$0(WelcomeContent.kt:50)
Member
Author
There was a problem hiding this comment.
This code was sitting on my shelf for a while. I think I'll need pull in changes done at a later time, that will fix this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #10392
This pull request refactors and reorganizes the core UI 'common' utilities, moving shared code out of the
app.k9mailnamespace into the newnet.thunderbird.core.ui.commonpackage.core/ui/common: movePreviewDevices*annotations andWindowSizeClass(now backed by a newWindowSizeInfo) into the module, and extend it with aCalculateWindowSizeInfohelper.core/ui/compose/commonpieces:BaselineModifier,ImageWithBaseline,ImageWithOverlayCoordinate,VisibilityModifiers,IconsWithBaseline, andIconsWithBottomRightOverlay. These switched to plain Icons/vertical alignment.DelayedCircularProgressIndicatorand the hide modifier into theonboarding-permissionsmodule and update feature modules to depend oncore:ui:commonwhere needed.testTagAsResourceIdas it's semantic changes are redundant and only need to be applied once on the outmost composable. UsetestTaginstead.