Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2 #91

Merged
merged 28 commits into from
Jun 19, 2024
Merged

Version 2 #91

merged 28 commits into from
Jun 19, 2024

Conversation

philips77
Copy link
Collaborator

@philips77 philips77 commented Mar 28, 2024

This PR adds the following features:

  • Moving :scanner from Kotlin BLE Library to Commons.
    • This will eb done in another PR after Kotlin BLE library 2.0 is released.
  • Migrating to Nordic Gradle Plugins 2.0.1
  • Splitting :theme into :theme and :ui
  • WizardStepComponent got updated and if vertical bar is to be shown, wrap content in StatusItem composable

Migration guide

  1. Replace

    import no.nordicsemi.android.common.theme.view.*

    with

    import no.nordicsemi.android.common.ui.view.*

    for views.

  2. Libraries: Remove dependency to no.nordicsemi.android.common.theme and replace with MaterialTheme in @Preview.

  3. Migrate WizardStepComponent:

    1. Remove iconRightPadding = 24.dp from ProgressItems, as it's the default value now.
    2. Remove showVerticalDivider = false from WizardStepComponent with ProgressItems:
            WizardStepComponent(
                icon = Icons.Default.Add,
                title = stringResource(id = R.string.wizard_step_in_progress),
                state = WizardStepState.CURRENT,
                decor = WizardStepAction.ProgressIndicator,
                showVerticalDivider = false,
            ) {
                ProgressItem(
                    text = "Item 1",
                    status = ProgressItemStatus.WORKING,
                    iconRightPadding = 24.dp,
                )
                // [...]
            }
      change to:
            WizardStepComponent(
                icon = Icons.Default.AccountCircle,
                title = stringResource(id = R.string.wizard_step_in_progress),
                state = WizardStepState.CURRENT,
                decor = WizardStepAction.ProgressIndicator,
            ) {
                ProgressItem(
                    text = "Item 2",
                    status = ProgressItemStatus.DISABLED,
                )
                // [...]
            }
    3. For the content with vertical bar, wrap it in StatusItem:
            WizardStepComponent(
                icon = Icons.Default.Add,
                title = stringResource(id = R.string.wizard_step_in_progress),
                state = WizardStepState.CURRENT,
                decor = WizardStepAction.ProgressIndicator,
                showVerticalDivider = true,
            ) {
                Text(text = "Item 1")
                // [...]
            }
      change to:
            WizardStepComponent(
                icon = Icons.Default.AccountCircle,
                title = stringResource(id = R.string.wizard_step_in_progress),
                state = WizardStepState.CURRENT,
                decor = WizardStepAction.ProgressIndicator,
            ) {
                StatusItem {
                   Text(text = "Item 1")
                   // [...]
                }
            }
      This allows mixing both ProgressItem and StatusItem in a single component.

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.

1 participant