fix(feedback): Deep merge custom styles with defaults in FeedbackWidget#5625
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
61eb5a1 to
b389cde
Compare
|
The PR is good, and I'd say it's ready to merge. I just want more opinions from other reviewers if we should consider this a break change, despite being a bugfix. |
|
@sentry review |
That's a good point @lucas-zimerman 👍 |
- Replace shallow spread with dynamic deep merge over all style keys - Custom style props now override specific properties while preserving defaults - Add test verifying partial style overrides don't lose default properties - Update snapshots to reflect correct merged styles
b389cde to
cad207f
Compare
lucas-zimerman
left a comment
There was a problem hiding this comment.
LGTM! Thank you for your contribution!
antonis
left a comment
There was a problem hiding this comment.
LGTM 🎸
Thank you for your contribution 🙇
📢 Type of change
📜 Description
Replace the shallow spread in
FeedbackWidget.render()with a dynamic deep merge that iterates over all default style keys. Custom style properties now override individual values while preserving unspecified defaults.Before (shallow — replaces entire style object):
After (deep — merges per key):
💡 Motivation and Context
Fixes #5624 — passing partial style overrides (e.g.
styles={{ input: { color: 'red' } }}) currently loses all default properties for that key (height, padding, borderWidth, etc.), breaking layout.💚 How did you test it?
inputstyle override, assert default properties (height, borderWidth, borderRadius, paddingHorizontal, marginBottom, fontSize) are preserved📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
None — this is a self-contained fix.