joreilly / Confetti

KMP GraphQL based conference project with Jetpack Compose Android, Compose for Wear and SwiftUI iOS clients along with GraphQL backend.
Apache License 2.0
679 stars 82 forks source link

AndroidMakers breaks sessions have "service" type causing them to be displayed in white even in dark mode #1313

Closed mdupierreux closed 2 weeks ago

mdupierreux commented 2 weeks ago

When displaying Android Makers 2024 sessions, breaks are displayed in white even on dark mode. That's because they have the type "service" and not "break".

Also, I guess this code is going to be updated to match the theme.

    if (session.isService()) {
        modifier = modifier.background(Color.White)
    }
joreilly commented 2 weeks ago

ah, thanks....that does look pretty ugly all right :)

mdupierreux commented 2 weeks ago

If service sessions are white (on light mode) what would be the correct color in dark mode ?

joreilly commented 2 weeks ago

I"m not sure tbh what best colour would be to use there (am definitely not a designer :) ) ....maybe one of standard ones with some change in alpha or perhaps tonalElevation as we do with ConfettiHeaderAndroid for example

mdupierreux commented 2 weeks ago

Something like this for example ?

joreilly commented 2 weeks ago

Yeah, that definitely looks better....also btw just noticed we show bookmark option for those which I guess we shouldn't!

mdupierreux commented 2 weeks ago

Ok, so for breaks and services we shouldn't have the bookmark option ? From what I see, the bookmark option is visible because the breaks for Android Makers have the service type. If the type was correct, the option wouldn't be visible.

if (!session.isBreak()) {
            Bookmark(
                isBookmarked = isBookmarked,
                onBookmarkChange = { shouldAdd ->
                    if (!isLoggedIn) {
                        showDialog = true
                        return@Bookmark
                    }
                    if (shouldAdd) {
                        addBookmark(session.id)
                    } else {
                        removeBookmark(session.id)
                    }
                }
            )
        }
BoD commented 2 weeks ago

Sorry, I'm also definitely not a designer 😅 - but on the proposed screenshots above, it looks like the break/service sessions are actually highlighted and have an importance higher than the other sessions whereas, arguably, it's the opposite 😅

They should probably have the same color as the background instead.

mdupierreux commented 2 weeks ago

Ok 😄, I'm going to try to find a dimmer color (background on dark theme gives me a full black list 😅 )

joreilly commented 2 weeks ago

I'm not super familiar with options here but wondering what tonalElevation might add

mdupierreux commented 2 weeks ago

I will look into it 👍

mdupierreux commented 2 weeks ago

Here's with a tonalElevation of 8dp for sessions and 0dp for services :

joreilly commented 2 weeks ago

That definitely looks better. @BoD what you think?

mdupierreux commented 2 weeks ago

You can check this pull request for the code I wrote : https://github.com/joreilly/Confetti/pull/1314

joreilly commented 2 weeks ago

That's merged now