Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Organized core:ui:common module #294

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/org/mozilla/social/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.launch
import org.koin.androidx.compose.KoinAndroidContext
import org.koin.androidx.viewmodel.ext.android.viewModel
import org.mozilla.social.core.designsystem.component.MoSoSurface
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.ui.common.MoSoSurface
import org.mozilla.social.ui.MainActivityScreen
import timber.log.Timber

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import org.mozilla.social.common.utils.mosoFadeIn
import org.mozilla.social.common.utils.mosoFadeOut
import org.mozilla.social.core.designsystem.component.MoSoSurface
import org.mozilla.social.core.ui.common.MoSoSurface
import org.mozilla.social.core.navigation.BottomBarNavigationDestination
import org.mozilla.social.core.navigation.NavigationDestination
import org.mozilla.social.feature.account.myAccountScreen
import org.mozilla.social.feature.discover.discoverScreen
import org.mozilla.social.feed.feedScreen
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/mozilla/social/ui/AppState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import org.koin.compose.koinInject
import org.mozilla.social.common.utils.StringFactory
import org.mozilla.social.core.designsystem.component.MoSoSnackbarHostState
import org.mozilla.social.core.designsystem.component.SnackbarType
import org.mozilla.social.core.navigation.AuthNavigationDestination
import org.mozilla.social.core.navigation.AuthNavigationDestination.ChooseServer.navigateToChooseServerScreen
import org.mozilla.social.core.navigation.AuthNavigationDestination.Login.navigateToLoginScreen
Expand All @@ -45,6 +43,8 @@ import org.mozilla.social.core.navigation.SettingsNavigationDestination.ContentP
import org.mozilla.social.core.navigation.SettingsNavigationDestination.MainSettings.navigateToMainSettings
import org.mozilla.social.core.navigation.SettingsNavigationDestination.MutedUsersSettings.navigateToMutedUsers
import org.mozilla.social.core.navigation.SettingsNavigationDestination.PrivacySettings.navigateToPrivacySettings
import org.mozilla.social.core.ui.common.snackbar.MoSoSnackbarHostState
import org.mozilla.social.core.ui.common.snackbar.SnackbarType
import timber.log.Timber

@Composable
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/org/mozilla/social/ui/MainActivityScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import org.mozilla.social.MainViewModel
import org.mozilla.social.core.designsystem.component.MoSoSnackbar
import org.mozilla.social.core.designsystem.component.MoSoSnackbarHost
import org.mozilla.social.core.ui.common.snackbar.MoSoSnackbar
import org.mozilla.social.core.ui.common.snackbar.MoSoSnackbarHost
import org.mozilla.social.navigation.MainNavHost
import org.mozilla.social.ui.bottombar.MoSoNavigationBarDefaults.bottomBarPadding

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import org.koin.compose.koinInject
import org.mozilla.social.core.designsystem.component.MoSoDivider
import org.mozilla.social.core.navigation.BottomBarNavigationDestination
import org.mozilla.social.core.navigation.NavigationDestination
import org.mozilla.social.core.navigation.usecases.NavigateTo
import org.mozilla.social.core.ui.common.divider.MoSoDivider
import org.mozilla.social.navigation.BottomTabNavHost
import org.mozilla.social.ui.AppState

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import org.mozilla.social.common.utils.StringFactory
import org.mozilla.social.core.designsystem.component.MoSoSurface
import org.mozilla.social.core.ui.common.MoSoSurface
import org.mozilla.social.core.designsystem.icon.MoSoIcons
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.navigation.BottomBarNavigationDestination
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package org.mozilla.social.core.designsystem.theme
import androidx.compose.ui.unit.dp

object MoSoRadius {
val sm = 4.dp
val md = 8.dp
val lg = 16.dp
val full = 360.dp
val sm_4_dp = 4.dp
val md_8_dp = 8.dp
val lg_16_dp = 16.dp
val full_360_dp = 360.dp
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.layout.RowScope
import androidx.compose.material3.Badge
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.ColumnScope
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.interaction.MutableInteractionSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.material3.Divider
import androidx.compose.material3.Tab
import androidx.compose.material3.TabPosition
import androidx.compose.material3.TabRow
Expand All @@ -15,6 +14,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.tooling.preview.Preview
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.ui.common.divider.MoSoDivider

@Composable
fun MoSoTabRow(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import org.mozilla.social.core.designsystem.component.LargeTextBody
import org.mozilla.social.core.designsystem.component.MediumTextBody
import org.mozilla.social.core.designsystem.theme.MoSoSpacing
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.ui.common.text.LargeTextBody
import org.mozilla.social.core.ui.common.text.MediumTextBody
import org.mozilla.social.core.ui.common.utils.PreviewTheme

@Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common.appbar

import androidx.compose.foundation.layout.RowScope
import androidx.compose.material3.CenterAlignedTopAppBar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.sp
import org.koin.compose.koinInject
import org.mozilla.social.core.designsystem.R
import org.mozilla.social.core.designsystem.component.MoSoDivider
import org.mozilla.social.core.designsystem.icon.MoSoIcons
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.navigation.usecases.PopNavBackstack
import org.mozilla.social.core.ui.common.divider.MoSoDivider

/**
* Top app bar which defaults to showing an X button which defaults to popping the navigation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common.button

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.interaction.MutableInteractionSource
Expand All @@ -9,10 +9,8 @@ import androidx.compose.material3.Button
import androidx.compose.material3.ButtonColors
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.ButtonElevation
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Shape
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common.button

import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.material3.RadioButton
Expand All @@ -9,6 +9,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import org.mozilla.social.core.designsystem.theme.MoSoTheme
import org.mozilla.social.core.ui.common.MoSoSurface

@Composable
fun MoSoRadioButton(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common.divider

import androidx.compose.material3.Divider
import androidx.compose.runtime.Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.ui.common
package org.mozilla.social.core.ui.common.divider

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
Expand All @@ -13,7 +13,7 @@ import androidx.compose.ui.unit.dp
import org.mozilla.social.core.designsystem.theme.MoSoTheme

@Composable
fun VerticalDivider(
fun MoSoVerticalDivider(
modifier: Modifier = Modifier,
color: Color = MoSoTheme.colors.borderPrimary,
thickness: Dp = 1.dp
Expand All @@ -30,6 +30,6 @@ fun VerticalDivider(
@Composable
private fun VerticalDividerPreview() {
MoSoTheme {
VerticalDivider()
MoSoVerticalDivider()
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.ui.common
package org.mozilla.social.core.ui.common.dropdown

import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.mozilla.social.core.designsystem.component
package org.mozilla.social.core.ui.common.dropdown

import androidx.compose.foundation.background
import androidx.compose.foundation.interaction.MutableInteractionSource
Expand Down
Loading