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

Allow custom top bar widget to be "not always visible" #69

Merged
merged 5 commits into from
Oct 10, 2023

Conversation

ulusoyca
Copy link
Collaborator

@ulusoyca ulusoyca commented Oct 8, 2023

Description

Currently, the custom top bar widget operates exclusively when the isTopBarLayerAlwaysVisible is set to true. Setting this to false when custom top bar is used triggers an exception. This PR introduces the flexibility to enable the custom top bar to be used even when isTopBarLayerAlwaysVisible is set to true.

Changes Introduced:

  • When a WoltModalSheetPage.topBar widget is provided, it will be wrapped with shadow and elevation determined by the theme or default settings. Without a WoltModalSheetPage.topBar, a default top bar will be generated, styled according to the theme settings.
  • For pages utilizing the default top bar, the title of the top bar will also be utilized. In contrast, pages with a custom top bar will omit the top bar title provided with WoltModalSheetPage.topBarTitle.
  • An example has been added to the playground app to showcase the application of a custom top bar.
  • Readme has been updated and enhanced in line with these changes.
isTopBarLayerAlwaysVisible false isTopBarLayerAlwaysVisible true
not_always_visible.mov
top_bar_always_visible.mov

@ulusoyca ulusoyca requested a review from TahaTesser October 8, 2023 10:50
@ulusoyca ulusoyca force-pushed the use-custom-top-bar-in-scroll-animation branch from aa99c21 to b7c100c Compare October 8, 2023 11:21
Copy link
Collaborator

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

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

LGTM with some minor fixes

@ulusoyca ulusoyca merged commit 4e34cd2 into main Oct 10, 2023
@ulusoyca ulusoyca deleted the use-custom-top-bar-in-scroll-animation branch October 10, 2023 10:39
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

Successfully merging this pull request may close these issues.

2 participants