FIX - add Glass to Companies request filter

This commit is contained in:
DerEchteAlec
2026-08-13 19:11:25 +02:00
parent 71f21b1e3e
commit 4284143cb2
2 changed files with 26 additions and 1 deletions
@@ -10,6 +10,13 @@ const navigationSource = source.slice(
source.indexOf('<SkyPillNavigation'),
source.indexOf('</SkyPillNavigation>') + '</SkyPillNavigation>'.length,
)
const requestFilterSource = source.slice(
source.indexOf('<div class="companies-segment-wrap">'),
source.indexOf(
'</div>',
source.indexOf('<div class="companies-segment-wrap">'),
) + '</div>'.length,
)
describe('CompaniesApp Sky pill navigation contract', () => {
it('uses the full-width sliding glass navigation on the root screen', () => {
@@ -40,4 +47,17 @@ describe('CompaniesApp Sky pill navigation contract', () => {
it('retains tabbar-aware padding on all three root scroll owners', () => {
expect(source.match(/with-tabbar/g)).toHaveLength(3)
})
it('uses the shared sliding Glass system for the request-state filter', () => {
expect(requestFilterSource).toContain('<SkySegmented')
expect(requestFilterSource).toContain('navigation')
expect(requestFilterSource).toContain(':item-count="2"')
expect(requestFilterSource).toContain(
':active-index="requestList === \'open\' ? 0 : 1"',
)
expect(requestFilterSource).toContain(
':aria-label="phone.t(\'Apps.companies.tabs.requests\')"',
)
expect(requestFilterSource.match(/<SkySegmentedButton\b/g)).toHaveLength(2)
})
})
+6 -1
View File
@@ -1197,7 +1197,12 @@ onBeforeUnmount(() => {
with-tabbar
>
<div class="companies-segment-wrap">
<SkySegmented>
<SkySegmented
:active-index="requestList === 'open' ? 0 : 1"
:aria-label="phone.t('Apps.companies.tabs.requests')"
:item-count="2"
navigation
>
<SkySegmentedButton
:active="requestList === 'open'"
@click="requestList = 'open'"