Skip to content

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Mar 21, 2025

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

Based on feat(feedback): Report a Bug button

PR Chain:

📜 Description

Adds theming options similar to JS

      Sentry.feedbackIntegration({
        colorScheme: 'system',
        themeLight: {
          foreground: '#ff0000',
          background: '#00ff00',
        },
        themeDark: {
          foreground: '#00ff00',
          background: '#ff0000',
        },
      }),
Demo Video

web

Screen.Recording.2025-03-28.at.3.42.32.PM.mov

Light Dark
Simulator Screenshot - iPhone 16 Pro - 2025-03-27 at 12 03 19 Simulator Screenshot - iPhone 16 Pro - 2025-03-27 at 12 03 43

💡 Motivation and Context

💚 How did you test it?

Sample app

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@krystofwoldrich
Copy link
Contributor

Overall, it's looking good, but I've noticed some issues with customizing the theme.

We should add tests to ensure that the correct values are applied when using custom styles and custom themes.

@antonis
Copy link
Contributor Author

antonis commented Mar 28, 2025

Thank you for all your feedback @krystofwoldrich 🙇

This should be ready for another go. Note that I now also cover the dynamic theme changes on this PR with 7a331b6 as part of the refactoring discussed above.

We should add tests to ensure that the correct values are applied when using custom styles and custom themes.

I've added snapshot tests to cover this with 6c63d03

@antonis antonis requested a review from krystofwoldrich March 28, 2025 14:13
@antonis antonis changed the title feat(feedback): Add theming feat(feedback): Theming Apr 3, 2025
@krystofwoldrich
Copy link
Contributor

Looks and works great! Reacts to the changes live.

However, in the tests, only the custom dark and light scheme is checked.

Can you also add a test for the system theme option, to check that the correct scheme is used, and a test for the live change if possible?

Base automatically changed from antonis/4358-Feedback-Form-Autoinject-Button to feedback-ui-2 April 7, 2025 10:01
@antonis antonis mentioned this pull request Apr 7, 2025
10 tasks
antonis added 3 commits April 7, 2025 13:25
# Conflicts:
#	CHANGELOG.md
#	packages/core/src/js/feedback/FeedbackButton.tsx
#	packages/core/src/js/feedback/FeedbackWidget.styles.ts
#	packages/core/src/js/feedback/FeedbackWidgetManager.tsx
#	packages/core/src/js/feedback/integration.ts
#	packages/core/test/feedback/FeedbackButton.test.tsx
#	packages/core/test/feedback/FeedbackWidgetManager.test.tsx
#	packages/core/test/feedback/__snapshots__/FeedbackButton.test.tsx.snap
@antonis
Copy link
Contributor Author

antonis commented Apr 7, 2025

Thank you for your feedback @krystofwoldrich 🙇

Can you also add a test for the system theme option, to check that the correct scheme is used, and a test for the live change if possible?

Added test for the system theme option with ba98685
and tests for a 'live' change with 3b4a1de

Copy link
Contributor

@krystofwoldrich krystofwoldrich left a comment

Choose a reason for hiding this comment

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

Thank you for adding the extra tests!

@antonis antonis merged commit 9a0ab61 into feedback-ui-2 Apr 14, 2025
70 checks passed
@antonis antonis deleted the antonis/feedback-theme branch April 14, 2025 12:30
antonis added a commit to getsentry/sentry-docs that referenced this pull request Jun 4, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

⚠️ PR Chain:
- #13512
- 👉  #13513
- #13515

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

Adds feedback widget theme documentation.


Part of getsentry/sentry-react-native#4302

Implementation PR:
getsentry/sentry-react-native#4677

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

Should be merged after
getsentry/sentry-react-native#4726 is released

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: LucasZF <[email protected]>
Co-authored-by: Krystof Woldrich <[email protected]>
antonpirker pushed a commit to getsentry/sentry-docs that referenced this pull request Jun 6, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

⚠️ PR Chain:
- #13512
- 👉  #13513
- #13515

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

Adds feedback widget theme documentation.


Part of getsentry/sentry-react-native#4302

Implementation PR:
getsentry/sentry-react-native#4677

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

Should be merged after
getsentry/sentry-react-native#4726 is released

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: LucasZF <[email protected]>
Co-authored-by: Krystof Woldrich <[email protected]>
bitsandfoxes pushed a commit to getsentry/sentry-docs that referenced this pull request Jul 3, 2025
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->

⚠️ PR Chain:
- #13512
- 👉  #13513
- #13515

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*

Adds feedback widget theme documentation.


Part of getsentry/sentry-react-native#4302

Implementation PR:
getsentry/sentry-react-native#4677

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

Should be merged after
getsentry/sentry-react-native#4726 is released

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

<!-- Sentry employees and contractors can delete or ignore this section.
-->

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

---------

Co-authored-by: LucasZF <[email protected]>
Co-authored-by: Krystof Woldrich <[email protected]>
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.

3 participants