Skip to content

feat: Adds class-name and data- props to error boundaries#4221

Merged
pan-kot merged 1 commit intomainfrom
error-boundaries-base-props
Feb 3, 2026
Merged

feat: Adds class-name and data- props to error boundaries#4221
pan-kot merged 1 commit intomainfrom
error-boundaries-base-props

Conversation

@pan-kot
Copy link
Member

@pan-kot pan-kot commented Feb 3, 2026

Description

This change allows passing custom class names or data-* attributes to the fallback. It is consistent with how findErrorBoundary() test-util only finds the component when in fallback state.

The change is needed to pass a particular data-attribute to the default fallback message, which is used to alter the runtime behaviour of alerts (coming from the awsuiPlugins.alert runtime API):

// Wrong: this affects both the alert in EB fallback but also all alerts in the content
<div data-runtime-behaviour="off">
  <ErrorBoundary ... />
</div>

// Works (with this change)
<ErrorBoundary ... data-runtime-behaviour="off" />

How has this been tested?

  • Unit tests
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 Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.18%. Comparing base (ea2b35b) to head (20bb8cf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4221   +/-   ##
=======================================
  Coverage   97.18%   97.18%           
=======================================
  Files         883      883           
  Lines       25866    25867    +1     
  Branches     9344     9344           
=======================================
+ Hits        25137    25138    +1     
  Misses        723      723           
  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.

@pan-kot pan-kot force-pushed the error-boundaries-base-props branch from f8848ce to 20bb8cf Compare February 3, 2026 10:11
@pan-kot pan-kot marked this pull request as ready for review February 3, 2026 10:11
@pan-kot pan-kot requested a review from a team as a code owner February 3, 2026 10:11
@pan-kot pan-kot requested review from ClaudioGSDB and removed request for a team February 3, 2026 10:11
@pan-kot pan-kot added this pull request to the merge queue Feb 3, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 3, 2026
@pan-kot pan-kot added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 6f43f2e Feb 3, 2026
49 checks passed
@pan-kot pan-kot deleted the error-boundaries-base-props branch February 3, 2026 12:44
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.

2 participants