Closed Getty closed 9 years ago
This is a fine implementation, however, after thinking about it, I'd like there to be a "tab_title_max_width" param with a sane, default value, rather than a boolean switch which enables a hard-coded value. This option should it work like the following:
Ext.ux.RapidApp.AppTab.TabPanel
(in 084-AppTab.js#L38
) with a default value of, say, 300 pxRapidApp::Module::Explorer
which passes through to set the option (in the content_area cfg hash at/about Explorer.pm#L212
)$c->config->{'Plugin::RapidApp::TabGui'}
which passes through in kind to RapidApp::Module::Explorer
Done
So, of course after I approve the merge is when I find the problem... There is a bug with this change regarding the "dirty" flag which is applied to the tab title when the inner component is a DataStore with unsaved changes... A red asterisk is appended, and now with this change, the asterisk is wrapped to a new line which shifts everything and screws the whole interface up...
The easist way to test is simply to run rdbic.pl, go to a grid, enable cell editing, and make a change
title and its dropdown. First I fixed the "Close other Tabs" menu to be really not shown when there is no other tab open. I also added "Close Tab" to allow to close the tab without actually reaching the top right X. After that I reached out to understand how RapidApp constructs the TabPanel, which leaded me to Module::Explorer, which I extended with a shorten_tab_titles attribute, which can easily be set on the Catalyst::Plugin::RapidApp::TabGui configuration. If activated, we add a div around the title with the class ra-shorten-tab-titles, which uses CSS to shorten the visual. Still, when you right-click the menu will show you the full title, and it will even word-wrap this title, so that you are able to see it all even if its much longer as the screen. I also added filtering out of returns and br's for the title, to not get a 2 lines tabpanel.