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

Issue 1222823004: Make the menu items in the drawer change colour when tapped, per Material spec. (Closed)

Created:
5 years, 5 months ago by Hixie
Modified:
5 years, 5 months ago
Reviewers:
abarth-chromium
CC:
abarth-chromium, gregsimon, jackson_old, mojo-reviews_chromium.org, qsr+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Make the menu items in the drawer change colour when tapped, per Material spec. This is done by the following steps: - Make Inherited classes notify their descendants when their state changes. - Make Components track which Inherited classes they looked at. - Make Components handle being notified of state changes by rebuilding if the changed ancestor is of a type we've looked at. - Refactor setState() and scheduleBuild(). - Make the "buildDirtyComponents" phase support incrementally building more components as each one finds it needs to update itself. The way this works is that when the menu item updates its color, it does so by changing a DefaultTextStyle (Inherited) node in its tree. That node then notifies its ancestors, which include in particular the Text component, which uses DefaultTextStyle. The notification is received, and, even though we're already in the rebuild phase, the Text queues itself up to be rebuilt as well. Since we now support adding people to the rebuild phase while it's active, it gets rebuilt as well, and all is well. This CL depends on the fix in https://codereview.chromium.org/1218183009 R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/8a1462dbfce551e5db01ab83377e5c3c28179cd0

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -28 lines) Patch
M sky/sdk/lib/widgets/default_text_style.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sky/sdk/lib/widgets/theme.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sky/sdk/lib/widgets/widget.dart View 6 chunks +69 lines, -28 lines 2 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
lgtm https://codereview.chromium.org/1222823004/diff/1/sky/sdk/lib/widgets/widget.dart File sky/sdk/lib/widgets/widget.dart (right): https://codereview.chromium.org/1222823004/diff/1/sky/sdk/lib/widgets/widget.dart#newcode234 sky/sdk/lib/widgets/widget.dart:234: child._dependencies.contains(runtimeType)) Do we want to capture runtimeType in ...
5 years, 5 months ago (2015-07-06 20:13:43 UTC) #2
Hixie
5 years, 5 months ago (2015-07-06 20:17:27 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
8a1462dbfce551e5db01ab83377e5c3c28179cd0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698