-
Notifications
You must be signed in to change notification settings - Fork 203
chore: Custom button for AI panel's exit expanded mode #3940
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
chore: Custom button for AI panel's exit expanded mode #3940
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3940 +/- ##
=======================================
Coverage 97.16% 97.16%
=======================================
Files 854 854
Lines 24969 24978 +9
Branches 8794 8799 +5
=======================================
+ Hits 24260 24271 +11
+ Misses 702 701 -1
+ Partials 7 6 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
76b3c69 to
96be349
Compare
96be349 to
57aa4b4
Compare
| // eslint-disable-next-line react/no-danger | ||
| <span style={{ lineHeight: 0 }} dangerouslySetInnerHTML={{ __html: exitExpandedModeTrigger.customIcon }} /> |
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.
To reuse number of no-danger exceptions, can we create a reusable utility customTriggerIcon and reuse it for both triggers?
Even if it is one line, at least it confines the eslint exception in one place
| activeAiDrawer: | ||
| | (InternalDrawer & { | ||
| exitExpandedModeTrigger?: { | ||
| customIcon?: React.ReactNode; |
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.
Why is this ReactNode? We do not use it on the other triggers because it does not work in micro-frontends, so we also don't do it here
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 customIcon type is what we get after processing the runtime data. The actual plugin api only works with strings
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.
OK I see, there is a string in src/internal/plugins/widget/interfaces.ts update
bf4059e to
989e569
Compare
8c4bb62 to
a9c8473
Compare
Description
Introduced a new api method to replace a standard exit expanded mode button for the AI panel
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.