Code Review Request - Enhancement for #883 - DecoratorPanel rounded corners

184 views
Skip to first unread message

John LaBanca

unread,
Feb 14, 2008, 2:59:22 PM2/14/08
to Emily Crutcher, Google Web Toolkit Contributors
Emily -

Its a DecoratorPanel with rounded corners!!!

Description:
It would be nice to have a Panel that can add rounded corners to any Widget.

Fix:
DecoratorPanel is a SimplePanel that creates a nine-box around any Widget, allowing users to customize the corners and border via CSS.  The default style sheet will include borders and rounded corners for this panel.  In addition, DecoratorPanel supports custom style names on rows, so you can create an Nx3 grid where N can be any number of rows with any style names.

Testing:
I manually tested the DecoratorPanel and created a unit test.


Found by: vostapenko, others
Fixed by: jlabanca, ecc

--
Thanks,
John LaBanca
jlab...@google.com
issue883-r1858-DecoratorPanel.patch

Emily Crutcher

unread,
Feb 19, 2008, 1:02:43 PM2/19/08
to John LaBanca, Google Web Toolkit Contributors
Nice work!  As this going into GWT proper, you should probably send out an proposed API message as well. I assume the new default style sheet has some default styling for this?
 
Here are a few nitpicks...
It would be nice if the class comment explained why this code was necessary to make CSS work correctly.
 
 
DEFAULT_ROW_STYLES:
As we use style name elsewhere, DEFAULT_ROW_STYLENAMES seems more appropriate (if longer)
----------------------------
Why is createTR package protected?
 
---------------------------------
Why do we let users change the top/middle/bottom names in the constructor? Traditionally child style names cannot be changed.
 
Also, we might eventually want to use a rendered string table/cloning nodes for efficiently reasons (if, for instance, people start adding rounded corners to everything, and that makes it more difficult to optimize.
------------------------------------
Should we expose the tbody? To solve a bug or allow faster creation, we might end up switching out the implementation, so I'm not sure we should guarantee we are going to always have a table.
-------------------------------------
Nice test code.
 
     :-)
 
               Emily
--
"There are only 10 types of people in the world: Those who understand binary, and those who don't"

John LaBanca

unread,
Feb 20, 2008, 12:55:30 PM2/20/08
to Emily Crutcher, Google Web Toolkit Contributors
committed as r1875

Bruce Johnson

unread,
Feb 20, 2008, 6:27:02 PM2/20/08
to Google-Web-Tool...@googlegroups.com, John LaBanca
On Tue, Feb 19, 2008 at 1:02 PM, Emily Crutcher <e...@google.com> wrote:
Nice work!  As this going into GWT proper, you should probably send out an proposed API message as well.

To add to Emily's suggestion, the ideal is to send out a message informing people of a pending API change before committing, so that people have an opportunity to veto, LGTM, or FHMP (forever hold my peace). That way, we (1) inform the larger team and community of new APIs and (2) reduce the chance that problematic APIs make it into GWT. These API emails are different from -- and more prominent than -- code reviews so that people are more likely to notice them.

barisistanbul

unread,
Feb 27, 2008, 2:17:40 PM2/27/08
to Google Web Toolkit Contributors
Is there any sample/default css to see the DecoratorPanel effect?
I couldn't find any css to see the DecoraterPanel in action.

Thanks
Baris Efe

John LaBanca

unread,
Feb 27, 2008, 4:10:15 PM2/27/08
to Google-Web-Tool...@googlegroups.com
Here are the working styles, including the images used to create borders and rounded corners.
decPanelStyles.zip
Reply all
Reply to author
Forward
0 new messages