SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix(notification-channels): scroll channel forms inside configuration and pin actions to the bottom (#13382)
ashu89122103d6c7b735
diff --git a/frontend/src/pages/ChannelsEdit/ChannelsEdit.module.scss b/frontend/src/pages/ChannelsEdit/ChannelsEdit.module.scssindex 580a350bc7..fb86b35233 100644--- a/frontend/src/pages/ChannelsEdit/ChannelsEdit.module.scss+++ b/frontend/src/pages/ChannelsEdit/ChannelsEdit.module.scss@@ -3,5 +3,8 @@}.page {- padding: var(--spacing-4) var(--spacing-6) var(--spacing-6);+ flex: 1;+ min-height: 0;+ overflow-y: auto;+ padding: var(--spacing-4) var(--spacing-6) 0;}diff --git a/frontend/src/pages/ChannelsNew/styles.module.scss b/frontend/src/pages/ChannelsNew/styles.module.scssindex 580a350bc7..fb86b35233 100644--- a/frontend/src/pages/ChannelsNew/styles.module.scss+++ b/frontend/src/pages/ChannelsNew/styles.module.scss@@ -3,5 +3,8 @@}.page {- padding: var(--spacing-4) var(--spacing-6) var(--spacing-6);+ flex: 1;+ min-height: 0;+ overflow-y: auto;+ padding: var(--spacing-4) var(--spacing-6) 0;}diff --git a/tests/e2e/drivers/channels.ts b/tests/e2e/drivers/channels.tsindex 7e4ad5a64b..d3ada5d0d4 100644--- a/tests/e2e/drivers/channels.ts+++ b/tests/e2e/drivers/channels.ts@@ -209,6 +209,10 @@ interface ChannelForm {/** Saves an existing channel and waits for the write to land. */saveEdit(): Promise<void>;save(): Promise<void>;+ /** The sticky bar holding discard, test and save. */+ actions(): Locator;+ /** Scrolls with the mouse wheel, which unlike scrollIntoView cannot move an overflow: hidden box. */+ wheelToEnd(): Promise<void>;}/**@@ -334,6 +338,11 @@ function channelsDriver(page: Page): Channels {async save() {await page.getByTestId('save-channel-button').click();},+ actions: () => page.getByTestId('discard-channel-button').locator('..'),+ async wheelToEnd() {+ await form.name().hover();+ await page.mouse.wheel(0, 10_000);+ },};const api: ChannelApi = {diff --git a/tests/e2e/tests/alerts/channels/scroll.spec.ts b/tests/e2e/tests/alerts/channels/scroll.spec.tsnew file mode 100644index 0000000000..f0891d9206--- /dev/null+++ b/tests/e2e/tests/alerts/channels/scroll.spec.ts@@ -0,0 +1,57 @@+import { type Page } from '@playwright/test';++import { type Channels, expect, test } from '../../../drivers/channels';++// Shorter than the Slack form, so it only fits by scrolling inside the+// configuration pane, whose own overflow is hidden.+test.use({ viewport: { width: 1280, height: 600 } });++async function expectScrollsWithActionsPinned(+ page: Page,+ form: Channels['form'],+): Promise<void> {+ const actions = form.actions();+ const lastControl = page.getByTestId('slack-action-add');++ await expect(actions).toBeInViewport({ ratio: 1 });+ await expect(lastControl).not.toBeInViewport();++ await form.wheelToEnd();++ await expect(lastControl).toBeInViewport({ ratio: 1 });+ await expect(actions).toBeInViewport({ ratio: 1 });++ const control = await lastControl.boundingBox();+ const bar = await actions.boundingBox();+ expect(control!.y + control!.height).toBeLessThanOrEqual(bar!.y);+}++test.describe('Notification channels — form scroll', () => {+ test('TC-01 the new channel form scrolls to its end with actions pinned', async ({+ channels,+ authedPage,+ }) => {+ await channels.form.gotoNew();+ await channels.form.pickType('Slack');+ await expect(authedPage.getByTestId('slack-action-add')).toBeAttached();++ await expectScrollsWithActionsPinned(authedPage, channels.form);+ });++ test('TC-02 the edit channel form scrolls to its end with actions pinned', async ({+ channels,+ authedPage,+ }) => {+ let id: string | undefined;++ try {+ ({ id } = await channels.api.create(`e2e-ncs-${Date.now()}`));+ await authedPage.goto(`/alerts/channels/edit/${id}`);+ await expect(channels.form.name()).toBeVisible();++ await expectScrollsWithActionsPinned(authedPage, channels.form);+ } finally {+ await channels.api.remove(id);+ }+ });+});