Improve requester modal

- Add ability to bind to inputs
- Add customizable button text
- Add example for requester modal with binding
This commit is contained in:
David Vogel 2025-09-04 17:35:51 +02:00
parent 4839cb7e0a
commit 2253e46d09
6 changed files with 249 additions and 29 deletions

View File

@ -15,8 +15,44 @@ type ModalRequester struct {
SignalColor string // A d3c CSS class for the color scheme of the small bar. SignalColor string // A d3c CSS class for the color scheme of the small bar.
ClickAbort input.ClickHandler // Optional input value that can be set by the modal requester.
ClickYes input.ClickHandler // This bound value can be modified even when the requester ended by aborting.
InputBind interface {
input.ValueBinder
input.HTMLInputTyper
}
TextAbort string // Can be used to override the text shown for the abort button.
TextYes string // Can be used to override the text shown for the yes button.
TextNo string // Can be used to override the text shown for the no button.
ClickAbort input.ClickHandler // Fired when the abort button is clicked.
ClickYes input.ClickHandler // Fired when the yes button is clicked.
ClickNo input.ClickHandler // Fired when the no button is clicked.
}
func (c *ModalRequester) buttonTextAbort() string {
if c.TextAbort != "" {
return c.TextAbort
}
return "Abort"
}
func (c *ModalRequester) buttonTextYes() string {
if c.TextYes != "" {
return c.TextYes
}
return "Yes"
}
func (c *ModalRequester) buttonTextNo() string {
if c.TextNo != "" {
return c.TextNo
}
return "No"
} }
func (c *ModalRequester) handleClickAbort(event vugu.DOMEvent) { func (c *ModalRequester) handleClickAbort(event vugu.DOMEvent) {
@ -33,6 +69,13 @@ func (c *ModalRequester) handleClickYes(event vugu.DOMEvent) {
c.SetModal(nil) c.SetModal(nil)
} }
func (c *ModalRequester) handleClickNo(event vugu.DOMEvent) {
if c.ClickNo != nil {
c.ClickNo.ClickHandle(input.ClickEvent{DOMEvent: event})
}
c.SetModal(nil)
}
// OverlayClasses implements OverlayClassesGetter which is used by the overlay package to add classes to overlay elements. // OverlayClasses implements OverlayClassesGetter which is used by the overlay package to add classes to overlay elements.
func (c *ModalRequester) OverlayClasses() (signalClasses, containerClasses string) { func (c *ModalRequester) OverlayClasses() (signalClasses, containerClasses string) {
return c.SignalColor, "" return c.SignalColor, ""

View File

@ -4,9 +4,13 @@
<vg-comp expr="c.IconSlot"></vg-comp> <vg-comp expr="c.IconSlot"></vg-comp>
<span vg-content="c.Message" style="white-space: pre-wrap;"></span> <span vg-content="c.Message" style="white-space: pre-wrap;"></span>
</div> </div>
<div vg-if="c.InputBind != nil" class="d3c-1684441516-flex" style="justify-content: flex-end; align-items: baseline;">
<input:Field :Bind="c.InputBind"></input:Field>
</div>
<div class="d3c-1684441516-flex" style="justify-content: flex-end; align-items: baseline;"> <div class="d3c-1684441516-flex" style="justify-content: flex-end; align-items: baseline;">
<input:Button vg-if="c.ClickAbort != nil" @Click="c.handleClickAbort(event)">Abort</input:Button> <input:Button vg-if="c.ClickAbort != nil" @Click="c.handleClickAbort(event)"><div vg-content="c.buttonTextAbort()"></div></input:Button>
<input:Button vg-if="c.ClickYes != nil" @Click="c.handleClickYes(event)">Yes</input:Button> <input:Button vg-if="c.ClickYes != nil" @Click="c.handleClickYes(event)"><div vg-content="c.buttonTextYes()"></div></input:Button>
<input:Button vg-if="c.ClickNo != nil" @Click="c.handleClickNo(event)"><div vg-content="c.buttonTextNo()"></div></input:Button>
</div> </div>
</layout:Container> </layout:Container>
</div> </div>

View File

@ -74,6 +74,35 @@ func (c *ModalRequester) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
if c.InputBind != nil {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{{Namespace: "", Key: "class", Val: "d3c-1684441516-flex"}, vugu.VGAttribute{Namespace: "", Key: "style", Val: "justify-content: flex-end; align-items: baseline;"}}}
vgparent.AppendChild(vgn)
{
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x50586228C0E9895D^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Field)
if vgcomp == nil {
// create new one if needed
vgcomp = new(input.Field)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.Bind = c.InputBind
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{{Namespace: "", Key: "class", Val: "d3c-1684441516-flex"}, vugu.VGAttribute{Namespace: "", Key: "style", Val: "justify-content: flex-end; align-items: baseline;"}}} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute{{Namespace: "", Key: "class", Val: "d3c-1684441516-flex"}, vugu.VGAttribute{Namespace: "", Key: "style", Val: "justify-content: flex-end; align-items: baseline;"}}}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
@ -100,8 +129,9 @@ func (c *ModalRequester) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Abort"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn.SetInnerHTML(c.buttonTextAbort())
return return
}) })
vgout.Components = append(vgout.Components, vgcomp) vgout.Components = append(vgout.Components, vgcomp)
@ -130,8 +160,40 @@ func (c *ModalRequester) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Yes"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn.SetInnerHTML(c.buttonTextYes())
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
if c.ClickNo != nil {
{
vgcompKey := vugu.MakeCompKey(0x45F33659AA886A9A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil {
// create new one if needed
vgcomp = new(input.Button)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleClickNo(event) })
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "div", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(c.buttonTextNo())
return return
}) })
vgout.Components = append(vgout.Components, vgcomp) vgout.Components = append(vgout.Components, vgcomp)

View File

@ -24,6 +24,26 @@ func (c *PageOverlays) handleSimpleModalButton(event vugu.DOMEvent) {
}) })
} }
func (c *PageOverlays) handleSimpleModalWithBindButton(event vugu.DOMEvent) {
timeValue := time.Now()
c.SetModal(&overlay.ModalRequester{
IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{"style": "font-size: 2em;"}},
Title: "Appointment",
Message: "Enter a time and date:",
InputBind: input.ValueBindAny{Value: &timeValue},
SignalColor: "d3c-color-attention",
TextYes: "Confirm",
ClickYes: input.ClickFunc(func(event input.ClickEvent) {
c.AddToast(event.EventEnv(), &overlay.ToastSimple{
IconSlot: &icons.LClock{AttrMap: vugu.AttrMap{"style": "font-size: 2em;", "class": "d3c-color-attention d3c-icon-use-color"}},
Message: "You have chosen the following date and time: " + timeValue.Format(time.DateTime),
SignalColor: "d3c-color-attention",
})
}),
})
}
func (c *PageOverlays) handleSimpleToastButton(event vugu.DOMEvent) { func (c *PageOverlays) handleSimpleToastButton(event vugu.DOMEvent) {
c.AddToast(event.EventEnv(), &overlay.ToastSimple{ c.AddToast(event.EventEnv(), &overlay.ToastSimple{
IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{"style": "font-size: 2em;"}}, IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{"style": "font-size: 2em;"}},

View File

@ -20,6 +20,22 @@
</view:Code> </view:Code>
<input:Button @Click="c.handleSimpleModalButton(event)">Open simple modal</input:Button> <input:Button @Click="c.handleSimpleModalButton(event)">Open simple modal</input:Button>
<p>A requester can also be bound to a variable:</p>
<view:Code>
<pre vg-content='"func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.SetModal(&overlay.ModalRequester{\n" +
" IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" +
" Title: \"Appointment\",\n" +
" Message: \"Enter a time and date:\",\n" +
" InputBind: input.ValueBindAny{Value: &timeValue},\n" +
" SignalColor: \"d3c-color-attention\",\n" +
" TextYes: \"Confirm\",\n" +
" ClickYes: input.ClickFunc(func(event input.ClickEvent) {...}),\n" +
" })\n" +
"}"' style="margin: 0;"></pre>
</view:Code>
<input:Button @Click="c.handleSimpleModalWithBindButton(event)">Open simple modal with bound value</input:Button>
<h2>Toasts</h2> <h2>Toasts</h2>
<p>A simple toast with an icon slot and custom color setting can be found in the overlay package. Use it with:</p> <p>A simple toast with an icon slot and custom color setting can be found in the overlay package. Use it with:</p>
<view:Code> <view:Code>

View File

@ -31,7 +31,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x194F4C7AF2E5A2B0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x6122140AA7970454^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.Container)
if vgcomp == nil { if vgcomp == nil {
@ -62,7 +62,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Overlays are handled by the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x5D2C5A226687E9BD^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x1B9CC39770823BF5^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -99,7 +99,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Every page or component that creates overlays has to embed the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8B97CF8B0E070FF7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x5A00C43B8907AA2A^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -126,7 +126,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: " structure. Your wiring function also needs to set the reference to your "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xFF20E0AE5D2C549C^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xFBC0CBC5ECD097E3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -166,7 +166,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x57871D3A7975B6E6^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xB6D21A4B8525BB8B^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -207,7 +207,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xBBA873308CD4A293^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xDBC72B8B2CD6DEC6^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -234,6 +234,81 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
} }
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "p", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML("A requester can also be bound to a variable:"))
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0x63C4F75486DED1E9^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil {
// create new one if needed
vgcomp = new(view.Code)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "pre", Attr: []vugu.VGAttribute{{Namespace: "", Key: "style", Val: "margin: 0;"}}}
vgparent.AppendChild(vgn)
vgn.SetInnerHTML("func (c *PageOverlays) handleButton(event vugu.DOMEvent) {\n" +
" c.SetModal(&overlay.ModalRequester{\n" +
" IconSlot: &icons.LInfoCircle{AttrMap: vugu.AttrMap{\"style\": \"font-size: 2em;\"}},\n" +
" Title: \"Appointment\",\n" +
" Message: \"Enter a time and date:\",\n" +
" InputBind: input.ValueBindAny{Value: &timeValue},\n" +
" SignalColor: \"d3c-color-attention\",\n" +
" TextYes: \"Confirm\",\n" +
" ClickYes: input.ClickFunc(func(event input.ClickEvent) {...}),\n" +
" })\n" +
"}")
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn)
{
vgcompKey := vugu.MakeCompKey(0xA4081932846E05D1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil {
// create new one if needed
vgcomp = new(input.Button)
vgin.BuildEnv.WireComponent(vgcomp)
}
vgin.BuildEnv.UseComponent(vgcompKey, vgcomp) // ensure we can use this in the cache next time around
vgcomp.Click = input.ClickFunc(func(event input.ClickEvent) { c.handleSimpleModalWithBindButton(event) })
vgcomp.DefaultSlot = vugu.NewBuilderFunc(func(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn := &vugu.VGNode{Type: vugu.VGNodeType(3)}
vgout = &vugu.BuildOut{}
vgout.Out = append(vgout.Out, vgn)
vgparent := vgn
_ = vgparent
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "Open simple modal with bound value"}
vgparent.AppendChild(vgn)
return
})
vgout.Components = append(vgout.Components, vgcomp)
vgn = &vugu.VGNode{Component: vgcomp}
vgparent.AppendChild(vgn)
}
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\n\t\t"}
vgparent.AppendChild(vgn)
vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "h2", Attr: []vugu.VGAttribute(nil)} vgn = &vugu.VGNode{Type: vugu.VGNodeType(3), Namespace: "", Data: "h2", Attr: []vugu.VGAttribute(nil)}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
vgn.SetInnerHTML(vugu.HTML("Toasts")) vgn.SetInnerHTML(vugu.HTML("Toasts"))
@ -245,7 +320,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x64B98A0E9BE551C9^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xD4553E3A6B4CDAC5^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -283,7 +358,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xB402F0639D2AEBFC^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF0ED0ED27EF42994^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil { if vgcomp == nil {
@ -302,7 +377,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x21A6EE2734D420B3^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xF867B04EF9CAB93D^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -330,7 +405,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xE49C7E0D74507044^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x8893AD0E010D9420^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -373,7 +448,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "A shorter version of this is "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "A shorter version of this is "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x275D98A4726B4800^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x18470969C6AFC448^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -415,7 +490,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x4F335D05F6793367^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2D884CCCED60ED30^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -448,7 +523,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0x93D96FEA7B1F8A08^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xCA36BD2A0004F7B1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -481,7 +556,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xB1038AF17C68FC03^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x86FB3ECC963617F^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -514,7 +589,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgparent := vgn vgparent := vgn
_ = vgparent _ = vgparent
{ {
vgcompKey := vugu.MakeCompKey(0xDFECE752D6DEC4B1^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x75545EEE368E88F1^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -545,7 +620,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xF9EB6BFBA1B4F756^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x170E6B6004248D96^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -579,7 +654,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x47E12F12AE2A0E7^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x14E84F6F0F2D45AC^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -614,7 +689,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "To let the toast close itself after some time, you can use the "} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "To let the toast close itself after some time, you can use the "}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x3E15BCF6E929340E^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x984905AE566E7226^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.CodeInline)
if vgcomp == nil { if vgcomp == nil {
@ -644,7 +719,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xD5D366D18AAA5FB2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x9C5F61CA0305F660^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -678,7 +753,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x8516880ECD5A78C0^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xC9431316B96BAF61^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {
@ -716,7 +791,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0x2E967CD9233EB11B^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x4CBF66AED2BB01C3^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*view.Code)
if vgcomp == nil { if vgcomp == nil {
@ -759,7 +834,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xEEAE6C3E586548F2^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0x2E51C28B04B3A7CF^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*layout.ContainerHorizontal)
if vgcomp == nil { if vgcomp == nil {
@ -778,7 +853,7 @@ func (c *PageOverlays) Build(vgin *vugu.BuildIn) (vgout *vugu.BuildOut) {
vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"} vgn = &vugu.VGNode{Type: vugu.VGNodeType(1), Data: "\n\t\t\t"}
vgparent.AppendChild(vgn) vgparent.AppendChild(vgn)
{ {
vgcompKey := vugu.MakeCompKey(0xCC2B0FE27CCC0091^vgin.CurrentPositionHash(), vgiterkey) vgcompKey := vugu.MakeCompKey(0xEF725FD9373E52CD^vgin.CurrentPositionHash(), vgiterkey)
// ask BuildEnv for prior instance of this specific component // ask BuildEnv for prior instance of this specific component
vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button) vgcomp, _ := vgin.BuildEnv.CachedComponent(vgcompKey).(*input.Button)
if vgcomp == nil { if vgcomp == nil {