Skip to content

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented May 8, 2024

@ryan953 ryan953 requested a review from a team May 8, 2024 16:37
@vercel
Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 5:39am

@ryan953
Copy link
Member Author

ryan953 commented May 8, 2024

@Jesse-Box we're going to need to update the config image to match...

these are my notes in image form:
user-feedback-widget-customization-WGBYMML4

@codecov
Copy link

codecov bot commented May 8, 2024

Bundle Report

Changes will decrease total bundle size by 366 bytes ⬇️

Bundle name Size Change
sentry-docs-edge-server 458.51kB 3 bytes ⬇️
sentry-docs-server 7.43MB 359 bytes ⬇️
sentry-docs-client 6.16MB 4 bytes ⬇️

@ryan953 ryan953 changed the title feat(feedback): Iterate on feedback them config feat(feedback): Iterate on feedback theme config May 8, 2024
Co-authored-by: Catherine Lee <[email protected]>
Copy link
Contributor

@vivianyentran vivianyentran left a comment

Choose a reason for hiding this comment

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

Added some copyedits

Comment on lines 32 to 33
| `showName` | `boolean` | `true` | Displays the name field on the Feedback form, however will still capture the name (if available) from Sentry SDK context. |
| `showEmail` | `boolean` | `true` | Displays the email field on the Feedback form, however will still capture the email (if available) from Sentry SDK context. |
Copy link
Contributor

Choose a reason for hiding this comment

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

"However will still capture the name/email" is confusing to me. Does this mean the name/email is captured regardless of whether this option is true or false? Or does it mean that even if the name field is shown, the name is still retrieved from SDK context (in this case, is it stored separately?)? Can you clarify what the behavior is?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm making the change where the table will only say: "Displays the name field on the Feedback form."

and below there'll be two paragraphs, with the setUser() example below:

User Context

If you have set a user context by calling Sentry.setUser then those values will be used as defaults for the name and email fields. If those fields are hidden from the user, then the default values will still be sent along with the feedback message.

Below is an example configuration with non-default user fields.

It'll be up here in a sec, but also lmk if that's working better!

ryan953 and others added 2 commits May 9, 2024 07:38
@ryan953 ryan953 requested review from a team, billyvg, c298lee and vivianyentran May 9, 2024 18:31
ryan953 added a commit to getsentry/sentry-javascript that referenced this pull request May 9, 2024
This updates the CSS theme, variable names and also how the css works.
The widget is better able to handle cases like:
- short desktop window (scrolls form)
- phone in portrait (full width if the screen is 600px or less)
- phone in landscape (scrolls form)
- when screenshots are in use, stick to screen edges

I also made it, I think, easier to position the button (aka trigger, aka
actor) around the screen. You can override in css `--page-margin: 16px`
to dictate the distance from the edge, and override `--inset: auto 0 0
auto;` to position the button in the different corners of the screen.
For example, you can put the trigger button on the edge of the screen
with something like:
```css
#sentry-feedback {
  --actor-inset: auto 0 calc(50% - var(--header-height)) auto;
}
```

Docs are updated in getsentry/sentry-docs#9961
to reflect the changed config/variable names too.

Some samples of different situations:
| Desc | Img |
| --- | --- |
| Normal |
![normal](https://github.com/getsentry/sentry-javascript/assets/187460/9223cf1f-9b4b-4bdc-b35a-65ccded71540)
| Short Window | ![short
window](https://github.com/getsentry/sentry-javascript/assets/187460/5749a07a-ccb6-4c3c-909e-712cf5172f11)
| Screenshot editor |
![screenshot](https://github.com/getsentry/sentry-javascript/assets/187460/3a3bbbd0-c982-4d23-b0cf-d6f96ad2a7d1)
| Mobile landscape | ![mobile
landscape](https://github.com/getsentry/sentry-javascript/assets/187460/aee7ca1f-c6a1-4555-9b07-0ff75aad93e2)
| Mobile portrait | ![mobile
portrait](https://github.com/getsentry/sentry-javascript/assets/187460/c7c08261-8343-4498-9084-5432c6f1c60e)
| Override Color | ![colors
override](https://github.com/getsentry/sentry-javascript/assets/187460/99d2ae92-58a0-49f0-982c-95b3e312a694)
| `--input-background-focus` | `inputBackgroundFocus` | `inherit` | `inherit` | Background color for form inputs when focused. |
| `--input-border` | `inputBorder` | `var(--border)` | `var(--border)` | Border styles for form inputs. |
| `--input-border-radius` | `inputBorderRadius` | `6px` | `6px` | Border radius style for form content (such as inputs and buttons). |
| `--input-outline-focus` | `inputOutlineFocus` | `1px auto rgba(108, 95, 199, 1)` | `1px auto rgba(108, 95, 199, 1)` | Outline color for form inputs when focused. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Since it's not just the color anymore

Suggested change
| `--input-outline-focus` | `inputOutlineFocus` | `1px auto rgba(108, 95, 199, 1)` | `1px auto rgba(108, 95, 199, 1)` | Outline color for form inputs when focused. |
| `--input-outline-focus` | `inputOutlineFocus` | `1px auto rgba(108, 95, 199, 1)` | `1px auto rgba(108, 95, 199, 1)` | Outline for form inputs when focused. |

@ryan953 ryan953 enabled auto-merge (squash) May 13, 2024 23:52
@ryan953 ryan953 disabled auto-merge May 13, 2024 23:52
Co-authored-by: Catherine Lee <[email protected]>
@ryan953 ryan953 merged commit d97185c into master May 14, 2024
@ryan953 ryan953 deleted the ryan953/ref-feedback-config branch May 14, 2024 11:43
andreiborza pushed a commit to getsentry/sentry-javascript that referenced this pull request May 16, 2024
This updates the CSS theme, variable names and also how the css works.
The widget is better able to handle cases like:
- short desktop window (scrolls form)
- phone in portrait (full width if the screen is 600px or less)
- phone in landscape (scrolls form)
- when screenshots are in use, stick to screen edges

I also made it, I think, easier to position the button (aka trigger, aka
actor) around the screen. You can override in css `--page-margin: 16px`
to dictate the distance from the edge, and override `--inset: auto 0 0
auto;` to position the button in the different corners of the screen.
For example, you can put the trigger button on the edge of the screen
with something like:
```css
#sentry-feedback {
  --actor-inset: auto 0 calc(50% - var(--header-height)) auto;
}
```

Docs are updated in getsentry/sentry-docs#9961
to reflect the changed config/variable names too.

Some samples of different situations:
| Desc | Img |
| --- | --- |
| Normal |
![normal](https://github.com/getsentry/sentry-javascript/assets/187460/9223cf1f-9b4b-4bdc-b35a-65ccded71540)
| Short Window | ![short
window](https://github.com/getsentry/sentry-javascript/assets/187460/5749a07a-ccb6-4c3c-909e-712cf5172f11)
| Screenshot editor |
![screenshot](https://github.com/getsentry/sentry-javascript/assets/187460/3a3bbbd0-c982-4d23-b0cf-d6f96ad2a7d1)
| Mobile landscape | ![mobile
landscape](https://github.com/getsentry/sentry-javascript/assets/187460/aee7ca1f-c6a1-4555-9b07-0ff75aad93e2)
| Mobile portrait | ![mobile
portrait](https://github.com/getsentry/sentry-javascript/assets/187460/c7c08261-8343-4498-9084-5432c6f1c60e)
| Override Color | ![colors
override](https://github.com/getsentry/sentry-javascript/assets/187460/99d2ae92-58a0-49f0-982c-95b3e312a694)
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants