Skip to content

Commit d73279c

Browse files
committed
Revert "Merge pull request thunderbird#10163 from wmontwe/remove/10073/side-rail-drawer-ui"
This reverts commit bd1d74a, reversing changes made to 79a18ca. This adds the rail UI back.
1 parent bd1d74a commit d73279c

File tree

74 files changed

+763
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+763
-4
lines changed

app-k9mail/src/debug/kotlin/app/k9mail/featureflag/K9FeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class K9FeatureFlagFactory : FeatureFlagFactory {
1818
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
1919
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2020
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
21+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2122
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
2223
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
2324
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),

app-k9mail/src/release/kotlin/app/k9mail/featureflag/K9FeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class K9FeatureFlagFactory : FeatureFlagFactory {
2121
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
2222
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2323
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
24+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2425
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
2526
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
2627
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),

app-thunderbird/src/beta/kotlin/net/thunderbird/android/featureflag/TbFeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
2121
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
2222
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2323
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
24+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2425
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
2526
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
2627
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),

app-thunderbird/src/daily/kotlin/net/thunderbird/android/featureflag/TbFeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
2121
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
2222
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2323
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
24+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2425
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
2526
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
2627
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),

app-thunderbird/src/debug/kotlin/net/thunderbird/android/featureflag/TbFeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
2121
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
2222
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2323
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
24+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2425
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = true),
2526
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = true),
2627
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),

app-thunderbird/src/release/kotlin/net/thunderbird/android/featureflag/TbFeatureFlagFactory.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class TbFeatureFlagFactory : FeatureFlagFactory {
2121
FeatureFlag("archive_marks_as_read".toFeatureFlagKey(), enabled = true),
2222
FeatureFlag("disable_font_size_config".toFeatureFlagKey(), enabled = true),
2323
FeatureFlag("email_notification_default".toFeatureFlagKey(), enabled = true),
24+
FeatureFlag("enable_dropdown_drawer_ui".toFeatureFlagKey(), enabled = true),
2425
FeatureFlag(FeatureFlagKey.DisplayInAppNotifications, enabled = false),
2526
FeatureFlag(FeatureFlagKey.UseNotificationSenderForSystemNotifications, enabled = false),
2627
FeatureFlag(MessageListFeatureFlags.UseComposeForMessageListItems, enabled = false),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package net.thunderbird.feature.navigation.drawer.siderail.ui.account
2+
3+
import androidx.compose.foundation.layout.height
4+
import androidx.compose.runtime.Composable
5+
import androidx.compose.ui.Modifier
6+
import androidx.compose.ui.graphics.Color
7+
import androidx.compose.ui.tooling.preview.Preview
8+
import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes
9+
import app.k9mail.core.ui.compose.theme2.MainTheme
10+
11+
@Composable
12+
@Preview(showBackground = true)
13+
internal fun SideRailAccountIndicatorPreview() {
14+
PreviewWithThemes {
15+
SideRailAccountIndicator(
16+
accountColor = Color.Unspecified,
17+
modifier = Modifier.height(MainTheme.spacings.double),
18+
)
19+
}
20+
}
21+
22+
@Composable
23+
@Preview(showBackground = true)
24+
internal fun SideRailAccountIndicatorPreviewWithYellowAccountColor() {
25+
PreviewWithThemes {
26+
SideRailAccountIndicator(
27+
accountColor = Color.Yellow,
28+
modifier = Modifier.height(MainTheme.spacings.double),
29+
)
30+
}
31+
}
32+
33+
@Composable
34+
@Preview(showBackground = true)
35+
internal fun SideRailAccountIndicatorPreviewWithGrayAccountColor() {
36+
PreviewWithThemes {
37+
SideRailAccountIndicator(
38+
accountColor = Color.Gray,
39+
modifier = Modifier.height(MainTheme.spacings.double),
40+
)
41+
}
42+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package net.thunderbird.feature.navigation.drawer.siderail.ui.account
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.Preview
5+
import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes
6+
import net.thunderbird.feature.navigation.drawer.dropdown.ui.FakeData.MAIL_DISPLAY_ACCOUNT
7+
8+
@Composable
9+
@Preview(showBackground = true)
10+
internal fun SideRailAccountListItemPreview() {
11+
PreviewWithThemes {
12+
SideRailAccountListItem(
13+
account = MAIL_DISPLAY_ACCOUNT,
14+
onClick = { },
15+
selected = false,
16+
)
17+
}
18+
}
19+
20+
@Composable
21+
@Preview(showBackground = true)
22+
internal fun SideRailAccountListItemSelectedPreview() {
23+
PreviewWithThemes {
24+
SideRailAccountListItem(
25+
account = MAIL_DISPLAY_ACCOUNT,
26+
onClick = { },
27+
selected = true,
28+
)
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package net.thunderbird.feature.navigation.drawer.siderail.ui.account
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.Preview
5+
import app.k9mail.core.ui.compose.designsystem.PreviewWithTheme
6+
import kotlinx.collections.immutable.persistentListOf
7+
import net.thunderbird.feature.navigation.drawer.dropdown.ui.FakeData.MAIL_DISPLAY_ACCOUNT
8+
9+
@Composable
10+
@Preview(showBackground = true)
11+
internal fun SideRailAccountListPreview() {
12+
PreviewWithTheme {
13+
SideRailAccountList(
14+
accounts = persistentListOf(
15+
MAIL_DISPLAY_ACCOUNT,
16+
),
17+
selectedAccount = null,
18+
onAccountClick = { },
19+
onSettingsClick = { },
20+
onSyncAllAccountsClick = { },
21+
)
22+
}
23+
}
24+
25+
@Composable
26+
@Preview(showBackground = true)
27+
internal fun SideRailAccountListWithSelectedPreview() {
28+
PreviewWithTheme {
29+
SideRailAccountList(
30+
accounts = persistentListOf(
31+
MAIL_DISPLAY_ACCOUNT,
32+
),
33+
selectedAccount = MAIL_DISPLAY_ACCOUNT,
34+
onAccountClick = { },
35+
onSettingsClick = { },
36+
onSyncAllAccountsClick = { },
37+
)
38+
}
39+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package net.thunderbird.feature.navigation.drawer.siderail.ui.account
2+
3+
import androidx.compose.runtime.Composable
4+
import androidx.compose.ui.tooling.preview.Preview
5+
import app.k9mail.core.ui.compose.designsystem.PreviewWithThemes
6+
import net.thunderbird.feature.navigation.drawer.dropdown.ui.FakeData.MAIL_DISPLAY_ACCOUNT
7+
8+
@Composable
9+
@Preview(showBackground = true)
10+
internal fun SideRailAccountViewPreview() {
11+
PreviewWithThemes {
12+
SideRailAccountView(
13+
account = MAIL_DISPLAY_ACCOUNT,
14+
onClick = {},
15+
showAvatar = false,
16+
)
17+
}
18+
}
19+
20+
@Composable
21+
@Preview(showBackground = true)
22+
internal fun SideRailAccountViewWithColorPreview() {
23+
PreviewWithThemes {
24+
SideRailAccountView(
25+
account = MAIL_DISPLAY_ACCOUNT,
26+
onClick = {},
27+
showAvatar = false,
28+
)
29+
}
30+
}
31+
32+
@Composable
33+
@Preview(showBackground = true)
34+
internal fun SideRailAccountViewWithLongDisplayName() {
35+
PreviewWithThemes {
36+
SideRailAccountView(
37+
account = MAIL_DISPLAY_ACCOUNT,
38+
onClick = {},
39+
showAvatar = false,
40+
)
41+
}
42+
}
43+
44+
@Composable
45+
@Preview(showBackground = true)
46+
internal fun SideRailAccountViewWithLongEmailPreview() {
47+
PreviewWithThemes {
48+
SideRailAccountView(
49+
account = MAIL_DISPLAY_ACCOUNT,
50+
onClick = {},
51+
showAvatar = false,
52+
)
53+
}
54+
}

0 commit comments

Comments
 (0)