GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(feedback): Add missing `h` import in `ScreenshotEditor` (#12713) by andreiborza · Pull Request #12784 · getsentry/sentry-javascript

Conversation

@andreiborza

@andreiborza andreiborza commented Jul 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This broke the Add a screenshot button on the user feedback, see #12713

This has been explicitly removed in favor of injecting h in #12535 but at that point it seems to be too late to do.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andreiborza
fix(feedback): Add missing h import in ScreenshotEditor (#12713)
bd415e2
@andreiborza
andreiborza requested review from Lms24, chargome and mydea July 5, 2024 11:42
@andreiborza
andreiborza requested a review from a team as a code owner July 5, 2024 11:42
@github-actions

github-actions Bot commented Jul 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser 22.28 KB (0%)
@sentry/browser (incl. Tracing) 33.43 KB (0%)
@sentry/browser (incl. Tracing, Replay) 69.18 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.51 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.24 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.84 KB (-0.03% 🔽)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.71 KB (-0.03% 🔽)
@sentry/browser (incl. metrics) 26.57 KB (0%)
@sentry/browser (incl. Feedback) 38.93 KB (-0.02% 🔽)
@sentry/browser (incl. sendFeedback) 26.9 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.52 KB (0%)
@sentry/react 25.02 KB (0%)
@sentry/react (incl. Tracing) 36.46 KB (0%)
@sentry/vue 26.39 KB (0%)
@sentry/vue (incl. Tracing) 35.29 KB (0%)
@sentry/svelte 22.41 KB (0%)
CDN Bundle 23.5 KB (0%)
CDN Bundle (incl. Tracing) 35.19 KB (0%)
CDN Bundle (incl. Tracing, Replay) 69.29 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.48 KB (0%)
CDN Bundle - uncompressed 68.97 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.98 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.38 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 227.09 KB (0%)
@sentry/nextjs (client) 36.35 KB (0%)
@sentry/sveltekit (client) 34.07 KB (0%)
@sentry/node 130.84 KB (0%)
@sentry/node - without tracing 91.86 KB (0%)
@sentry/aws-serverless 117.03 KB (0%)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chargome
chargome approved these changes Jul 5, 2024
View reviewed changes
Lms24
Lms24 reviewed Jul 5, 2024
View reviewed changes
Comment thread packages/feedback/src/screenshot/components/ScreenshotEditor.tsx
Comment on lines +4 to +5
// biome-ignore lint/nursery/noUnusedImports: reason
import { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars

@Lms24 Lms24 Jul 5, 2024

Copy link
Copy Markdown
Member

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.

can we add a reason/additional comment as to why we need this ignore? It looks like h is destructured but unused further below which doesn't look like an unused import on first glance 🤔 is this a biome bug?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lms24 Lms24 Jul 5, 2024

Copy link
Copy Markdown
Member

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.

Oh wait, I'm off here, this shouldn't require an import 😅
So I guess there's some side effect we need from importing h?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@andreiborza andreiborza Jul 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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 not too familiar with preact, but I'm guessing it's a similar factory to JSX createElement? Just taking a wild guess.

This has been explicitly removed in favor of injecting h in #12535 but at that point it seems to be too late to do.

Maybe we should completely revert the injection too, but I'm waiting on @ryan953 for confirmation before going ahead here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Lms24 Lms24 Jul 5, 2024

Copy link
Copy Markdown
Member

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.

Ahh alright sounds good to me! Sorry, I don't have much context around feedback or Preact and was a bit confused but makes sense!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

andreiborza reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@c298lee c298lee Jul 5, 2024

Copy link
Copy Markdown
Contributor

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.

yes h is needed because it's a similar factory to JSX createElement, it's needed anytime JSX syntax is used

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@andreiborza
andreiborza requested a review from ryan953 July 5, 2024 11:56
@c298lee

c298lee commented Jul 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I think we may have accidentally removed h in #12535 because the screenshot button was breaking when using feedbackAsyncIntegration, but if the screenshot button works with both feedbackSyncIntegration and feedbackAsyncIntegration now, then it looks good to me!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@andreiborza andreiborza mentioned this pull request Jul 8, 2024
Angular error when adding a screenshot in user feedback dialog #12713
Closed
3 tasks done
c298lee
c298lee approved these changes Jul 8, 2024
View reviewed changes
@ryan953 ryan953 mentioned this pull request Jul 8, 2024
"h is not defined" when clicking "Add a screenshot getsentry/sentry#73828
Closed
ryan953
ryan953 approved these changes Jul 8, 2024
View reviewed changes

@ryan953 ryan953 left a comment

Copy link
Copy Markdown
Member

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.

Cool. Lets get this merged!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ryan953

ryan953 commented Jul 8, 2024

Copy link
Copy Markdown
Member

Looks like we need #12793. I'll merge the develop branch in

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryan953
Merge branch 'develop' into ab/fix-feedback-screenshot-button
26d19d9
@ryan953
ryan953 merged commit 3883517 into develop Jul 8, 2024
@ryan953
ryan953 deleted the ab/fix-feedback-screenshot-button branch July 8, 2024 23:00
@ryan953 ryan953 mentioned this pull request Jul 9, 2024
ref(feedback): Let CropCorner inherit the existing h prop #12814
Merged
andreiborza pushed a commit that referenced this pull request Jul 9, 2024
@ryan953
ref(feedback): Let CropCorner inherit the existing h prop (#12814)
aefbfaa
I noticed this after
#12784, but the
`<CropCorner>` wasn't inside the `ScreenshotEditorFactory()` function.
So of course it wasn't getting access to the `h` ref that is passed in.
That variable is what the `<div>` gets transpiled into -> it becomes
`h.createElement('div')`.

So what i'm doing is moving `CropCorner` into a `CropCornerFactory` so
we can pass `h` in and hopefully not have the extra `import .. from
'preact';` in the 2nd bundle.

Related to #12535
This was referenced Jul 30, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.16.0 https-quantumblockchainai-atlassian-net/ossinsight#787
Open
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.17.0 https-quantumblockchainai-atlassian-net/ossinsight#791
Open
@amykapernick amykapernick mentioned this pull request Aug 1, 2024
[Snyk] Upgrade @sentry/nextjs from 8.14.0 to 8.17.0 amykapernick/wedding#12
Open
@wkylin wkylin mentioned this pull request Aug 1, 2024
[Snyk] Upgrade @sentry/react from 8.15.0 to 8.17.0 wkylin/pro-react-admin#370
Closed
@q1blue q1blue mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.18.0 https-quantumblockchainai-atlassian-net/ossinsight#799
Open
@wkylin wkylin mentioned this pull request Aug 7, 2024
[Snyk] Upgrade @sentry/react from 8.15.0 to 8.18.0 wkylin/pro-react-admin#371
Merged
This was referenced Aug 9, 2024
[Snyk] Upgrade @sentry/react from 7.118.0 to 8.19.0 Stanislav1975/win11React#4
Open
[Snyk] Upgrade @sentry/node from 6.17.4 to 8.19.0 Stanislav1975/shields#596
Open
@q1blue q1blue mentioned this pull request Aug 9, 2024
[Snyk] Upgrade @sentry/react from 7.16.0 to 8.19.0 https-quantumblockchainai-atlassian-net/ossinsight#802
Open
@FengShangWuQi FengShangWuQi mentioned this pull request Aug 11, 2024
[Snyk] Upgrade @sentry/gatsby from 7.20.0 to 8.19.0 FengShangWuQi/fengshangwuqi.github.io#1914
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Lms24 Lms24 Lms24 left review comments
@ryan953 ryan953 ryan953 approved these changes
@chargome chargome chargome approved these changes
@mydea mydea Awaiting requested review from mydea
+1 more reviewer
@c298lee c298lee c298lee approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@andreiborza @c298lee @ryan953 @Lms24 @chargome
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.