-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[OBX-UX-MNGMT][BUG]APM creation rules flyout is broken when it's accessed from Stack Management #186970
base: main
Are you sure you want to change the base?
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
@@ -110,7 +110,7 @@ export function Controls() { | |||
); | |||
|
|||
const [zoom, setZoom] = useState((cy && cy.zoom()) || 1); | |||
const duration = parseInt(theme.eui.euiAnimSpeedFast, 10); | |||
const duration = parseInt(String(theme.animation.fast), 10); |
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 sure about this one.
export const getAnimationOptions = ( | ||
theme: UseEuiThemeWithColorsVis | ||
): cytoscape.AnimationOptions => ({ | ||
duration: parseInt(String(theme.animation.normal), 10), |
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.
same here
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
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.
@fkanout why is failing in alerts management page but it work as expected for APM?
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
@kpatticha, there is an initiative/requirement to move from the |
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.
code LGTM I didn't test it locally though
), | ||
}; | ||
return { | ||
...euiTheme, |
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.
@fkanout Was there any challenge in returning the same data shape as before? (i.e., EuiTheme
from '@kbn/kibana-react-plugin/common')
I am wondering, for fixing types, whether it would be better to find a way and make returning EuiTheme
work or change the places that uses useTheme to follow the new structure.
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.
@maryam-saeidi, good question! When I started working on the refactoring, I thought I had only to replace the imports from styled-components
and use the equivalents from emotion
. After asking the eui-team, it appeared that it was more than just that.
As you can see from the updates in the hook the data are coming from different objects with different structure and types. e.g., there is no euiColorVis
anymore in emotion
(only an array of values called euiPaletteColorBlind
) that I mapped back to old names. Also some value changed regarding the duration (as I commented initially).
So, to sum up, I'm using the same name of the last element, e.g. euiColorVis5
, euiColorVis9BehindText
, to confirm this is the replacement of the old one. But the object, the structure, and the object path to reach that is different. With that hybrid solution, I think we get a good balance as we still know what we are using by keeping the old names, and at the same time, we know it's the new structure from emotion
⏳ Build in-progress, with failures
Failed CI Steps
Test Failures
History
To update your PR or re-run it, just comment with: |
⏳ Build in-progress, with failures
Failed CI StepsTest Failures
Historycc @fkanout |
We created a separate PR to fix this issue and possibly backport it to v8.14. We can revisit the changes in this PR later in order to migrate from |
Summary
It fixes #186969 by migrating to
emotions
fromstyled-component