Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Tab structure #527

tneil opened this Issue Dec 14, 2012 · 7 comments


None yet
3 participants

tneil commented Dec 14, 2012

Thinking about making tabs easier with an action bar. Instead of having to write all the glue code and piece together different tabs I've been thinking of doing something like the following

<div data-bb-type="action-bar">
    <div data-bb-type="action" data-bb-style="tab" data-bb-overflow="true" data-bb-img="cog.png" data-bb-src="library.htm">Library</div>
    <div data-bb-type="action" data-bb-style="tab" data-bb-selected="true" data-bb-img="cog.png" data-bb-src="smart.htm">Smart</div>
    <div data-bb-type="action" data-bb-style="button" data-bb-overflow="true" data-bb-img="cog.png">Find</div>

The idea is to introduce a data-bb-src attribute that indicates another document fragment that by default would be loaded to populate the tab when the user clicked it. An optional data attribute of data-bb-preload="true" could be specified to preload the tab's contents when the screen loads instead of waiting for the tab to be selected.

The document fragment is essentially a div that would contain all of the contents of that you would like to have inside the tab.

Once the tab is loaded it would stay in memory. i.e. the loading of the tab would only happen once. From then on it would be shown and hidden as the user navigates the tabs.

Something that I'm still trying to figure out is a good way to also allow an intercept point to apply logic to the tab before it is loaded.

Like the idea and would make it cleaner instead of having to add onclick events etc.

As for the intercept point: why not an option data-bb-preload-callback attribute? Or did you mean an intercept point before the tab will be made visible?


tneil commented Dec 14, 2012

I think if you're pre-loading, you will have opportunity to make modifications in the screen's ondomready/onscreenready events. The issue is if you want the tab to be dynamically loaded. You need a way to deal with modifying it before it appears and after it appears.

Hmmm, maybe I don't understand then where you would like to have this interceptor. Just before you make the tab visible?


tneil commented Dec 17, 2012

I think for a "load on demand" tab we would need the same concept as the onscreenready/ondomready... something like an ontabready and ondomready

bbsam commented Apr 15, 2013

Hi TNeil,

May I know the planned release date for the bbUI v0.9.7.

Samdani Shaik.


tneil commented Apr 15, 2013

I don't have a date yet.. we're still working on trying to finish the v0.9.6 work


tneil commented Jul 5, 2013

This will now be covered in our new v1.0 markup for the TabbedPane outlined in issue #935

@tneil tneil closed this Jul 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment