@things-factory/figure-ui 10.1.174 → 10.1.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-ui",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.175",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@operato/utils": "^10.0.0",
|
|
44
44
|
"@things-factory/ai-assistant": "^10.1.170",
|
|
45
45
|
"@things-factory/figure-service": "^10.1.172",
|
|
46
|
-
"@things-factory/figure-viewer": "^10.1.
|
|
46
|
+
"@things-factory/figure-viewer": "^10.1.175",
|
|
47
47
|
"@things-factory/setting-base": "^10.1.167",
|
|
48
48
|
"three": "^0.185.1"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "36a28986fdfb366ac31516b63369cf5733a82c31"
|
|
51
51
|
}
|
|
@@ -36,8 +36,8 @@ async function until(fn, args, what, ms = 8000) {
|
|
|
36
36
|
await sleep(50)
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
async function mount(kind) {
|
|
40
|
-
await read(kind => harness.mount(kind, null), kind)
|
|
39
|
+
async function mount(kind, templates = []) {
|
|
40
|
+
await read((kind, templates) => harness.mount(kind, null, templates), kind, templates)
|
|
41
41
|
await until(
|
|
42
42
|
() => {
|
|
43
43
|
try {
|
|
@@ -172,6 +172,11 @@ describe('a group\'s 「⋯」: its rarer actions, by the mouse or the keyboard'
|
|
|
172
172
|
await until(() => document.activeElement?.localName === 'ox-popup-menu', [], 'the menu open, with the focus')
|
|
173
173
|
const items = await read(() => [...document.querySelectorAll('ox-popup-menu[active] ox-popup-menuitem')].map(i => i.getAttribute('label')))
|
|
174
174
|
assert.deepEqual(items, ['figure.button.detach'])
|
|
175
|
+
/*
|
|
176
|
+
An item can take the focus once it has drawn (ox-popup-menuitem sets its tabindex in firstUpdated); an arrow before
|
|
177
|
+
that leaves the focus on the menu. A hand is never that quick: one in five runs here was (2026-10-17).
|
|
178
|
+
*/
|
|
179
|
+
await until(() => !!document.querySelector('ox-popup-menu[active] ox-popup-menuitem[tabindex]'), [], 'the item ready')
|
|
175
180
|
await page().keyboard.press('ArrowDown')
|
|
176
181
|
/* The item takes the focus on the menu's next update; Enter goes to it from then. */
|
|
177
182
|
await until(() => document.activeElement?.localName === 'ox-popup-menuitem', [], 'the item chosen')
|
|
@@ -238,4 +243,20 @@ describe('the parts panel stands at the side\'s heights (2026-10-16)', () => {
|
|
|
238
243
|
assert.equal(heights.tiles.length, 1, `one tile height: ${heights.tiles}`)
|
|
239
244
|
assert.equal(heights.import, 30, 'the file import on one line, its own row')
|
|
240
245
|
})
|
|
246
|
+
|
|
247
|
+
/* A static guard sees the sizes written down; an icon with none stands at md-icon's own 24 (the recipe catalog's did). */
|
|
248
|
+
test('every icon the modeller shows stands in one of the three sizes, the ones with no size of their own too', async () => {
|
|
249
|
+
/* With a template the parts panel offers the recipe catalog -- the button whose icon had no size. */
|
|
250
|
+
await mount('rollers', [{ name: 'probe-template', target: 'part' }])
|
|
251
|
+
assert.ok(await read(() => !!document.querySelector('figure-editor').shadowRoot.querySelector('figure-parts').shadowRoot.querySelector('button[recipe-catalog]')), 'the recipe catalog offered')
|
|
252
|
+
const sizes = await read(() => {
|
|
253
|
+
const all = []
|
|
254
|
+
const walk = root => { for (const e of root.querySelectorAll('*')) { all.push(e); if (e.shadowRoot) walk(e.shadowRoot) } }
|
|
255
|
+
walk(document.querySelector('figure-editor').shadowRoot)
|
|
256
|
+
const icons = all.filter(e => e.localName === 'md-icon' && e.checkVisibility() && e.getBoundingClientRect().width > 0)
|
|
257
|
+
return icons.map(e => `${Math.round(e.getBoundingClientRect().width)} ${e.textContent.trim()}`)
|
|
258
|
+
})
|
|
259
|
+
assert.ok(sizes.length > 20, `icons seen: ${sizes.length}`)
|
|
260
|
+
assert.deepEqual(sizes.filter(s => !['16', '18', '20'].includes(s.split(' ')[0])), [])
|
|
261
|
+
})
|
|
241
262
|
})
|