public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] input panel: Add drawing of layout
@ 2020-11-27 11:08 Dominic Jäger
  2021-01-26 17:55 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominic Jäger @ 2020-11-27 11:08 UTC (permalink / raw)
  To: pve-devel

The drawing makes clear in a few seconds:
 - what columnT and columnB stand for
 - what additional containers and panels are created
 - to which of those the elements of column1, column2... go to

When you're in the JS debugger and lost overview of where in this
element hierarchy you are, you can quickly check xtype + layout. Then
consulting this drawing solves the mistery.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
---
IMO it's not that easy/quick to see where everything goes to.
initComponent is not that short. I actually drew the layout on paper
to keep an overview while reading it.

There was a drawing already in the commit message of
455f5fe input panel: support convenience top column
so I assumed I'm not the only one who finds such a drawing useful and
it is easier to find here than in the commit message.
 
 src/panel/InputPanel.js | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/panel/InputPanel.js b/src/panel/InputPanel.js
index 67f7352..a9c7263 100644
--- a/src/panel/InputPanel.js
+++ b/src/panel/InputPanel.js
@@ -76,6 +76,20 @@ Ext.define('Proxmox.panel.InputPanel', {
 	});
     },
 
+    /**
+     *  inputpanel, vbox
+     * +---------------------------------------------------------------------+
+     * |                             columnT                                 |
+     * +---------------------------------------------------------------------+
+     * |                          container, hbox                            |
+     * |  +---------------+---------------+---------------+---------------+  |
+     * |  |    column1    |    column2    |    column3    |    column4    |  |
+     * |  | panel, anchor | panel, anchor | panel, anchor | panel, anchor |  |
+     * |  +---------------+---------------+---------------+---------------+  |
+     * +---------------------------------------------------------------------+
+     * |                             columnB                                 |
+     * +---------------------------------------------------------------------+
+     */
     initComponent: function() {
 	let me = this;
 
-- 
2.20.1




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-26 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 11:08 [pve-devel] [PATCH widget-toolkit] input panel: Add drawing of layout Dominic Jäger
2021-01-26 17:55 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal