Skip to content

feat: Feature notifications#4186

Open
georgylobko wants to merge 12 commits intomainfrom
feat/feature-notitications
Open

feat: Feature notifications#4186
georgylobko wants to merge 12 commits intomainfrom
feat/feature-notitications

Conversation

@georgylobko
Copy link
Member

@georgylobko georgylobko commented Jan 14, 2026

Description

Introduced a feature notifications API that allows dynamically injecting a feature notifications drawer on pages using the AppLayout component.

The new API includes 3 methods:

  • registerFeatureNotifications - registers a new drawer
  • showFeaturePromptIfPossible - manually shows a feature prompt next to the drawer's trigger button
  • clearFeatureNotifications - clears the feature notifications drawer

Also enhanced the existing feature prompt internal component by adding dismissal context to the onDismiss method (blur, close-button, outside-click, etc.).

Related links, issue #, if available: n/a

How has this been tested?

U tests / manually

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 99.48454% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.32%. Comparing base (27ce9e0) to head (6286dcf).

Files with missing lines Patch % Lines
...efresh-toolbar/state/use-feature-notifications.tsx 99.09% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4186      +/-   ##
==========================================
+ Coverage   97.30%   97.32%   +0.01%     
==========================================
  Files         888      890       +2     
  Lines       26012    26182     +170     
  Branches     9408     9476      +68     
==========================================
+ Hits        25312    25481     +169     
- Misses        694      695       +1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@georgylobko georgylobko force-pushed the feat/feature-notitications branch from 4fa101b to efb51d9 Compare January 14, 2026 12:20
@georgylobko georgylobko force-pushed the feat/feature-notitications branch 2 times, most recently from 8343dd7 to aea04d1 Compare January 19, 2026 10:37
@georgylobko georgylobko force-pushed the feat/feature-notitications branch from 2e7cb8e to 1f4c85f Compare January 20, 2026 12:51
@georgylobko georgylobko force-pushed the feat/feature-notitications branch from 221927b to 4379ee3 Compare January 20, 2026 15:23
@georgylobko georgylobko force-pushed the feat/feature-notitications branch 2 times, most recently from 493d050 to fbd48d1 Compare January 27, 2026 09:31
@georgylobko georgylobko force-pushed the feat/feature-notitications branch from 9dc81fc to 6c9b625 Compare January 28, 2026 14:53
@georgylobko georgylobko force-pushed the feat/feature-notitications branch from c2e7af7 to ac99ca3 Compare February 17, 2026 15:03
return;
}
if (drawersIds.includes(featureNotificationsData.id)) {
featurePromptRef?.current?.show();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set focus immediately after opening the drawer? The drawer opens on the next react rendering cycle, so if we set focus right after registering, the dom element doesn't exist yet. Same issue in use-focus-control: https://github.com/cloudscape-design/components/blob/main/src/app-layout/utils/use-focus-control.ts#L145

triggerRef?.current!.focus();
}
setFeaturePromptDismissed(true);
Promise.resolve().then(() => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Async problem - we need to unset tooltip suppress after shifting focus to it.

* clicking outside the prompt, shifting focus out of the prompt or pressing ESC.
*/
onDismiss?: NonCancelableEventHandler<null>;
onDismiss?: NonCancelableEventHandler<{ method?: string }>;
Copy link
Member Author

@georgylobko georgylobko Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method is a way the feature prompt was closed - blur, escape, close-button, click-outside.

@georgylobko georgylobko marked this pull request as ready for review February 17, 2026 16:23
@georgylobko georgylobko requested a review from a team as a code owner February 17, 2026 16:23
@georgylobko georgylobko requested review from SpyZzey, gethinwebster and pan-kot and removed request for a team February 17, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant