Repository navigation
fix(ModalDialog): remove the unsupported as prop - #7067
poplolioi11 wants to merge 3 commits into
Conversation
|
|
👷 Deploy request for react-bootstrap pending review.Visit the deploys page to approve it
|
|
Thanks for clarifying the intended API. Updated this PR in cf25372 to remove |
| expect(dialog.querySelector('strong')!.textContent).toEqual('Content'); | ||
| }); | ||
|
|
||
| it('does not expose an as prop for its fixed dialog root', () => { |
There was a problem hiding this comment.
Remove this test because it's not useful
There was a problem hiding this comment.
Thanks for the review. I removed the redundant as assertion and its now-unused imports in e96baa8. The remaining targeted browser test, lint check, and test TypeScript typecheck pass locally.
ModalDialogexposes anasprop in its public TypeScript interface even though its implementation uses a fixed<div>. Per the maintainer's clarification, that prop was introduced accidentally and should be removed.Remove
asand its TSDoc fromModalDialogProps. The dialog implementation remains the upstream fixed DIV; the earlier proposed polymorphic rendering support has been removed from this PR. Add a type assertion preventingasfrom being exposed again, alongside coverage for the default root, forwarded ref, classes, content and attributes.Validation:
tsc --project test/tsconfig.json --noEmitfails on the assertion. Withasremoved, the complete test TypeScript project passes.ModalDialogSpecplus the existing Modal/Body/Header/Footer/Title specs pass in real headless Chromium: 6 files, 50 tests. The type assertion is verified by TypeScript; it is not a runtime failure test.git diff --checkpass. Existing task dependencies and browser installations were reused. A full repository suite, documentation build and OS screen-reader speech test were not run.This follows the maintainer's requested direction. The previous custom-element/custom-component demonstration and support tests have been removed because those are not the intended API.
AI-assisted implementation and independent static diff review; all reported checks were executed locally.