As outlined in the design https://github.com/elastic/apm/issues/196 we want to enable users to create custom actions that will appear in the Actions context menus in the UI. Currently available in the Transaction detail view and detail flyouts for Transactions and Spans in the Timeline.
Links
Figma prototype


Pinging @elastic/apm-ui (Team:apm)
@cauemarcondes I've updated the description with a new task list and prototype link and screens. Let me know if you have any comments or feedback.
Create a related issue to track the implementation of the in-context flyout when creating an action from a selected service and transaction detail https://github.com/elastic/kibana/issues/57783
@formgeist can you tell me what will be the messages for:
Label:
If a new filter is added but the value is missing (the user has selected only the field name), are we going to show a message too or just ignore that field?
@formgeist Where the link Learn more in the docs. should point to?
@formgeist Where the link
Learn more in the docs.should point to?
I've created an issue for the documentation, so we should be able to get a permalink URL we can add https://github.com/elastic/observability-dev/issues/650
Label:
- Empty state:
The placeholder text will be: e.g. Elastic.co
- max length 128:
The label exceeds 128 characters. Please review and shorten it. as invalid red text.
URL:
- Empty state:
The placeholder/empty text will be: e.g. https://www.elastic.co
Does that help?
If a new filter is added but the value is missing (the user has selected only the field name), are we going to show a message too or just ignore that field?
What kind of message are you thinking of here?
@cauemarcondes Did you mean when you've completed the field name, what happens?

Can we move the focus on the value field right after?
Does that help?
Yeah, so I'll show an error message for the max characters, and only make the fields read if they are empty.
What kind of message are you thinking of here?
I see two scenarios here:
1) The user has selected an option e.g. service.name but didn't add any value.

In this case, I would just ignore that filter, and save the action.
2) The user didn't select an option, but add value.

WDYT?
@formgeist: Summary of what was agreed on Zoom.
For now, we decided to not show any message.
I think we should be mindful of not adding too much custom validation. If we can get validation from EUI/the platform for free, great! But if we have to handle this I think we should be careful not to spent too much energy on this.
On the same note, the text below the label field currently says:
"Labels can be max. 128 characters."
I feel this is a technical limitation that doesn't deserve this much attention. Wouldn't it be better to use that text to help the user understand what the label is used for? And why do we have a limit in the first place? I think dropping this limitation would simplify things a bit.
I feel this is a technical limitation that doesn't deserve this much attention. Wouldn't it be better to use that text to help the user understand what the label is used for? And why do we have a limit in the first place? I think dropping this limitation would simplify things a bit.
I can agree to that this might not be a hard requirement to keep it below 128 chars. We can instead allow for longer, but have the help text state: Keep it as short as possible. This is the label shown in the actions context menu.
I feel this is a technical limitation that doesn't deserve this much attention. Wouldn't it be better to use that text to help the user understand what the label is used for? And why do we have a limit in the first place? I think dropping this limitation would simplify things a bit.
I can agree to that this might not be a hard requirement to keep it below 128 chars. We can instead allow for longer, but have the help text state:
Keep it as short as possible. This is the label shown in the actions context menu.
Should we ellipses the label in the actions context menu in that case?
Should we ellipses the label in the actions context menu in that case?
Yes, definitely truncate with either a EuiTooltip or simple title on the link for the full label 馃憤
Wrt. filter validation: is it bad UX to simply remove a filter if either the field or value is missing when the user clicks save? That would be super simple to do.
If the user has filled either field or value, there must be some intent, that's why I want to show throw a visual error and allow the user to review. We discussed that if both fields are empty, even if they have added more rows, we would allow them to save. I'm fine with making it more simple, but that was my intention with having a validation if you have filled either field.
Initial state: any filters are required.


These will be the only validations for the filter section. WDYT @sqren and @formgeist ?
@cauemarcondes I think this is great for validating your inputs.
@formgeist what about the message in the toast notification after creating/updating a custom action?
@cauemarcondes Here are the examples for successful creation, editing, and deletion.



Most helpful comment
Yes, definitely truncate with either a EuiTooltip or simple
titleon the link for the full label 馃憤