accompanist icon indicating copy to clipboard operation
accompanist copied to clipboard

Migrate to Material 3

Open bpappin opened this issue 2 years ago • 21 comments

The library needs to be migrated to Material 3. Since the Themes are significantly different, they do not apply colour correctly.

bpappin avatar May 03 '22 15:05 bpappin

In the sample app or a particular project?

bentrengrove avatar May 03 '22 15:05 bentrengrove

Right now I'm using the pager, and for example, PagerTab.kt references material 2, which is causing problems with M3. (not to mention that I now have m2 imports causing confusion)

bpappin avatar May 03 '22 18:05 bpappin

As far as I am concerned, a version of insets-ui for Material 3 would be greatly appreciated.

msfjarvis avatar May 03 '22 18:05 msfjarvis

For insets-ui specifically, there should no longer be any need for an insets-ui material3 version of Scaffold, since the latest releases allow drawing behind the topAppBar.

For the bottom bar and app bars, the workaround right now is to fork the underlying component to introduce the padding (which is exactly what a material3 version of accompanist/insets-ui would do)

alexvanyo avatar May 05 '22 15:05 alexvanyo

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 05 '22 03:06 github-actions[bot]

Can this issue be reopen please? Accompanist should definitely support Material 3. SwipeRefreshIndicator, Modifier.placeholder, ModalBottomSheetLayout, they are all using Material 2 and a version that uses Material 3 would be greatly appreciated.

And is it really necessary to let the bot close stale issues? If there are no comments on an issue for 40 days does not mean that the feature request is not needed anymore.

leinardi avatar Sep 08 '22 08:09 leinardi

It blows my mind that it was closed, but also that it hasn't been taken more seriously.

bpappin avatar Sep 08 '22 10:09 bpappin

@bpappin it's because of the bot: it closes everything that is inactive for 40 days...

leinardi avatar Sep 08 '22 10:09 leinardi

@leinardi I understood the reason, but it's surprising that it hasn't even been touched.

bpappin avatar Sep 08 '22 10:09 bpappin

Our hope is to upstream and support Material 3 there. For instance, Swipe to Refresh is currently being upstreamed so we won't be supporting M3 in Accompanist for it. We are still evaluating which other libraries to transition to M3 in Accompanist, we don't want to introduce a new library and then deprecate it a month later.

Apologies the issue was closed, it is now reopened.

bentrengrove avatar Sep 09 '22 12:09 bentrengrove

What do you mean "upstreamed"? Is this something we can do ourselves now?

bpappin avatar Sep 09 '22 12:09 bpappin

Accompanist is our experimental repository. By upstream I mean adding support for the feature in Compose itself

bentrengrove avatar Sep 09 '22 12:09 bentrengrove

Ahh, understood. That can't happen soon enough. Having both material 2 and 3 in the same project causes us trouble all the time.

bpappin avatar Sep 09 '22 12:09 bpappin

Another update from my previous comment is that a new version insets-ui should be unnecessary for M3 as support for inset handling app bars is being upstreamed and available in the latest betas.

alexvanyo avatar Sep 09 '22 18:09 alexvanyo

We are again running into major issues with no m3 support. m2 is so far gone for us we forget what it looks like. Can the community help with this? We can fork and just fix it, but it would be better if everyone could use it.

bpappin avatar Oct 06 '22 21:10 bpappin

Which library in particular do you need? Is it still pager? We really don't want to add a new library, only for it to be deprecated soon after when there is an official version available in Compose.

bentrengrove avatar Oct 06 '22 22:10 bentrengrove

This time, we're having problem with the bottom sheet. Since we have no m2 references, its colours are all default. Its a constant headache.

bpappin avatar Oct 06 '22 23:10 bpappin

There is no bottom sheet composable in M3 currently so we couldn't actually migrate that library at the moment. For the other libraries in Accompanist, we are currently evaluating which ones make sense to provide an M3 version of and will have more to share on this soon.

bentrengrove avatar Oct 07 '22 17:10 bentrengrove

Yes, we are aware there its not there.

bpappin avatar Oct 07 '22 18:10 bpappin

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 07 '22 03:11 github-actions[bot]

I know it is not ideal, but for the time being to avoid ambiguity with same-name components if your app is entirely in M3. If you are using accompanist you can exclude the package "androidx.compose.material" from the auto import, so at least you don't accidentally pick an Icon from M2 instead of M3 and the LocalContentColor sudently does not work for instance.

jgavazzisp avatar Dec 01 '22 01:12 jgavazzisp

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jan 15 '23 03:01 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

leinardi avatar Jan 15 '23 12:01 leinardi

I am going to close this issue as it isn't specific enough to each library which makes things hard to track, placeholder-material3 is in the latest release. I believe the only library left is NavigationMaterial, I will open another issue for that.

bentrengrove avatar Jan 15 '23 21:01 bentrengrove

Link to thje NavigationMaterial issue: #1480

leinardi avatar Jan 16 '23 08:01 leinardi

There is no bottom sheet composable in M3 currently so we couldn't actually migrate that library at the moment. For the other libraries in Accompanist, we are currently evaluating which ones make sense to provide an M3 version of and will have more to share on this soon.

Now that we have ModalBottomSheet in M3, will Accompanist be planning to support it soon?

anqus avatar Feb 18 '23 17:02 anqus