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

Whats new for Compose 1.6.0 #77

Merged
merged 20 commits into from
Feb 28, 2024
Merged

Whats new for Compose 1.6.0 #77

merged 20 commits into from
Feb 28, 2024

Conversation

zamulla
Copy link
Collaborator

@zamulla zamulla commented Feb 19, 2024

No description provided.

topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
### Padding for text with lineHeight set is trimmed by default

With the added support for [LineHeightStyle.Trim](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Trim)
Compose Multiplatform aligns with Android in the way text padding is trimmed.
Copy link
Member

Choose a reason for hiding this comment

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

I guess it's a good place to write what's going on with a text centering in multiplatform and how exactly it aligns with Android now. I mean in 1.6.0 on Android there was a breaking behavior change about android only includeFontPadding property and users still asks questions about it. See details and my explanation here - JetBrains/compose-multiplatform#2477 (comment)

topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Show resolved Hide resolved
topics/whats-new/whats-new-compose-1-6-0.md Outdated Show resolved Hide resolved
@zamulla zamulla marked this pull request as ready for review February 22, 2024 08:03
mpd.tree Outdated
@@ -14,6 +14,11 @@
<toc-element id="faq.md"/>
<toc-element toc-title="Roadmap" href="https://blog.jetbrains.com/kotlin/2023/11/kotlin-multiplatform-development-roadmap-for-2024/"/>
</toc-element>
<toc-element toc-title="What's new in Kotlin Multiplatform">
<toc-element toc-title="Compose Multiplatform">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since there's only one item, I think we can remove this Compose Multiplatform toc-element for now

@@ -0,0 +1,346 @@
[//]: # (title: Compose Multiplatform 1.6.0)

The Compose Multiplatform 1.6.0 release is out. Here are the highlights:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Currently, the list combines different styles, short news-like bullets and full sentences. I think you can keep it short all the way:

  • [New resources API]
  • [Basic support for iOS accessibility features]
  • [Separate platform views for popups, dialogs, and dropdowns]
  • [Compatibility with Jetpack Compose and Material 3]
  • [Kotlin/Wasm artifacts in stable versions]


## Known issues and solutions

### Missing dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since there's only one issue, you can remove the subheader or change the previous one to

"Known issues: missing dependencies"


## Web

### Compose Multiplatform for Web (Wasm) artifacts are available with the stable version of the framework
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### Compose Multiplatform for Web (Wasm) artifacts are available with the stable version of the framework
### Kotlin/Wasm artifacts available in stable versions of the framework


### Compose Multiplatform for Web (Wasm) artifacts are available with the stable version of the framework

Stable version of Compose Multiplatform for Web supports Kotlin/Wasm targets now. After you switch to 1.6.0, you don't
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Stable version of Compose Multiplatform for Web supports Kotlin/Wasm targets now. After you switch to 1.6.0, you don't
Stable versions of Compose Multiplatform support Kotlin/Wasm targets now. After you switch to 1.6.0, you don't


### Padding for text with lineHeight set is trimmed by default

With the added support for [LineHeightStyle.Trim](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Trim)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
With the added support for [LineHeightStyle.Trim](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Trim)
With the added support for [LineHeightStyle.Trim](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/style/LineHeightStyle.Trim),

height will not be modified to match the font. Now, you have to explicitly specify the `lineHeight` attribute every time you
set the corresponding `fontSize`.

Jetpack Compose now [recommends](https://issuetracker.google.com/issues/321872412) not setting the font size directly:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't usually introduce notes. You can just include it in the note, like "Following Jetpack Compose recommendations, we also encourage users.."

### Improved Resources API (all platforms)

The new experimental API adds support for strings and fonts, and allows you to more comfortably share and access resources
in common Kotlin:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
in common Kotlin:
in common Kotlin more comfortably:

* `COMPONENT`, for creating `Popup` or `Dialog` as a separate Swing component in the same window. It works only with offscreen
rendering, with `compose.swing.render.on.graphics` set to `true` (see the [Enhanced Swing interop](https://blog.jetbrains.com/kotlin/2023/08/compose-multiplatform-1-5-0-release/#enhanced-swing-interop)
section of the 1.5.0 Compose Multiplatform release notes). Note that offscreen rendering only works for `ComposePanel`
components, not for full window Compose applications.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
components, not for full window Compose applications.
components, not full window applications.

topics/whats-new/whats-new-compose-1-6-0.md Show resolved Hide resolved

```kotlin
ComposeUIViewController(
configure = {
Copy link
Member

Choose a reason for hiding this comment

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

Indentation is wrong (should be 4 spaces)

@zamulla zamulla merged commit bb86f12 into master Feb 28, 2024
@zamulla zamulla deleted the whats-new branch February 28, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants