Skip to content

Commit

Permalink
[#551] Review: Rename LocalOdsGuideline into LocalGuideline
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinea committed Jan 16, 2024
1 parent 21c8928 commit 132db98
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/orange/ods/app/ui/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fun MainScreen(themeConfigurations: Set<OdsThemeConfigurationContract>, mainView
LocalConfiguration provides configuration,
LocalAppBarManager provides mainState.appBarState,
LocalThemeManager provides mainState.themeState,
LocalOdsGuideline provides mainState.themeState.currentThemeConfiguration.guideline,
LocalGuideline provides mainState.themeState.currentThemeConfiguration.guideline,
LocalRecipes provides mainViewModel.recipes,
LocalCategories provides mainViewModel.categories,
LocalUiFramework provides mainState.uiFramework
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/orange/ods/app/ui/ThemeState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import com.orange.ods.theme.OdsThemeConfigurationContract
import com.orange.ods.theme.guideline.OdsGuideline

val LocalThemeManager = staticCompositionLocalOf<ThemeManager> { error("CompositionLocal LocalThemeManager not present") }
val LocalOdsGuideline = staticCompositionLocalOf<OdsGuideline> { error("CompositionLocal LocalOdsGuideline not present") }
val LocalGuideline = staticCompositionLocalOf<OdsGuideline> { error("CompositionLocal LocalGuideline not present") }

interface ThemeManager {
val themeConfigurations: List<OdsThemeConfigurationContract>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import com.orange.ods.app.R
import com.orange.ods.app.ui.LocalOdsGuideline
import com.orange.ods.app.ui.LocalGuideline
import com.orange.ods.app.ui.utilities.composable.Title
import com.orange.ods.app.ui.utilities.extension.getStringName
import com.orange.ods.compose.component.button.OdsButton
Expand All @@ -62,7 +62,7 @@ import com.orange.ods.theme.guideline.toRgbString

@Composable
fun GuidelineColorScreen() {
val guidelineColors = LocalOdsGuideline.current.guidelineColors
val guidelineColors = LocalGuideline.current.guidelineColors

val coreColors = guidelineColors.filter { it.type == GuidelineColorType.Core }
val functionalColors = guidelineColors.filter { it.type == GuidelineColorType.Functional }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.withStyle
import com.orange.ods.app.R
import com.orange.ods.app.ui.LocalOdsGuideline
import com.orange.ods.app.ui.LocalGuideline
import com.orange.ods.app.ui.utilities.DrawableManager
import com.orange.ods.app.ui.utilities.composable.DetailScreenHeader
import com.orange.ods.app.ui.utilities.extension.getStringName
Expand All @@ -40,7 +40,7 @@ import com.orange.ods.theme.guideline.GuidelineTextStyle

@Composable
fun GuidelineTypographyScreen() {
val guidelineTypography = LocalOdsGuideline.current.guidelineTypography
val guidelineTypography = LocalGuideline.current.guidelineTypography

LazyColumn(
contentPadding = PaddingValues(bottom = dimensionResource(id = com.orange.ods.R.dimen.screen_vertical_margin)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.orange.ods.app.R
import com.orange.ods.app.ui.LocalAppBarManager
import com.orange.ods.app.ui.LocalOdsGuideline
import com.orange.ods.app.ui.LocalGuideline
import com.orange.ods.app.ui.components.Component
import com.orange.ods.app.ui.components.ComponentsNavigation
import com.orange.ods.app.ui.components.Variant
Expand All @@ -59,7 +59,7 @@ fun SearchScreen(onResultItemClick: (String, Long?) -> Unit) {
.contains(searchedText)
}.asSequence()

val filteredGuidelineTypography = LocalOdsGuideline.current.guidelineTypography.filter { typography ->
val filteredGuidelineTypography = LocalGuideline.current.guidelineTypography.filter { typography ->
searchedText.isEmpty() || typography.name.lowercase().contains(searchedText) || typography.composeStyle.lowercase().contains(searchedText)
}

Expand All @@ -68,7 +68,7 @@ fun SearchScreen(onResultItemClick: (String, Long?) -> Unit) {
.contains(searchedText)
}

val filteredGuidelineColors = LocalOdsGuideline.current.guidelineColors.filter { guidelineColor ->
val filteredGuidelineColors = LocalGuideline.current.guidelineColors.filter { guidelineColor ->
searchedText.isEmpty() || guidelineColor.getName().lowercase().contains(searchedText) ||
guidelineColor.lightThemeName.lowercase().contains(searchedText) ||
guidelineColor.darkThemeName.lowercase().contains(searchedText)
Expand Down

0 comments on commit 132db98

Please sign in to comment.