@operato/context 10.29.7 → 10.29.9
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/CHANGELOG.md +17 -0
- package/coverage/lcov-report/index.html +79 -64
- package/coverage/lcov.info +14026 -11895
- package/dist/src/tools/ox-page-action-context-bar.js +5 -14
- package/dist/src/tools/ox-page-action-context-bar.js.map +1 -1
- package/dist/src/tools/ox-page-title-bar.js +5 -3
- package/dist/src/tools/ox-page-title-bar.js.map +1 -1
- package/dist/test/page-frames.test.js +8 -4
- package/dist/test/page-frames.test.js.map +1 -1
- package/dist/test/page-title-description.test.js +17 -0
- package/dist/test/page-title-description.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/test/page-frames.test.ts +8 -4
- package/test/page-title-description.test.ts +19 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/context",
|
|
3
3
|
"description": "Webcomponent context following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "10.29.
|
|
5
|
+
"version": "10.29.9",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@material/web": "^2.0.0",
|
|
70
|
-
"@operato/help": "^10.29.
|
|
71
|
-
"@operato/input": "^10.29.
|
|
72
|
-
"@operato/layout": "^10.29.
|
|
73
|
-
"@operato/shell": "^10.29.
|
|
74
|
-
"@operato/styles": "^10.29.
|
|
70
|
+
"@operato/help": "^10.29.9",
|
|
71
|
+
"@operato/input": "^10.29.9",
|
|
72
|
+
"@operato/layout": "^10.29.9",
|
|
73
|
+
"@operato/shell": "^10.29.9",
|
|
74
|
+
"@operato/styles": "^10.29.9",
|
|
75
75
|
"@operato/utils": "^10.29.1",
|
|
76
76
|
"lit": "^3.1.2",
|
|
77
77
|
"lodash-es": "^4.17.21"
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"prettier --write"
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "24e4809ab0168eef48792291f72b11f75d8179ad"
|
|
112
112
|
}
|
package/test/page-frames.test.ts
CHANGED
|
@@ -34,7 +34,11 @@ class WorkScreen extends LitElement {
|
|
|
34
34
|
customElements.define('test-work-screen', WorkScreen)
|
|
35
35
|
|
|
36
36
|
describe('page frames', () => {
|
|
37
|
-
|
|
37
|
+
/*
|
|
38
|
+
* 2026-10-05: the column fills the window between two equal gutters (user decision: fill the page,
|
|
39
|
+
* responsive). It used to stop at 1080px on the left and leave the right side empty.
|
|
40
|
+
*/
|
|
41
|
+
it('document: the column fills the window, 16 top / 16 gutters / 40 bottom, sections 24px apart, the page scrolls', async () => {
|
|
38
42
|
const host = await fixture<HTMLElement>(html`<div style="width: 1600px; height: 600px"><test-document-screen></test-document-screen></div>`)
|
|
39
43
|
const screen = host.querySelector('test-document-screen') as DocumentScreen
|
|
40
44
|
await screen.updateComplete
|
|
@@ -42,13 +46,13 @@ describe('page frames', () => {
|
|
|
42
46
|
const [first, second] = Array.from(screen.shadowRoot!.querySelectorAll('.page-section'))
|
|
43
47
|
const style = getComputedStyle(page)
|
|
44
48
|
|
|
45
|
-
expect(Math.round(page.getBoundingClientRect().width)).to.equal(
|
|
46
|
-
expect([style.paddingTop, style.paddingRight, style.paddingBottom, style.paddingLeft]).to.deep.equal(['
|
|
49
|
+
expect(Math.round(page.getBoundingClientRect().width)).to.equal(1600)
|
|
50
|
+
expect([style.paddingTop, style.paddingRight, style.paddingBottom, style.paddingLeft]).to.deep.equal(['16px', '16px', '40px', '16px'])
|
|
47
51
|
expect(Math.round(second.getBoundingClientRect().top - first.getBoundingClientRect().bottom)).to.equal(24)
|
|
48
52
|
expect(getComputedStyle(screen).overflowY).to.equal('auto')
|
|
49
53
|
|
|
50
54
|
const actions = screen.shadowRoot!.querySelector('.page-section-actions') as HTMLElement
|
|
51
|
-
expect(Math.round(actions.getBoundingClientRect().right)).to.equal(Math.round(page.getBoundingClientRect().right) -
|
|
55
|
+
expect(Math.round(actions.getBoundingClientRect().right)).to.equal(Math.round(page.getBoundingClientRect().right) - 16)
|
|
52
56
|
})
|
|
53
57
|
|
|
54
58
|
it('work surface: the content fills and scrolls inside itself, the page does not scroll', async () => {
|
|
@@ -41,3 +41,22 @@ describe('ox-page-title-bar description', () => {
|
|
|
41
41
|
expect(el.shadowRoot!.querySelector('[description]') === null).to.equal(true)
|
|
42
42
|
})
|
|
43
43
|
})
|
|
44
|
+
|
|
45
|
+
describe('ox-page-title-bar gutter', () => {
|
|
46
|
+
/*
|
|
47
|
+
* The title's first letter stands on the same line as the page's first letter: the bar's left
|
|
48
|
+
* padding plus the title box's own 4px equals the page gutter. It used to be 0 + 4, and on a
|
|
49
|
+
* document screen the title (x214) and the content (x229) were 15px apart (2026-10-05, :4000).
|
|
50
|
+
*/
|
|
51
|
+
it('puts the title text at the page gutter', async () => {
|
|
52
|
+
const host = await fixture<HTMLElement>(html`<div style="--ui-gutter: 16px; --spacing-small: 4px; --spacing-medium: 8px"><ox-page-title-bar></ox-page-title-bar></div>`)
|
|
53
|
+
store.dispatch({ type: 'UPDATE_CONTEXT', context: { title: 'maintenance' } } as any)
|
|
54
|
+
const el = host.querySelector('ox-page-title-bar') as HTMLElement & { updateComplete: Promise<unknown> }
|
|
55
|
+
await el.updateComplete
|
|
56
|
+
await el.updateComplete
|
|
57
|
+
const titler = el.shadowRoot!.querySelector('[titler]') as HTMLElement
|
|
58
|
+
const offset = titler.getBoundingClientRect().left + parseFloat(getComputedStyle(titler).paddingLeft) - el.getBoundingClientRect().left
|
|
59
|
+
|
|
60
|
+
expect(Math.round(offset)).to.equal(16)
|
|
61
|
+
})
|
|
62
|
+
})
|