-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(feedback): Iterate on feedback theme config #9961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@Jesse-Box we're going to need to update the config image to match... |
Bundle ReportChanges will decrease total bundle size by 366 bytes ⬇️
|
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
…ndex.mdx Co-authored-by: Catherine Lee <[email protected]>
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Catherine Lee <[email protected]>
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some copyedits
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
| | `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. | |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
…ndex.mdx Co-authored-by: vivianyentran <[email protected]>
Co-authored-by: vivianyentran <[email protected]> Co-authored-by: Billy Vong <[email protected]>
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
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 |

| Short Window | 
| Screenshot editor |

| Mobile landscape | 
| Mobile portrait | 
| Override Color | 
| | `--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. | |
There was a problem hiding this comment.
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
| | `--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. | |
…ndex.mdx Co-authored-by: Catherine Lee <[email protected]>
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
43bcb0e to
dbe65ed
Compare
docs/platforms/javascript/common/user-feedback/configuration/index.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Catherine Lee <[email protected]>
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 |

| Short Window | 
| Screenshot editor |

| Mobile landscape | 
| Mobile portrait | 
| Override Color | 

This is to match up with a bunch of PRs that are landing: