WAVE-291: Disabled submenu in toolbar incorrectly opens when clicked

2 views
Skip to first unread message

t.br...@gmail.com

unread,
Sep 2, 2011, 10:01:15 AM9/2/11
to hear...@google.com, dani...@google.com, veg...@gmail.com, wave-protocol...@googlegroups.com
Reviewers: hearnden, danilatos, Yuri Z.,

Message:
Instead of having one ToolbarButtonUi controlled by two ToolbarButton-s
(SubmenuToolbarWidget and ToolbarToggleButton) whose state is not
synchronized, SubmenuToolbarWidget now inherits ToolbarToggleButton.
This obviously changes the public API (including exposing the
setListener(ToolbarToggleButton.Listener) method) but
SubmenuToolbarWidget is an "implementation detail": everyone actually
sees it as a SubmenuToolbarView, so it shouldn't cause any breakage or
issue in practice.

That was simpler than ensuring all methods correctly delegated to the
"wrapped" ToolbarToggleButton (which would have become wrapped; it
current is not, which is part of the problem).

Tested on the project I had the issue (DevMode, no unit test).

Please review this at http://codereview.waveprotocol.org/616001

Affected files:
M
src/org/waveprotocol/wave/client/widget/toolbar/SubmenuToolbarWidget.java
M
src/org/waveprotocol/wave/client/widget/toolbar/ToplevelToolbarWidget.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/AbstractToolbarButton.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/ToolbarClickButton.java
M
src/org/waveprotocol/wave/client/widget/toolbar/buttons/ToolbarToggleButton.java


veg...@gmail.com

unread,
Sep 4, 2011, 12:00:54 PM9/4/11
to t.br...@gmail.com, hear...@google.com, dani...@google.com, wave-protocol...@googlegroups.com
This LGTM.
@David, do you have comments?

http://codereview.waveprotocol.org/616001

Reply all
Reply to author
Forward
0 new messages