DescriptionAdd a notice about other forms of browsing history to the History WebUI.
Background:
Design doc:
https://docs.google.com/document/d/1ZMDSAd44KmzKhqXPjobZOf9rZezs6VqiBnqpDD0auCU/
Mocks:
https://docs.google.com/presentation/d/1rpR3xB3aYFzXD0U--piuMq3y4XAmoYdawA2HC1cuEjM/
We expand the existing notification that shows whether there are synced
history results. For users who have other forms of browsing history, we
add one more sentence informing them about this fact.
The call to find out about the existence of other forms of browsing history
is asynchronous, just like the call to get web history results. There are
two outcomes:
1. Web history results arrive first. We have to pass the results to
the frontend immediately, which also shows the first sentence of the
notification about synced results. When the ping for other forms of
browsing history returns, we may or may not show the second sentence
according to the response.
2. The ping for other forms of history returns first. We show the notification
saying that there are no synced results, but there are other forms
of browsing history. When the web history results arrive, we update the
first sentence of the notification accordingly.
To make this simple, we keep the the booleans (one for each sentence)
in BrowsingHistoryHandler, and then call a single JS method that refreshes
the notification according to their state.
Furthermore, to match the mocks, we update the logic on whether or not the
notification should float beside the editing controls. If the notification
contains only a single sentence and it fits, it can float; otherwise, it must
be moved under the editing controls. The current logic in CSS only changes
the notification bar from float: right to float: left. However, in the case
when the notification contains two sentences, but still fits beside the
editing controls, this is not enough; the first sentence could still float
beside editing controls. We must therefore also set float: none on them.
To do that, we replace the 'alone' class on the notification bar with an
'overflow' class on top controls, so that we can influence the behavior of
both notification bar and editing controls.
BUG=595332
Committed: https://crrev.com/5872007bbf986d490d45212060d31b101f2cc281
Cr-Commit-Position: refs/heads/master@{#384903}
Patch Set 1 : #Patch Set 2 : Build files. #Patch Set 3 : Moved build dependencies to OS!=iOS #
Total comments: 18
Patch Set 4 : Addressed comments. #Patch Set 5 : Android, Tests #Patch Set 6 : Accessibility test #
Total comments: 2
Patch Set 7 : Update strings. #Patch Set 8 : Rebase. #Messages
Total messages: 21 (8 generated)
|