Flickering and sizing in UIOptions
Antranig Basman
antranig.basman at colorado.edu
Thu Aug 11 05:26:06 UTC 2011
I have been investigating FLUID-4397 to deal with the last of the issues Colin reported during his
integration with WordPress over the weekend. My impression is that the issue is not what it seems... for a
start, in grilling various community members this evening I haven't found a clear impression of why exactly
the panel is made visible on startup and only hidden after the components have fully loaded.
Some accounts pointed to this code in the UIEnhancer -
(line 268)
fluid.uiEnhancer.textSizer.calcInitSize = function (that) {
that.initialSize = fluid.uiEnhancer.getTextSize(that.container);
};
but there doesn't seem a clear reason why this information
fluid.uiEnhancer.getTextSize = function (container) {
return parseFloat(container.css("font-size"));
};
wouldn't be available as soon as the markup loaded, whether visible or not.
Indeed, simply adjusting the markup at
demos/uiOptions/FatPanelUIOptions/html/uiOptions.html line 52
to read
<div id="myUIOptions" class="flc-slidingPanel-panel flc-uiOptions-iframe" style="display:none"></div>
appears to resolve the headline JIRA in that the jumping no longer occurs. The component appears to work
perfectly well with this change, but perhaps someone more familiar with the expected oddities could try this
out and point to something I have missed.
A more serious issue found in looking at this, though, is the issue of the sizing of the panel in the first
place. In order to get this variably sized iframe dialog to appear without scrollbars or clipping would
require dedicated code, basically executing on every significant DOM manipulation within the dialog, to make
sure it was sized correctly. I don't see any evidence of such code lying around... in talking to Michelle
this evening it seems that it might either be lying around in a branch someone, or else in someone's head.
She thought perhaps Justin_o might be the clearest memory of what the status of this impl is.
I find a JIRA for this reported by Heidi at http://issues.fluidproject.org/browse/FLUID-4342 - this issue
should IMO be a release blocker since the component is in many cases unusable without it. I have raised it
and added it to Bug Parade (Peace Be Upon The King)
Antranig
More information about the fluid-work
mailing list