Skip to content
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

feat(feedback): Refactor the feedback screenshot rendering to show N screenshots side by side #68136

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Apr 2, 2024

Related to #67707

Here are some examples of one or more attached screenshots, with different sizes:

Desc Img
single small single small
two same size double same size
many wrapped many wrapped
many inline many inline

@ryan953 ryan953 requested a review from a team as a code owner April 2, 2024 22:33
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 2, 2024
@ryan953
Copy link
Member Author

ryan953 commented Apr 2, 2024

cc @Jesse-Box I don't love the trash cans when there is more than 1 image (it's possible to submit more than one to the api, not via the feedback widget though).

super easy to update the delete button, but low-low pri.

Copy link
Member

@michellewzhang michellewzhang left a comment

Choose a reason for hiding this comment

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

looks good! curious if it'd look better or worse if the background surrounding the screenshots was transparent rather than white

organization: Organization;
projectSlug: Project['slug'];
screenshot: EventAttachment;
screenshotInFocus: number;
Copy link
Member

Choose a reason for hiding this comment

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

deleting all the extra stuff !
gif

[event, organization.slug, projectSlug, screenshotInFocus, screenshots]
);

if (!hasContext && !screenshots.length) {
Copy link
Member

Choose a reason for hiding this comment

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

we don't need any of this hasContext stuff? :0

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 took it out because i think we really only care that there are screenshots. Within the rest of the page we don't show context at all, we get the message from feedbackItem.metadata.message for example. So I think if it's there or not, it shouldn't block our images.

I'm a bit worried that we're assuming the attachments will be images though.

Copy link
Member

Choose a reason for hiding this comment

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

could we validate somehow that they are images?

@ryan953
Copy link
Member Author

ryan953 commented Apr 2, 2024

looks good! curious if it'd look better or worse if the background surrounding the screenshots was transparent rather than white

@michellewzhang I was thinking that too, this was calling for me: https://sentry.sentry.io/stories/?name=app/components/container/negativeSpaceContainer.stories.tsx

But i didn't play with it because the space around only appears when there are multiple images at different dimensions. I think that's going to be really rare.

@ryan953 ryan953 merged commit 841907c into master Apr 3, 2024
43 of 44 checks passed
@ryan953 ryan953 deleted the ryan953/feedback-screenshots-inline branch April 3, 2024 15:05
shellmayr pushed a commit that referenced this pull request Apr 10, 2024
…screenshots side by side (#68136)

Related to #67707

Here are some examples of one or more attached screenshots, with
different sizes:
| Desc | Img |
| --- | --- |
| single small | ![single
small](https://github.com/getsentry/sentry/assets/187460/9b4051e5-0a4e-4c58-bf9d-4e083b7e3cbe)
| two same size | ![double same
size](https://github.com/getsentry/sentry/assets/187460/e09a7ac7-cc4a-431a-94eb-39a02f31e3ae)
| many wrapped | ![many
wrapped](https://github.com/getsentry/sentry/assets/187460/14e9c930-093c-49f2-9565-3f602f196750)
| many inline | ![many
inline](https://github.com/getsentry/sentry/assets/187460/0db6c0f3-1a27-40cf-9e12-608123d2449f)
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants