Add layout components 0001-0025
Stack through StickyHeader, with behavior tests and gallery demos. kit gains Arrive, Settle (paint-time layout check) and Shade. Several actions return named ui.Element results; mygo vet forbids elements in structs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b34562333b
commit
4efaf2680f
41 files changed
+1765
-11
No files matched your search
@@ -116,8 +116,13 @@ func TestRulesCatch(t *testing.T) {
|
||||
{"directive", "", "package x\n// Files.\n//go:generate echo\n", comments, 0},
|
||||
{"good", "button/icon_button.go", head + "func IconButton(c *ui.Context, o IconButtonOptions) ui.Element\n" +
|
||||
"type IconButtonOptions struct{}\n", components, 0},
|
||||
{"result", "button/split.go", head + "func Split(c *ui.Context) SplitResult\ntype SplitResult struct{}\n",
|
||||
components, 0},
|
||||
{"parts", "button/split.go", head + "func Split(c *ui.Context) (root, menu ui.Element)\n", components, 0},
|
||||
{"struct result", "button/split.go", head + "func Split(c *ui.Context) SplitResult\ntype SplitResult struct{}\n",
|
||||
components, 1},
|
||||
{"unnamed parts", "button/split.go", head + "func Split(c *ui.Context) (ui.Element, ui.Element)\n",
|
||||
components, 1},
|
||||
{"root not first", "button/split.go", head + "func Split(c *ui.Context) (menu, root ui.Element)\n",
|
||||
components, 1},
|
||||
{"two", "button/a.go", head + "func A(c *ui.Context) ui.Element\nfunc B(c *ui.Context) ui.Element\n",
|
||||
components, 1},
|
||||
{"file name", "button/b.go", head + "func KPIGrid(c *ui.Context) ui.Element\n", components, 1},
|
||||
@@ -127,6 +132,10 @@ func TestRulesCatch(t *testing.T) {
|
||||
components, 1},
|
||||
{"returns", "button/a.go", head + "func A(c *ui.Context) int\n", components, 1},
|
||||
{"ctx name", "button/a.go", head + "func A(ctx *ui.Context) ui.Element\n", components, 1},
|
||||
{"content after options", "button/a.go", head + "func A(c *ui.Context, o AOptions, content func()) ui.Element\n",
|
||||
components, 0},
|
||||
{"two after options", "button/a.go", head + "func A(c *ui.Context, o AOptions, a, b func()) ui.Element\n",
|
||||
components, 1},
|
||||
{"grouped options", "button/a.go", head + "func A(c *ui.Context, x, y AOptions) ui.Element\n",
|
||||
components, 1},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user