[CrOS Settings] Regression: Update lock screen type radio button logic.
When the user switches the radio button from "PIN" to "PASSWORD" back to "PIN" quickly, the "PASSWORD" button is re-selected on it's own. In the brief moment that that "PIN" is selected, the button on the RHS, which should be labeled as "Set up Pin" is "Change Pin". In order to prevent the radio button from toggling from "PIN" back to "Password" on its own (without user action), the selectedUnlockType is checked again after active lockscreen preferences are changed asynchronously. Replacing "hidden" with a dom-if template shortens the delay of "Set up PIN" and "Change PIN" in a noticeable way, but it doesn't resolve the fact that "incorrect strings may be shown for a brief period, and updating them causes UI flicker" [1]. This still happens from time to time, and is not consistent. [1] https://tinyurl.com/vdxo262 In order to reduce UI flicker, which is unavoidable in instances of failure (fail to change from PIN to password), the "Set up PIN" and "Change PIN" button is modified to change immediately on user action to the intended value: if the user changes from password to PIN, "Set up PIN" becomes the default immediately (as it should). If the lock type fails to change from PIN to password, then UI flicker occurs in that "Set up PIN" changes back to "Change PIN" (as opposed to seeing the "Change PIN" change to "Set up PIN" with higher frequency). There is not a good way around this, the alternative being that a pinwheel of some sort should be visible as async tasks are being performed, and additional UI to show that CrOS was unable to change from PIN to password and vice versa. Bug: 1054327 Change-Id: Iade95bb3c3a44c90a69b069faa160f17b093107b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079834 Commit-Queue: Regan Hsu <hsuregan@chromium.org> Reviewed-by:Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#746676}
Showing
Please register or sign in to comment