Ticket #3450 (closed defect: fixed)

Opened 2 years ago

Last modified 12 months ago

StackContainer/TabContainer: support non-fixed sized

Reported by: bill Owned by: bill
Priority: normal Milestone: 1.2
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc: alex

Description (last modified by bill) (diff)

The doLayout flag from 0.4 days is broken, and needs to be fixed...

StackContainer? has a doLayout flag that you use to make the height of each pane equal. Example #1:

<div dojoType="dijit.layout.StackContainer" style="height: 300px;"
                doLayout=true>
   <div dojoType=...> short content </div>
   <div dojoType=...> long content </div>
</div>

When the above widget is displayed, regardless of which child is being shown, it will be 300px tall. There will be a scrollbar if necessary, or added whitepace to extend the short content to 300px.

Example #2:

<div dojoType="dijit.layout.StackContainer" doLayout=false>
   <div dojoType=...> short content </div>
   <div dojoType=...> long content </div>
</div>

When the above widget is displayed, it will change height depending on which child is being shown. All it basically does is show one div and hide the others.

As a bonus, maybe we could detect if the user wanted layout automatically, rather than needing a doLayout flag. Seems like we could detect if the user wanted us to adjust heights by whether or not height was set explicitly on the StackContainer? widget. The problem is that the height may be set explicitly, but indirectly, via CSS:

<style>
  #foo { height: 300px; }
</style>
<div dojoType="dijit.layout.StackContainer" id=foo >
   <div dojoType=...> short content </div>
   <div dojoType=...> long content </div>
</div>

Change History

Changed 2 years ago by peller

  • summary changed from PageContainer: remove doLayout flag to StackContainer: remove doLayout flag

Changed 2 years ago by peller

see #4019

Changed 21 months ago by bill

  • description modified (diff)

Changed 21 months ago by bill

  • description modified (diff)

Changed 20 months ago by peller

  • priority changed from normal to high
  • milestone changed from 1.0 to 1.1

Changed 20 months ago by bill

  • description modified (diff)
  • summary changed from StackContainer: remove doLayout flag to StackContainer/TabContainer: support non-fixed sized

Changed 18 months ago by bill

This should be fairly trivial (just don't call resize()) on the child, but the one trick is that the parent object should/shouldn't have the (confusingly named) isContainer flag if it is/isn't doing layout. See ContentPane for comparison.

Changed 16 months ago by alex

  • cc alex added

Changed 16 months ago by bill

  • priority changed from high to normal

Changed 16 months ago by bill

  • owner changed from peller to bill

I'll work on this for 1.1 if I have some free time for it; otherwise will defer to 1.2.

Changed 16 months ago by alex

I know we don't have bugzilla style voting for bugs, so consider this my "+1" for getting this into 1.1

Changed 16 months ago by bill

(In [13092]) Get basic TabContainer? doLayout=false working. Refs #3450. More complex cases probably aren't working yet and the CSS needs some tweaks too.

Changed 16 months ago by bill

  • milestone changed from 1.1 to 1.2

Move all milestone 1.1 tickets to 1.2, except for reopened tickets and tickets opened after 1.1RC1 was released.

This is sort of working already but not completely so leaving open for 1.2.

Changed 12 months ago by bill

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

OK, this is working now (for tabs w/the tab labels on top, only).

Note: See TracTickets for help on using tickets.