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

Add the :sample:shared module for sharing ui #335

Merged
merged 5 commits into from
Mar 29, 2025

Conversation

keta1
Copy link
Contributor

@keta1 keta1 commented Mar 9, 2025

  • Add the :sample:shared module for sharing ui
  • Add iOS sample app implementation.

ScreentShot

image

@mikepenz mikepenz self-requested a review March 9, 2025 18:01
@keta1
Copy link
Contributor Author

keta1 commented Mar 9, 2025

Issues to be resolved:

  • Screenshot test not working properly
  • ci workflow needs to be updated
  • Unable to load image on iOS

@keta1 keta1 force-pushed the develop branch 4 times, most recently from 1cefe53 to eb67d6c Compare March 10, 2025 08:33
@keta1
Copy link
Contributor Author

keta1 commented Mar 10, 2025

Run sample on iOS directly, there is a chance that you will encounter a bug with text color errors
#245
Need to investigate the reasons

@mikepenz
Copy link
Owner

Thank you very much for the PR.

It will probably take me a while to fully review this, as I'll be quite busy the next 2 weeks.

But I really appreciate the effort!
Originally I planned to have a similar structure as you propose now (but I read somewhere that this wasn't specifically what's advised). That said. I like it :D

@keta1
Copy link
Contributor Author

keta1 commented Mar 10, 2025

Thank you very much for the PR.

It will probably take me a while to fully review this, as I'll be quite busy the next 2 weeks.

But I really appreciate the effort! Originally I planned to have a similar structure as you propose now (but I read somewhere that this wasn't specifically what's advised). That said. I like it :D

The disadvantage I feel is that it takes a very long time to download dependencies when initializing this sample.

@keta1
Copy link
Contributor Author

keta1 commented Mar 10, 2025

It might be better to provide multiple different versions of the sample?
eg:
Make the UI of sample into a library for sharing, provide a pure Android sample, and a multi-platform sample.

@keta1
Copy link
Contributor Author

keta1 commented Mar 10, 2025

Thank you very much for the PR.

It will probably take me a while to fully review this, as I'll be quite busy the next 2 weeks.

But I really appreciate the effort! Originally I planned to have a similar structure as you propose now (but I read somewhere that this wasn't specifically what's advised). That said. I like it :D

I am interested in the source you mentioned and would like to know why there are not many special suggestions for doing so. I noticed that many libraries use multi-platform examples, such as coil.

@keta1 keta1 changed the title - Migrate app-wasm, app, app-desktop modules to a single sample module. Add the :sample:shared module for sharing ui Mar 11, 2025
@keta1 keta1 changed the title Add the :sample:shared module for sharing ui Add the :sample:shared module for sharing ui Mar 11, 2025
@keta1 keta1 force-pushed the develop branch 2 times, most recently from bc3d3c3 to af48455 Compare March 23, 2025 08:26
@mikepenz
Copy link
Owner

I really apologize for the conflicts the latest changes have caused :(

LibrariesContainer(
libraries = libs,
modifier = modifier.fillMaxSize(),
// sample uses material 2 - proxy theme
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can update the sample to use Material 3 instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with using material3 components, can I ask for your help

Comment on lines +50 to +53
Text(text = "Dark mode enabled", color = MaterialTheme.colors.onBackground)
Switch(checked = darkMode, onCheckedChange = { darkMode = !darkMode })
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably time to make this a nice toggle in the toolbar.

@mikepenz mikepenz requested a review from Copilot March 29, 2025 10:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds the :sample:shared module to facilitate shared UI components and introduces an iOS sample app implementation.

  • Removed usage instructions in app-wasm/README.md and app-desktop/README.md.
  • Updated GitHub workflow Gradle commands to reference the new sample modules.
  • Renamed the workflow task from "Aoi Check" to "Api Check" to correct the label.

Reviewed Changes

Copilot reviewed 124 out of 140 changed files in this pull request and generated no comments.

File Description
app-wasm/README.md Removed usage instructions that previously detailed dependency generation and running the wasm app.
app-desktop/README.md Removed usage instructions that previously detailed dependency generation and running the desktop app.
.github/workflows/static.yml Updated Gradle command and artifact paths to reference the new sample:web module.
.github/workflows/ci.yml Updated several Gradle commands to target the new sample:android module and renamed a workflow step from "Aoi Check" to "Api Check".
Files not reviewed (16)
  • app-desktop/build.gradle.kts: Language not supported
  • app-desktop/src/commonMain/composeResources/files/aboutlibraries.json: Language not supported
  • app-desktop/src/jvmMain/kotlin/main.kt: Language not supported
  • app-wasm/build.gradle.kts: Language not supported
  • app-wasm/gradle.properties: Language not supported
  • app-wasm/src/commonMain/composeResources/files/aboutlibraries.json: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/Main.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/Theme.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/com/mikepenz/markdown/Github.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/com/mikepenz/markdown/OpenSourceInitiative.kt: Language not supported
  • app/proguard-rules.pro: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/MainActivity.kt: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/ui/MyApplication.kt: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/ui/Theme.kt: Language not supported
  • app/src/main/res/values/colors.xml: Language not supported
  • app/src/main/res/values/dimens.xml: Language not supported

@keta1 keta1 force-pushed the develop branch 2 times, most recently from 5a9e736 to 043d998 Compare March 29, 2025 11:00
@keta1 keta1 force-pushed the develop branch 2 times, most recently from 73ffc57 to 8a07ee2 Compare March 29, 2025 11:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new module for sharing UI components and an iOS sample app implementation while updating related build and workflow configurations.

  • Removed usage documentation from the app-wasm and app-desktop README files.
  • Updated the static and CI GitHub workflows to reference new gradle tasks and artifact locations for the sample modules.

Reviewed Changes

Copilot reviewed 131 out of 147 changed files in this pull request and generated no comments.

File Description
app-wasm/README.md Removed outdated usage instructions for the WASM app.
app-desktop/README.md Removed outdated usage instructions for the desktop app.
.github/workflows/static.yml Updated gradle task and artifact path for web distribution to match new module.
.github/workflows/ci.yml Updated gradle commands and artifact paths for Android sample builds.
Files not reviewed (16)
  • app-desktop/build.gradle.kts: Language not supported
  • app-desktop/gradle.properties: Language not supported
  • app-desktop/src/commonMain/composeResources/files/aboutlibraries.json: Language not supported
  • app-desktop/src/jvmMain/kotlin/main.kt: Language not supported
  • app-wasm/build.gradle.kts: Language not supported
  • app-wasm/gradle.properties: Language not supported
  • app-wasm/src/commonMain/composeResources/files/aboutlibraries.json: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/Main.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/Theme.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/com/mikepenz/markdown/Github.kt: Language not supported
  • app-wasm/src/wasmJsMain/kotlin/com/mikepenz/markdown/OpenSourceInitiative.kt: Language not supported
  • app/proguard-rules.pro: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/MainActivity.kt: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/ui/MyApplication.kt: Language not supported
  • app/src/main/kotlin/com/mikepenz/markdown/ui/Theme.kt: Language not supported
  • app/src/main/res/values/colors.xml: Language not supported
Comments suppressed due to low confidence (3)

.github/workflows/static.yml:46

  • Verify that the new gradle task 'sample:web:wasmJsBrowserDistribution' is correctly configured and that corresponding build outputs have been adjusted to match the updated artifact path.
          ./gradlew sample:web:wasmJsBrowserDistribution --no-configuration-cache

.github/workflows/ci.yml:89

  • Confirm that 'sample:android:assembleDebug' is the intended task for assembling the debug build and that it fully replaces the previous command without affecting other pipeline steps.
          ./gradlew sample:android:assembleDebug --stacktrace

.github/workflows/ci.yml:142

  • Ensure that the updated release build and bundling commands for 'sample:android' are fully aligned with the new module structure and signing configurations.
        run: ./gradlew sample:android:assembleRelease sample:bundleRelease -P"com.mikepenz.android.signing.enabled"="true" -P"com.mikepenz.android.signing.storeFile"="opensource.jks" -P"com.mikepenz.android.signing.storePassword"="${{ secrets.STORE_PASSWORD }}" -P"com.mikepenz.android.signing.keyAlias"="${{ secrets.KEY_ALIAS }}" -P"com.mikepenz.android.signing.keyPassword"="${{ secrets.KEY_PASSWORD }}"

Copy link
Owner

@mikepenz mikepenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for all the effort you have put into this PR! really appreciate it!

@mikepenz mikepenz merged commit 7538771 into mikepenz:develop Mar 29, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants