|
|
Description[Home] Separate bottom sheet current from target state
Previously, the state of the bottom sheet was kept in a single
variable. In practice this represented the target state of the sheet
which made accessing this variable confusing. This patch separates
the current state from target state concept and introduces a state,
SHEET_STATE_SCROLLING, to indicate when the sheet is not necessarily
at one of it's static states.
BUG=702726
Review-Url: https://codereview.chromium.org/2759823002
Cr-Commit-Position: refs/heads/master@{#460393}
Committed: https://chromium.googlesource.com/chromium/src/+/86d0ef1b1d5e95c274e3d106de79b7b6575cd18e
Patch Set 1 #
Total comments: 4
Patch Set 2 : address comments #Patch Set 3 : rebase #
Total comments: 2
Patch Set 4 : nit #Patch Set 5 : fix tests #
Messages
Total messages: 43 (20 generated)
Description was changed from ========== [Home] Separate bottom sheet current from target state Previously, the state of the bottom sheet was kept in a single variable. In practice this represented the target state of the sheet which made accessing this variable confusing. This patch separates the current state from target state concept and introduces a state, SHEET_STATE_SCROLLING, to indicate when the sheet is not necessarily at one of it's static states. BUG=702726 ========== to ========== [Home] Separate bottom sheet current from target state Previously, the state of the bottom sheet was kept in a single variable. In practice this represented the target state of the sheet which made accessing this variable confusing. This patch separates the current state from target state concept and introduces a state, SHEET_STATE_SCROLLING, to indicate when the sheet is not necessarily at one of it's static states. BUG=702726 ==========
mdjones@chromium.org changed reviewers: + twellington@chromium.org
I'll rebase on your change once it lands. ptal
Looks good overall https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java (right): https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:367: setInternalCurrentState(SHEET_STATE_SCROLLING); I would have expected this to stay SHEET_STATE_PEEK. What triggers the first change from scrolling -> peek? https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:733: * @param state The state to move the panel to. nit: It may be good to mention that SCROLLING is not a valid state for the param.
https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... File chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java (right): https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:367: setInternalCurrentState(SHEET_STATE_SCROLLING); On 2017/03/17 23:36:19, Theresa wrote: > I would have expected this to stay SHEET_STATE_PEEK. What triggers the first > change from scrolling -> peek? Whoops, definitely a mistake. Fixed. https://codereview.chromium.org/2759823002/diff/1/chrome/android/java/src/org... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:733: * @param state The state to move the panel to. On 2017/03/17 23:36:19, Theresa wrote: > nit: It may be good to mention that SCROLLING is not a valid state for the > param. Done.
lgtm
rebased on your change, ptal
still lgtm https://codereview.chromium.org/2759823002/diff/40001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java (right): https://codereview.chromium.org/2759823002/diff/40001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:788: if (!stateChanged) return; This early return can move up: if (state == mCurrentState) return; mCurrentState = state; for (BottomSheetObserver o...
https://codereview.chromium.org/2759823002/diff/40001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java (right): https://codereview.chromium.org/2759823002/diff/40001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheet.java:788: if (!stateChanged) return; On 2017/03/21 23:07:01, Theresa wrote: > This early return can move up: > > if (state == mCurrentState) return; > > mCurrentState = state; > for (BottomSheetObserver o... Done.
The CQ bit was checked by mdjones@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from twellington@chromium.org Link to the patchset: https://codereview.chromium.org/2759823002/#ps60001 (title: "nit")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by mdjones@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder probably lacks capacity)
The CQ bit was checked by mdjones@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
mdjones@chromium.org changed reviewers: + dfalcantara@chromium.org
+dfalcantara for owners. Updated the tests to account for the new state.
lgtm
The CQ bit was checked by mdjones@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from twellington@chromium.org Link to the patchset: https://codereview.chromium.org/2759823002/#ps80001 (title: "fix tests")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
CQ has no permission to schedule in bucket master.tryserver.chromium.linux
The CQ bit was checked by mdjones@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
CQ has no permission to schedule in bucket master.tryserver.chromium.linux
The CQ bit was checked by mdjones@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_TIMED_OUT, build hasn't started yet, builder probably lacks capacity)
The CQ bit was checked by mdjones@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1490800786156500, "parent_rev": "afc06442b2cfafd520fe4dbbdddf081714e53154", "commit_rev": "86d0ef1b1d5e95c274e3d106de79b7b6575cd18e"}
Message was sent while issue was closed.
Description was changed from ========== [Home] Separate bottom sheet current from target state Previously, the state of the bottom sheet was kept in a single variable. In practice this represented the target state of the sheet which made accessing this variable confusing. This patch separates the current state from target state concept and introduces a state, SHEET_STATE_SCROLLING, to indicate when the sheet is not necessarily at one of it's static states. BUG=702726 ========== to ========== [Home] Separate bottom sheet current from target state Previously, the state of the bottom sheet was kept in a single variable. In practice this represented the target state of the sheet which made accessing this variable confusing. This patch separates the current state from target state concept and introduces a state, SHEET_STATE_SCROLLING, to indicate when the sheet is not necessarily at one of it's static states. BUG=702726 Review-Url: https://codereview.chromium.org/2759823002 Cr-Commit-Position: refs/heads/master@{#460393} Committed: https://chromium.googlesource.com/chromium/src/+/86d0ef1b1d5e95c274e3d106de79... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/86d0ef1b1d5e95c274e3d106de79... |