Skip to content

Conversation

joshliebe
Copy link
Contributor

@joshliebe joshliebe commented Oct 6, 2025

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1211507598155413?focus=true

Description

  • Uses top omnibar behavior when in landscape and using bottom address bar

Steps to test this PR

  • Set the address bar to “Bottom"
  • Open the Input Screen and type something (so that the input expands)
  • Rotate to landscape
  • Verify that the top omnibar behavior is used

UI changes

Before After
Screenshot_20251006_210315 Screenshot_20251006_210235

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

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

Works as expected 👍

A minor change I would make is to use a slide transition instead of fade transition when going from bottom omnibar to top input screen bar, I think it feels better. This would require adding isLandscape to BrowserAndInputScreenTransitionProvider (or passing some activity context) and I'd understand if you don't want to do it here. We can revisit whenever we touch this code next time.

Comment on lines 58 to 62
override fun useTopBar(isLandscape: Boolean): Boolean =
useTopBar(
isTopOmnibar = isTopOmnibar,
isTopOmnibar = isTopOmnibar || isLandscape,
duckChatInternal = duckChatInternal,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
override fun useTopBar(isLandscape: Boolean): Boolean =
useTopBar(
isTopOmnibar = isTopOmnibar,
isTopOmnibar = isTopOmnibar || isLandscape,
duckChatInternal = duckChatInternal,
)
override fun useTopBar(isLandscape: Boolean): Boolean =
useTopBar(
isTopOmnibar = isTopOmnibar,
duckChatInternal = duckChatInternal,
) || isLandscape

This is a little clearer in intent to me.

Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

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

Ah sorry, now noticing that other invocations of useTopBar are not providing the orientation. This results in missing blur and autocomplete recycler offset (which in this context debatable because buttons are to the side), but also the autocomplete arrows point in the wrong direction.

@LukasPaczos
Copy link
Contributor

To cover all the cases, you can leverage the new activity context injection into InputScreenConfigResolverImpl, because it's already tied to the ActivityScope:

@Inject
@ActivityContext
lateinit var activityContext: Context

and do:

override fun useTopBar(): Boolean =
    useTopBar(
        isTopOmnibar = isTopOmnibar,
        duckChatInternal = duckChatInternal,
    ) || activityContext.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE

@joshliebe joshliebe merged commit 9bbcfa6 into develop Oct 7, 2025
7 checks passed
@joshliebe joshliebe deleted the feature/josh/input-screen-landscape-behavior branch October 7, 2025 16:09
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