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

[Jetnews] TopAppBar doesn't match design spec #467

Merged
merged 33 commits into from
Aug 30, 2021

Conversation

angeles-bilbao6
Copy link
Contributor

Added corrections for the TopAppBar in order to look like the most recent design

#459

Home

Before
image

After
image

Article

Before
Article header

After
image

Interests

Before
image

After
image

@angeles-bilbao6 angeles-bilbao6 changed the title [Jetnews] TopAppBar doesn't match design spec #459 [Jetnews] TopAppBar doesn't match design spec Apr 13, 2021
Removed unnecessary column, add colors to the Material Theme and change text to null
@JolandaVerhoef
Copy link
Contributor

There are some conflicts, probably because of the work on Window Insets. Can you rebase and verify your changes work with both navigation types (3-button vs gesture), in landscape mode, in dark mode, and on large screens?

@JolandaVerhoef
Copy link
Contributor

Can you please add screenshots of the dark mode / landscape / 3 button nav / large screen use cases? I'd love to see if the app behaves correctly in all of those cases!

@angeles-bilbao6
Copy link
Contributor Author

image
image
image
image

image
image
image
image

image
image
image
image

@JolandaVerhoef
Copy link
Contributor

@angeles-bilbao6 I think there's an issue with the light theme, where the status bar icons are not visible. They should show up as dark icons when the theme is set to light. Otherwise, this looks good!

@angeles-bilbao6
Copy link
Contributor Author

Hi @JolandaVerhoef have you had the chance to review the latest changes for this PR?

)
}
}
},
elevation = if (scrollState.firstVisibleItemScrollOffset == 0) 0.dp else 4.dp,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the intention here is to increase the elevation if the list has been scrolled? I don't think this code is sufficcient i.e. if you scroll in a new item but it's at 0 offset the elevation will go back to 0.dp. A neat way to fix this might be an ext fun like:

val LazyListState.isScrolled: Boolean
  get() = firstVisibleItemIndex > 0 || firstVisibleItemScrollOffset > 0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename the file "LazyListUtils.kt" as it's not holding any state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nickbutcher
Copy link
Contributor

Thanks for the changes, a few more comments and then I think we can land this.

@JoseAlcerreca
Copy link
Contributor

Some emulators on GHA are acting up
ReactiveCircus/android-emulator-runner#168

so if 2/3 emulator runs pass, consider the PR green please.

@angeles-bilbao6
Copy link
Contributor Author

Hi @nickbutcher I have already addressed your latest comments, let me know if you are ok with the fixes.

@angeles-bilbao6
Copy link
Contributor Author

angeles-bilbao6 commented Aug 3, 2021

Hi @nickbutcher have you had the chance to review the latest changes?

@JoseAlcerreca
Copy link
Contributor

Went through all the comments resolving some and commented on the ones that were not addressed.

@angeles-bilbao6
Copy link
Contributor Author

Hi @JoseAlcerreca I just addressed your last comments

@JoseAlcerreca
Copy link
Contributor

Hi @angeles-bilbao6 , @manuelvicnt merged a big change to JetNews so there was a big conflict. This PR should have been merged yesterday so I resolved it for you in angeles-bilbao6#1

If you merge it should update this PR, I hope :)

@angeles-bilbao6
Copy link
Contributor Author

Hi @JoseAlcerreca I merged your changes and everything works as expected!

@JoseAlcerreca JoseAlcerreca merged commit b0922b3 into android:main Aug 30, 2021
@JoseAlcerreca
Copy link
Contributor

Woohoo, thanks @angeles-bilbao6!

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

Successfully merging this pull request may close these issues.

7 participants