-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Add the bee #136132
[Lens] Add the bee #136132
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
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.
[redacted]
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.
x-pack/plugins/lens/public/editor_frame_service/editor_frame/easteregg/index.tsx
Outdated
Show resolved
Hide resolved
); | ||
} | ||
|
||
export function Easteregg(props: { query?: Query }) { |
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.
This loads the code (even though Lazy), even when the easter-egg query isn't triggered. Consider only loading the easter-egg when the query actually matches.
So I'd break here and return null
here on the REGEX-check. And only load the Bee lazily after.
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.
This is what the code does - the Bees
component does nothing but checking the query in a safe way. Only if the amount is larger than one and a bee will be shown, a Bee
component is rendered which will lazy-load the bee code (including the image). The Easteregg
component is providing the error boundary, so an uncaught exception in the bee/bees component won't be visible in the app.
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.
oki thx, you're right, I have misunderstood then
feature request for even more bees please |
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 love this!! LGTM <3
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsasync chunk count
ESLint disabled line counts
miscellaneous assets size
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
This adds the bee