Repository navigation
Conversation
Removed the expanded-layout auto-selection and its `isExpanded` plumbing. Added a Compose test that verifies an expanded Commands layout shows the selection prompt and does not display command-detail search controls. Fixes SimonSchubert#131
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the window is wide enough for the navigation rail (a tablet, a landscape phone, or a phone with a small display size like in the report), the Commands tab opened straight into the first command, 2048, as soon as the list loaded.
CommandsPaneScreenhad a launch effect that picked the first item on expanded layouts. This removes it, so the detail pane shows the existing "Select a command" placeholder until you tap something. TheisExpandedparameter only fed that effect, so it is gone too, along with theLinuxNavGraphargument.Deeplinks like
/man/2048and tapping a list item still open the detail page. They go throughpendingSelectionand normal navigation, which are unchanged.Demo
Emulator at 240 dpi (rail layout), opening the Commands tab on a fresh install.
Testing
testCommandListDoesNotSelectFirstCommandOnExpandedLayouttoComposeDeeplinkTests. It sets the content with aLocalWindowInfothat reports a 1280x800 dp window so the two-pane layout is used, waits until the command list has loaded, then checks that "Select a command" is shown and no command detail is open. It passes with this change and fails on master.ComposeDeeplinkTestsfail on master too, because nothing sets theTopAppBarTitlecontent description anymore. I left them alone. On an API 37 emulator I also had to bump espresso-core to 3.7.0 locally to run instrumented tests at all. That change is not part of this PR.Fixes #131