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

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

Closed
mdupierreux opened this issue Apr 29, 2024 · 14 comments

Comments

@mdupierreux
Copy link
Contributor

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
Copy link
Owner

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

@mdupierreux
Copy link
Contributor Author

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

@joreilly
Copy link
Owner

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
Copy link
Contributor Author

Something like this for example ?

@joreilly
Copy link
Owner

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

@mdupierreux
Copy link
Contributor Author

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
Copy link
Collaborator

BoD commented Apr 29, 2024

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
Copy link
Contributor Author

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

@joreilly
Copy link
Owner

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

@mdupierreux
Copy link
Contributor Author

I will look into it 👍

@mdupierreux
Copy link
Contributor Author

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

@joreilly
Copy link
Owner

That definitely looks better. @BoD what you think?

@mdupierreux
Copy link
Contributor Author

You can check this pull request for the code I wrote : #1314

@joreilly
Copy link
Owner

That's merged now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants