Skip to content
Commit e108b3cf authored by Zhe Li's avatar Zhe Li Committed by Chromium LUCI CQ
Browse files

[Empty States] Add empty state illustrations to tab switcher UI

- Add TabListEmptyCoordinator class to initialize empty state resources and use TabModelObserver and TabModelSelectorObserver to decide when to add /remove empty view.
    Add empty state view when:
    - a. On closing tab and normal tab count is going to be 0.
    - b. On toggle tab model selector to normal tab model and normal tab count is 0.
    - c On register tab switcher layout, add empty view when recycler is empty in TabListCoordinator.
    Remove empty state view when:
    - a. Adding a new tab.
    - b. Undo a closed tab.
    - c. On toggle tab model selector to go from normal tab model with 0 tab to incognito (We never apply empty view to incognito model).
    - d. On unregister tab switcher layout.

- Apply phone_tab_switcher_empty_state_illustration.xml to icon image view when form factor is phone.
- Apply tablet_tab_switcher_empty_state_illustration.xml to icon image view when form factor is tablet.

Phone demo: https://drive.google.com/file/d/17deVSRomQUQ1wj5Ml04FTM3tJ0ZXXKZo/view?usp=sharing
Tablet demo: https://drive.google.com/file/d/1012QQcwxmBoqx7TUjOun7BlO6z2sP4o6/view?usp=sharing

Change-Id: I43b89866ae612a05912b0256790cd538b38417f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4531843


Reviewed-by: default avatarTheresa Sullivan <twellington@chromium.org>
Commit-Queue: Theresa Sullivan <twellington@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1147331}
parent e95ecffa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment