Skip to content

ref(project-creation): Add SCM-styled notification options#118525

Open
jaydgoss wants to merge 9 commits into
jaygoss/extract-messaging-alert-rule-hookfrom
jaygoss/scm-styled-notification-options
Open

ref(project-creation): Add SCM-styled notification options#118525
jaydgoss wants to merge 9 commits into
jaygoss/extract-messaging-alert-rule-hookfrom
jaygoss/scm-styled-notification-options

Conversation

@jaydgoss

@jaydgoss jaydgoss commented Jun 25, 2026

Copy link
Copy Markdown
Member

TLDR

Add an SCM-styled version of the notification options for the alert-frequency section. The messaging-integration rule lays out one sentence fragment per row with full-width inputs and no grey card background, and reveals with the shared collapse animation. Builds on #118581.

Details

  • Add ScmMessagingIntegrationAlertRule, which reuses the useMessagingIntegrationAlertRule hook (from ref(project-creation): Extract shared hooks from the notification components #118581) and renders makeSentence in a flat Flex column, so each fragment ("Send", the provider select, "notification to the", and so on) sits on its own full-width row, without the background.secondary card styling.
  • Add ScmIssueAlertNotificationOptions: a "Notify via" header above "Email" and "Integration (Slack, Discord, MS Teams, etc.)" checkboxes that renders the stacked rule, replacing the direct use of the shared picker in ScmAlertFrequencySection. The checkboxes are composed directly from the scraps Checkbox (not MultipleCheckbox) so they stack full width.
  • The rule reveals with ScmCollapsibleReveal (height and fade) when Integration is checked and indents under its checkbox label. The long Integration label and the section footer truncate with an ellipsis on narrow screens.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 25, 2026
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from f8b1451 to 12de764 Compare June 25, 2026 22:57
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.81% 93.81% ±0%
Typed 133,129 133,154 🟢 +25
Untyped 8,784 8,787 🔴 +3
🔍 3 new type safety issues introduced

any-typed symbols (2 new)

File Line Detail
static/app/views/onboarding/components/scmMessagingIntegrationAlertRule.tsx 42 onProviderChange (var(binding))
static/app/views/onboarding/components/scmMessagingIntegrationAlertRule.tsx 43 onIntegrationChange (var(binding))

Type assertions (as) (1 new)

File Line Detail
static/app/views/onboarding/components/scmMessagingIntegrationAlertRule.tsx 54 as keyof typeof providerDetailsprovider as keyof typeof providerDetails

This is informational only and does not block the PR.

@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 12de764 to 4fadaee Compare June 25, 2026 23:27
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 4fadaee to 2681b35 Compare June 26, 2026 16:12
@jaydgoss jaydgoss force-pushed the jaygoss/scm-alert-notification-options branch from 2f61fff to 3768a96 Compare June 26, 2026 16:32
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 2681b35 to 5b463a9 Compare June 26, 2026 16:32
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 5b463a9 to 439e9fd Compare June 26, 2026 17:28
@jaydgoss jaydgoss force-pushed the jaygoss/scm-alert-notification-options branch from 3768a96 to 7f153aa Compare June 26, 2026 17:28
@jaydgoss jaydgoss changed the title ref(project-creation): Stack the SCM notification rule layout ref(project-creation): Add SCM-styled notification options Jun 26, 2026
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 0eda51b to 0f54efe Compare June 26, 2026 18:32
@jaydgoss jaydgoss changed the base branch from jaygoss/scm-alert-notification-options to jaygoss/extract-messaging-alert-rule-hook June 26, 2026 18:32
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 0f54efe to 415d0ac Compare June 26, 2026 19:09
@jaydgoss jaydgoss marked this pull request as ready for review June 26, 2026 19:22
@jaydgoss jaydgoss requested a review from a team as a code owner June 26, 2026 19:22
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from 415d0ac to f217b66 Compare June 26, 2026 19:39
@jaydgoss jaydgoss force-pushed the jaygoss/extract-messaging-alert-rule-hook branch from 336815c to 5a20cb4 Compare June 26, 2026 19:39
jaydgoss added 9 commits June 26, 2026 14:45
The SCM alert-frequency section renders the messaging-integration notification options in an SCM-styled layout instead of the classic inline card.

Extracts useMessagingIntegrationAlertRule (channels query, channel validation, the provider/integration/channel options and change handlers) plus a shared ChannelSelect, so the classic MessagingIntegrationAlertRule and the new ScmMessagingIntegrationAlertRule build identical controls from one source. The classic inline layout is unchanged.

ScmMessagingIntegrationAlertRule reuses the provider sentence but renders each segment, text or input, on its own full-width row in makeSentence's order, with no grey card background. Rendering segments independently keeps it correct regardless of how a translation reorders the placeholders.

ScmIssueAlertNotificationOptions lifts the Notify via wording into a shared header so the checkboxes read Email and Integration.
Wrap ScmMessagingIntegrationAlertRule in ScmCollapsibleReveal so the messaging options tween in and out when the Integration checkbox is toggled, matching the height-and-fade reveal already used by the alert-frequency section and option cards. Previously the rule appeared and disappeared instantly.
Line the messaging rule's left edge up with the checkbox label text instead of the checkbox, so it reads as nested under the Integration option. Indents by the sm Checkbox box width plus the label's left margin, mirroring the alert option card's expanded body.
MultipleCheckbox.Item ships a fixed-width, nowrap label tuned for the classic side-by-side row layout. In the SCM stacked layout the long Integration label overflowed the container on narrow screens. Scope an override on the checkbox container so each label fills its row and truncates with an ellipsis, without touching the shared component.
The previous truncation fix widened the label but not MultipleCheckbox.Item's wrapping container, which is only 25% of the row on wide screens. That truncated the Integration label even when there was room. Widen the container to fill the row too, so the ellipsis only kicks in when the text genuinely overflows on narrow screens.
…craps

Replace MultipleCheckbox with scraps Checkbox composed with Flex and Text. MultipleCheckbox's fractional container/label widths, nowrap text, and row margins are tuned for the classic side-by-side layout and needed several overrides to undo in this stacked layout. Composing the checkboxes directly drops those overrides and lets the long Integration label wrap naturally on narrow screens, so the earlier truncation hack is no longer needed. The action-toggle logic is inlined, since that was the only thing MultipleCheckbox provided here.
Add the scraps Text ellipsis prop to the integration checkbox label and the alert-frequency footer so long copy truncates instead of overflowing on narrow screens. Render the checkbox labels at normal weight.
Click the Integration checkbox and assert it adds the integration action. Querying it by the label text also covers the label-to-input association from composing the checkbox with Flex as="label".
…M options

Replace the duplicated shell (the shouldRenderNotificationConfigs derivation, the setup-button impression analytics, and the querySuccess gate) in ScmIssueAlertNotificationOptions with the shared useIssueAlertNotificationOptions hook, so the SCM and classic flows keep the same analytics and show/hide logic in one place.
@jaydgoss jaydgoss force-pushed the jaygoss/scm-styled-notification-options branch from f217b66 to e55c060 Compare June 26, 2026 19:46
@jaydgoss jaydgoss force-pushed the jaygoss/extract-messaging-alert-rule-hook branch from 5a20cb4 to bd1be2b Compare June 26, 2026 19:46
@sentry

sentry Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 451 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@jaydgoss jaydgoss requested a review from a team June 26, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants