Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Issue 2898283002: Multiple user pods implementation for new login screen (Closed)

Created:
3 years, 7 months ago by Wenzhao (Colin) Zang
Modified:
3 years, 7 months ago
CC:
chromium-reviews, alemate+watch_chromium.org, achuith+watch_chromium.org, rkc
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Multiple user pods implementation for new login screen The new login screen for multiple user pods involves creating small pods and places them on a scroll bar.   The ‘small pod’ is implemented as an ‘add-on’ to the existing user pod template, instead of being a new prototype. Pods can easily transform itself among the ‘large’, ‘small’ and ‘extra small’ states, by toggling the visibility of corresponding parts.   1) Pod placement works as follows: Upon receiving the user list from backend, create a new pod for each user (in rebuildPods()), append them to the pow row as children, and call initialize(). This part remains the same with the old implementation, and at this point there is no need to determine what size the pod should be shown. rebuildPods() calls placePods(). placePods() first determines the ‘main pod’ (the one displayed as the large pod), and append all other pods to a ‘small pods container’, because they should be displayed as small pods. This is done in appendPodsToParents(). The actual placement process starts here: it’s done by: placeSinglePod_(), placePodsOnPodRow_(), placePodsOnContainer_() or placePodsOnScrollableContainer_(). The placePods() function decides which one to call based on the number of users we have. There’re lots of details in the placement process but the general logic is simple, because we do not have to determine the best numbers of rows and columns and can just follow the spec instead. One special handling is: when scrollable container is shown it should occupy the full screen, and a gradient mask is applied to avoid blocking the header bar. The z-indexes should be well selected.   2) User removal works as follows: A pod should always be switched to the main pod before being removed (except the trivial 2-user case). Therefore after removing it from its parent (the pod row), the main pod is set to null. We call placePods(), and the following works exactly the same with the 1) scenario. This is because placePods() will determine the main pod and re- append the pods to different parents if necessary.   3) Window resizing works as follows: Once there is a window resizing event, call placePods() directly. The difference with the above two scenarios is that the main pod is not null when window resizing happens. Therefore, placePods() will skip the main pod selection and re-appending children process, and start the actual placement directly.   4) Click event: The only click event on small pods is to trigger the switch between the small pod and the large pod. In the click event handler, we first find out if it’s for a small pod, and if it is, simply switch it with the main pod by switching the parents as well as positions / other relevant styles (handled by changeMainPod()). Please note: We do not call placePods() because it may result in reordering the pods. It’s OK that the pods are not in LRU order temporarily. BUG=718159 Review-Url: https://codereview.chromium.org/2898283002 Cr-Commit-Position: refs/heads/master@{#474889} Committed: https://chromium.googlesource.com/chromium/src/+/c1604bc83510da9806cb1c00d3351d8fcb7eb24a

Patch Set 1 #

Total comments: 21

Patch Set 2 : Add more comments #

Patch Set 3 : Simplify the pod placement process and make it adaptive to the virtual keyboard #

Total comments: 24

Patch Set 4 : Address comments and add corner case handling for virtual keyboard #

Total comments: 4

Patch Set 5 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+820 lines, -248 lines) Patch
M ui/login/account_picker/md_screen_account_picker.css View 1 chunk +5 lines, -0 lines 0 comments Download
M ui/login/account_picker/md_screen_account_picker.html View 1 chunk +3 lines, -0 lines 0 comments Download
M ui/login/account_picker/md_user_pod_row.css View 1 7 chunks +86 lines, -15 lines 0 comments Download
M ui/login/account_picker/md_user_pod_row.js View 1 2 3 4 29 chunks +593 lines, -108 lines 0 comments Download
M ui/login/account_picker/md_user_pod_template.html View 1 chunk +133 lines, -125 lines 0 comments Download

Messages

Total messages: 33 (17 generated)
Wenzhao (Colin) Zang
xiyuan@, jdufault@, alemate@, PTAL. This CL might be too long and refer to https://docs.google.com/document/d/1gILlP9VyBvfikcFZifkxZT4dEdZ1nLFV__X6RHT9ZNg/edit# or ...
3 years, 7 months ago (2017-05-23 19:40:11 UTC) #3
rkc
We need, a.) a better title b.) more information in the CL description. Referring people ...
3 years, 7 months ago (2017-05-23 19:47:58 UTC) #5
jdufault
General approach seems fine, it is very challenging to determine which code paths do what ...
3 years, 7 months ago (2017-05-23 20:34:32 UTC) #6
rkc
https://codereview.chromium.org/2898283002/diff/1/ui/login/account_picker/md_user_pod_row.css File ui/login/account_picker/md_user_pod_row.css (right): https://codereview.chromium.org/2898283002/diff/1/ui/login/account_picker/md_user_pod_row.css#newcode1018 ui/login/account_picker/md_user_pod_row.css:1018: .large-pod { On 2017/05/23 20:34:32, jdufault wrote: > As ...
3 years, 7 months ago (2017-05-23 21:25:59 UTC) #7
Wenzhao (Colin) Zang
1) Add lots more inline comments. 2) CL description and title have been updated. https://codereview.chromium.org/2898283002/diff/1/ui/login/account_picker/md_user_pod_row.css ...
3 years, 7 months ago (2017-05-24 00:29:21 UTC) #15
Wenzhao (Colin) Zang
3 years, 7 months ago (2017-05-24 04:59:47 UTC) #17
jdufault
https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js File ui/login/account_picker/md_user_pod_row.js (right): https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js#newcode1191 ui/login/account_picker/md_user_pod_row.js:1191: * @type {number} This doesn't return anything so there ...
3 years, 7 months ago (2017-05-24 17:11:15 UTC) #19
jdufault
https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js File ui/login/account_picker/md_user_pod_row.js (right): https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js#newcode1191 ui/login/account_picker/md_user_pod_row.js:1191: * @type {number} This doesn't return anything so there ...
3 years, 7 months ago (2017-05-24 17:11:15 UTC) #20
Wenzhao (Colin) Zang
jdufault@, In onWindowResize I added a fix to an existing problem. PTAL. Thanks so much. ...
3 years, 7 months ago (2017-05-24 19:23:44 UTC) #21
jdufault
https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js File ui/login/account_picker/md_user_pod_row.js (right): https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js#newcode1191 ui/login/account_picker/md_user_pod_row.js:1191: * @type {number} On 2017/05/24 19:23:43, Wenzhao (Colin) Zang ...
3 years, 7 months ago (2017-05-24 20:44:52 UTC) #22
Wenzhao (Colin) Zang
https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js File ui/login/account_picker/md_user_pod_row.js (right): https://codereview.chromium.org/2898283002/diff/40001/ui/login/account_picker/md_user_pod_row.js#newcode1191 ui/login/account_picker/md_user_pod_row.js:1191: * @type {number} On 2017/05/24 20:44:52, jdufault wrote: > ...
3 years, 7 months ago (2017-05-24 21:36:37 UTC) #23
jdufault
lgtm
3 years, 7 months ago (2017-05-24 22:14:18 UTC) #24
Wenzhao (Colin) Zang
alemate@: please take a look at your earliest convenience. We hope to start testing soon. ...
3 years, 7 months ago (2017-05-26 01:24:36 UTC) #25
Alexander Alekseev
lgtm
3 years, 7 months ago (2017-05-26 01:53:20 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2898283002/80001
3 years, 7 months ago (2017-05-26 01:56:47 UTC) #28
commit-bot: I haz the power
3 years, 7 months ago (2017-05-26 02:49:25 UTC) #31
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/c1604bc83510da9806cb1c00d335...

Powered by Google App Engine
This is Rietveld 408576698