PDA

View Full Version : configs - getter and setter methods should not clutter the list of configs



LesJ
13 Jul 2017, 7:40 AM
Got to this panel doc page (https://docs.sencha.com/extjs/6.5.0/modern/Ext.Panel.html#cfg-style)and mouse over the configs button which lists 137 configs.

Is it me or the various getter and setter methods massively clutter the list of all configs?

I have a 34" monitor at work and the panel config list barely fits on the maximized doc page.

The list of all configs should occupy a lot less space. Is it necessary to display all config getters and setters?

Can a tooltip or a label indicate that there is a getter or a setter method attached to a config?

mitchellsimoens
13 Jul 2017, 10:41 AM
For people new to Ext JS, showing the getter/setter right there with the config can be very helpful.

I'm not sure what you mean by the config list barely fits. If the configs are collapsed, the getters/setters aren't in the way then? If the configs are expanded, the getters/setters only add to the documentation but getting rid of them wouldn't solve the issue of everything fitting as we add more and more text/examples would add to the height of things.

LesJ
13 Jul 2017, 10:58 AM
For people new to Ext JS, showing the getter/setter right there with the config can be very helpful.

I'm not sure what you mean by the config list barely fits. If the configs are collapsed, the getters/setters aren't in the way then? If the configs are expanded, the getters/setters only add to the documentation but getting rid of them wouldn't solve the issue of everything fitting as we add more and more text/examples would add to the height of things.

The problem is that these getter and setter methods listed under the config name take a lot of space.

As I said, if I maximize the panel documentation page on a 34" monitor and then mouse over configs, the popup barely fits on the page. Sure, you can scroll, but these links need not be present.

I agree that knowing that the config has a getter or setter is helpful, but the existence these methods should be indicated either as label next to the "bind" label or in a tooltip.

I rarely click these links, so they don't need to be clickable.

The are are 137 config listed in the popup and well over 200 getter and setter methods.

The configs would occupy a lot less space and therefore less scrolling would be required if the each getter or setter was not listed on a separate line.

LesJ
13 Jul 2017, 11:15 AM
As an example, vertical space could be saved by replacing getter and setter methods with labels.

Another idea is to indicate the existence of these methods in a tooltip.


autoDestroy getAutoDestory
setAutoDestroy
autoSize
getAutoSize
setAutoSize


autoDestroy BIND SET GET
autoSize BIND SET GET

LesJ
13 Jul 2017, 11:54 AM
The other thing that I noticed is that the documentation of the getter and setter methods states the obvious.

Here's the defaultToolsWeight (https://docs.sencha.com/extjs/6.5.0/modern/Ext.Panel.html#cfg-defaultToolWeights)doc. It's kind of obvious what these methods are supposed to do. I'm not sure if there's a need to document it.

One method sets the config and the other method gets the config.

slemmon
13 Jul 2017, 1:17 PM
Hi,

We've got a feature request internally for getter / setter filtering at some stage. We'll also consider badges for undocumented (auto-generated) setter / getter documentation and leave the current view or something like it for getter / setter documentation that has been expanded beyond the basic "gets a thing" and "sets a thing".

Thanks again for the feedback!