Skip to content

Commit

Permalink
Merge branch 'main' into fix/jme/fix-gh-publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty authored Oct 14, 2024
2 parents 5874ec4 + 78c6fdc commit 576e6d3
Show file tree
Hide file tree
Showing 103 changed files with 264 additions and 24 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/nightlyReports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ jobs:
path: |
**/build/reports/kover
- name: 🔊 Publish results to Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
if: ${{ always() && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }}
run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES

# Gradle dependency analysis using https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
dependency-analysis:
name: Dependency analysis
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ captures/
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
.idea/other.xml
.idea/runConfigurations.xml
.idea/tasks.xml
.idea/workspace.xml
.idea/libraries
Expand Down Expand Up @@ -95,3 +96,5 @@ lint/tmp/

/tmp
.DS_Store

/.kotlin
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# v0.1.1:
- Better support for RTL languages (#85)
- Update Compose to `BOM 2024.09.03` and other updates of dependencies.

# v0.1.0:
- Import Semantics color and typography from compound tokens.
- Replace avatar colors with updated values.
Expand Down
2 changes: 1 addition & 1 deletion compound/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()

coordinates("io.element.android", "compound-android", "0.1.0")
coordinates("io.element.android", "compound-android", "0.1.1")
if (!providers.gradleProperty("mavenCentralUsername").isPresent) {
println("No maven central provider")
}
Expand Down
3 changes: 3 additions & 0 deletions compound/screenshots/Compound Icons - Rtl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.IntrinsicSize
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
Expand All @@ -17,13 +18,16 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import io.element.android.compound.theme.ElementTheme
import io.element.android.compound.tokens.generated.CompoundIcons
Expand All @@ -34,14 +38,28 @@ internal fun IconsCompoundPreviewLight() = ElementTheme {
IconsCompoundPreview()
}

@Preview(widthDp = 730, heightDp = 1600)
@Composable
internal fun IconsCompoundPreviewRtl() = ElementTheme {
CompositionLocalProvider(
LocalLayoutDirection provides LayoutDirection.Rtl,
) {
IconsCompoundPreview(
title = "Compound Icons Rtl",
)
}
}

@Preview(widthDp = 730, heightDp = 1600)
@Composable
internal fun IconsCompoundPreviewDark() = ElementTheme(darkTheme = true) {
IconsCompoundPreview()
}

@Composable
private fun IconsCompoundPreview() {
private fun IconsCompoundPreview(
title: String = "Compound Icons",
) {
val context = LocalContext.current
val content: Sequence<@Composable ColumnScope.() -> Unit> = sequence {
for (icon in CompoundIcons.allResIds) {
Expand All @@ -64,7 +82,7 @@ private fun IconsCompoundPreview() {
}
}
IconsPreview(
title = "Compound Icons",
title = title,
content = content.toList(),
)
}
Expand Down Expand Up @@ -92,9 +110,10 @@ internal fun IconsPreview(
content.chunked(10).forEach { chunk ->
Row(
modifier = Modifier.height(IntrinsicSize.Max),
horizontalArrangement = Arrangement.spacedBy(6.dp),
// Keep same order of icons for an easier comparison of previews
horizontalArrangement = Arrangement.Absolute.Left,
) {
chunk.forEach { icon ->
chunk.forEachIndexed { index, icon ->
Column(
modifier = Modifier
.background(MaterialTheme.colorScheme.background)
Expand All @@ -105,6 +124,9 @@ internal fun IconsPreview(
) {
icon()
}
if (index < chunk.size - 1) {
Spacer(modifier = Modifier.width(6.dp))
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_arrow_left.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_arrow_right.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_attachment.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_block.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_chart.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_chat.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_chat_new.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_chat_solid.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_cloud.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_cloud_solid.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_collapse.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_company.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_compose.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_copy.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_dark_mode.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_devices.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_document.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_edit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_edit_solid.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_expand.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_extensions.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_file_error.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_files.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_forward.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_history.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
1 change: 1 addition & 0 deletions compound/src/main/res/drawable/ic_compound_host.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:autoMirrored="true"
android:viewportWidth="24"
android:viewportHeight="24">
<path
Expand Down
Loading

0 comments on commit 576e6d3

Please sign in to comment.