GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(feedback): Add missing `h` import in `ScreenshotEditor` (#12713) by andreiborza · Pull Request #12784 · getsentry/sentry-javascript Conversation
|
size-limit report 📦
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // biome-ignore lint/nursery/noUnusedImports: reason | ||
| import { h } from 'preact'; // eslint-disable-line @typescript-eslint/no-unused-vars |
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I think we may have accidentally removed |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
|
Looks like we need #12793. I'll merge the develop branch in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.