mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
feat(notices): document sync joins the release notice as a fourth, wide card
Paperless-ngx, Papra, Nextcloud, OpenCloud and Synology Drive are a headliner of this release and were missing from the notice. The card runs across the row under the three upright ones, picture beside the text, so the panel keeps its height: the wordmark without its API pill, the two-way arrow, and the five stores as tiles. The panel's grid row is capped at the panel's height, so a short viewport scrolls the left column instead of clipping the support buttons on the right. The headline counts four, the intro and the card texts are shorter, and the Dawarich card drops its last sentence, in all 23 languages. The release e2e test asks with the bundle version, as the client does.
This commit is contained in:
@@ -73,6 +73,13 @@ export const SYSTEM_NOTICES: SystemNotice[] = [
|
||||
titleKey: 'system_notice.release_notes.feature_dawarich_title',
|
||||
bodyKey: 'system_notice.release_notes.feature_dawarich_body',
|
||||
},
|
||||
{
|
||||
iconName: 'FolderSync',
|
||||
visual: 'docsync',
|
||||
layout: 'wide',
|
||||
titleKey: 'system_notice.release_notes.feature_docsync_title',
|
||||
bodyKey: 'system_notice.release_notes.feature_docsync_body',
|
||||
},
|
||||
],
|
||||
footnoteKey: 'system_notice.release_notes.footnote',
|
||||
notes: {
|
||||
|
||||
@@ -32,6 +32,8 @@ export interface NoticeReleaseFeature {
|
||||
iconName: string;
|
||||
/** A small illustration the client draws on the card; unknown names fall back to the icon. */
|
||||
visual?: string;
|
||||
/** `wide` spans the row, picture beside the text; the default is an upright card. */
|
||||
layout?: 'card' | 'wide';
|
||||
titleKey: string;
|
||||
bodyKey: string;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ const { mockGetActive, mockDismiss } = vi.hoisted(() => ({ mockGetActive: vi.fn(
|
||||
vi.mock('../../src/systemNotices/service', () => ({
|
||||
getActiveNoticesFor: mockGetActive,
|
||||
dismissNotice: mockDismiss,
|
||||
getCurrentAppVersion: () => '4.3.0',
|
||||
}));
|
||||
|
||||
import { SystemNoticesModule } from '../../src/nest/system-notices/system-notices.module';
|
||||
@@ -95,11 +96,21 @@ describe('System-notices e2e (real auth guard + temp SQLite)', () => {
|
||||
expect(res.body).toEqual([notice]);
|
||||
});
|
||||
|
||||
it('delivers the release notice to a client that announces the layout', async () => {
|
||||
it('holds it back from a bundle that announces the layout but was built for another version', async () => {
|
||||
mockGetActive.mockReturnValue([release, notice]);
|
||||
const res = await request(server)
|
||||
.get('/api/system-notices/active')
|
||||
.query({ supports: 'release' })
|
||||
.query({ supports: 'release', ui: '4.2.1' })
|
||||
.set('Cookie', sessionCookie(1));
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body).toEqual([notice]);
|
||||
});
|
||||
|
||||
it('delivers the release notice to a client that announces the layout for the running version', async () => {
|
||||
mockGetActive.mockReturnValue([release, notice]);
|
||||
const res = await request(server)
|
||||
.get('/api/system-notices/active')
|
||||
.query({ supports: 'release', ui: '4.3.0' })
|
||||
.set('Cookie', sessionCookie(1));
|
||||
expect(res.status).toBe(200);
|
||||
expect(res.body).toEqual([release, notice]);
|
||||
|
||||
Reference in New Issue
Block a user