[dojo-contributors] BorderContainer etc. styling

Bill Keese bill at dojotoolkit.org
Thu May 22 07:02:31 EDT 2008


Adam L. Peller wrote:
> Bill,
> 
> Thanks for the explanation of why these changes are necessary.  It makes 
> me fear them less :-)

OK, good.

> 
> Still, I am concerned that making something "look good out of the box" 
> is making assumptions about the use case.

I wouldn't use the word "assumption".  We are setting up defaults, 
knowing that some users will like them and some won't.

The theory is that this is a net win; it'll make things look better in 
general and most people (not all people) will like it.  It's like adding 
default padding for a TabContainer... some existing users will be 
unhappy w/that change, but most users (and future users) will think it 
looks better and be happy.


> In this case, it's 
> themeTester.  Presently, BorderContainer in the simplest cases, like 
> LayoutContainer before it, makes no mention of splitters. They're an 
> add-on.  So it's not unreasonable to assume that people are using them 
> with simple content (rather than nested _Container widgets) and expect 
> panes to abut each other -- and that looks fine out of the box to them, 
> but if space suddenly appeared, it might not.  Such a change isn't just 
> look and feel, in my view, it breaks the contract of the widget, which 
> is to simply position rectangles.  Are people going to complain?

I'm sure some people will complain which is why the release notes should 
say something like: Use this CSS to get rid of gutters in 
BorderContainer: ...

But in general, this should make BorderContainer layouts prettier, 
regardless of whether or not they have resizable panes.

> 
> I agree that 'magic' to connect the concepts of container margins with 
> panel spacers, or 'gutters' in designer-speak, doesn't feel right.  I 
> like the idea of an attribute (on the container should be sufficient? or 
> maybe child selector CSS?) to control this behavior, but requiring users 
> to put in a setting to get the 1.1 behavior might be a viewed as a 
> breaking change.  Is it possible we could flip the logic around and have 
> the 1.1 behavior be the default?  gutters=true?

No, unfortunately that breaks the principle of "looks good out of the box".

Remember that we guarantee "your site will still work after upgrading 
dojo; you don't have to change your code".  We never said "it'll look 
exactly the same".  That doesn't mean that users won't complain but at 
least we aren't breaking our promise.

I'm not necessarily against having a gutters= flag, but would have to 
think about what it means... presumably both the outer gutters 
(implemented as padding on the BorderContainer dom node), and the 
gutters between panes would disappear.... but then that still leaves the 
original problems with nested borders, and the missing borders on splitters.



More information about the dojo-contributors mailing list