-
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
[Actionable Observability] Display action connector icon in o11y rule details page #132026
Conversation
5d14f58
to
584b174
Compare
584b174
to
292a67b
Compare
c702f31
to
a4be29e
Compare
…nd write some tests
a4be29e
to
8b6c669
Compare
@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.
LGTM
x-pack/plugins/observability/public/pages/rule_details/components/actions.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/observability/public/pages/rule_details/components/actions.tsx
Outdated
Show resolved
Hide resolved
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.
@mgiota there is size inconsistency between the app icons. IBM logo is too small, xMatter icon too big, swimlane is truncated. Most likely it's related to SVG view box size, I would say.
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.
LGTM, as this is just an export of a fairly generic component and I don't want to block @mgiota .
That said - I was wondering whether suspendedComponentWithProps
is so generic that it actually shouldn't be in TriggerActionsUI at all? 🤔
Any thoughts @elastic/response-ops-ram ?
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.
ResponseOps changes LGTM
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.
LGTM!
@gmmorris Yea I think the implementation is so trivial that it might make sense as a guideline (suspended components must use the EUI loading indicator) rather than a reusable component. I would even argue that having it as a reusable component add an unnecessary layer of abstraction. |
@fkanout I tried a few things with eui styled components (wrapping a div around the icon and applying some custom styles), but the problem still persists. Regarding Regarding the smaller icons you mentioned, I am not sure if we can do anything about it, other than changing the svgs, but that would require more testing on the rest places icons appear. Do you have any suggestions how we can fix the above problem with xmatters? Current Github issue was mainly about using the |
@mgiota, I know dealing with SVG is not the easiest thing 😮💨 . I will take a look. However, I wonder how they are size-standardized in the connectors' panel 🤔 ? |
@fkanout My first guess is that these icons are of UPDATE Yep my assumption is correct. In the connector's panel they specify their icons as Accordingly if I change our icons to |
{actions.map((action) => ( | ||
<> | ||
{actions.map(({ actionTypeId, name }) => ( | ||
<React.Fragment key={actionTypeId}> | ||
<EuiFlexGroup alignItems="baseline"> |
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.
<EuiFlexGroup alignItems="baseline"> | |
<EuiFlexGroup alignItems="center"> | |
<EuiFlexItem | |
style={{ | |
position: 'relative', | |
width: '26px', | |
height: '26px', | |
}} | |
grow={false} | |
> | |
<EuiIcon | |
style={{ | |
position: 'absolute', | |
height: '100%', | |
width: '100%', | |
left: 0, | |
top: 0, | |
}} | |
size="m" | |
type={getActionIconClass(actionTypeId) ?? 'apps'} | |
/> | |
</EuiFlexItem> |
@mgiota, It's not perfect, but it seems a bit better. feel free to add it if you think so
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 Great, I am back to this PR and I am gad to see it is already looks better, more symmetrical. I can take it from here and do a bit of refactoring regarding using import { euiStyled } from '@kbn/kibana-react-plugin/common';
to not do the styling inline. But this doesn't fix the root of the problem, which is the xmatters
svg icon.
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 @katrin-freihofner Here's what I suggest:
- Remove
className="euiIcon euiIcon--xLarge euiCard__icon"
from xmatters logo.tsx file - Decide on the width and height of the custom container. I think
26px
is a little bit big. @katrin-freihofner What do you think? - Fix xmatters svg
Here's how it looks with the first 2 changes. Step 3 is missing and I think it should look fine.
@katrin-freihofner Could you provide us with a new SVG for xmatters? Here you can find the existing svg. I started playing and changing viewBox etc, but no success.
You can also read my comment above for more context #132026 (comment)
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.
Good news, I played a bit more with the xmatters svg file and I fixed the issue. Step 2 (custom dimensions) is not needed anymore, since xmatters behaves well now with the specified size="m"
😄
Sidenote: Alignment is a bit off, but I guess this is out of scope of this PR, since I noticed more alignment issues anyway.
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.
@mgiota, great work! 👏🏻
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 Small issues surfaced with this PR, good that it looks much better now! Your approval is still needed for this PR.
@fkanout I fixed the issue. Could you do one more round of testing? I created a ticket to track the fix we did for xmatters icon #132580, since this PR fixes current Rules and Connectors page as well. Regarding smaller icons they also don't look perfect there as well. Current status Rules and connectors @katrin-freihofner Adding custom width and height in our page is not going to fix the issue with smaller icons. The svg icons need to be changed as well. I suggest we create a new ticket and we fix this seperately. This is definitely out of scope of current issue. UPDATE: Here's the new issue to fix smaller logo icons. |
@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.
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @mgiota |
Fixes #132220
Fixes #132580