Skip to content
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

[APM][Settings][Custom links] Default field filter option always present #190309

Conversation

iblancof
Copy link
Contributor

@iblancof iblancof commented Aug 12, 2024

Summary

Closes #189987

It was discovered that when users manually select the default option (Select field) for the field input, the option would disappear in some scenarios, causing other input values to change automatically. This issue occurred specifically when the default option was selected manually by the user.

This happens because as options are selected by the user, they are removed from the selection list to prevent duplicates.

With the fix (commit) we are never removing the default option from the list.

Scenario Before After
Two filters
More than two filters

@iblancof iblancof added release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0 labels Aug 12, 2024
@iblancof iblancof self-assigned this Aug 12, 2024
@iblancof iblancof requested a review from a team as a code owner August 12, 2024 10:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Aug 12, 2024
@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@kibana-ci
Copy link
Collaborator

kibana-ci commented Aug 12, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: a2759e9
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-190309-a2759e9366f5

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.5MB 3.5MB +14.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @iblancof

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +14 to +29
const options = {
default: { value: 'DEFAULT', text: 'Select field...' },
serviceName: { value: 'service.name', text: 'service.name' },
serviceEnvironment: { value: 'service.environment', text: 'service.environment' },
transactionType: { value: 'transaction.type', text: 'transaction.type' },
transactionName: { value: 'transaction.name', text: 'transaction.name' },
};

const filters: Record<string, Filter> = {
empty: { key: '', value: '' },
default: { key: 'DEFAULT' as Filter['key'], value: '' },
serviceName: { key: 'service.name', value: 'foo' },
serviceEnvironment: { key: 'service.environment', value: 'foo' },
transactionType: { key: 'transaction.type', value: 'foo' },
transactionName: { key: 'transaction.name', value: 'foo' },
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

@crespocarlos crespocarlos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iblancof iblancof merged commit aaf35ce into elastic:main Aug 13, 2024
34 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Aug 13, 2024
@iblancof iblancof deleted the 189987-apm-settings-custom-links-filters-field-options branch August 13, 2024 07:19
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Aug 13, 2024
…ent (elastic#190309)

## Summary

Closes elastic#189987

It was discovered that when users manually select the default option
(`Select field`) for the field input, the option would disappear in some
scenarios, causing other input values to change automatically. This
issue occurred specifically when the default option was selected
manually by the user.

This happens because as options are selected by the user, they are
removed from the selection list to prevent duplicates.

With the fix
([commit](elastic@985cdc5))
we are never removing the default option from the list.

|Scenario|Before|After|
|-|-|-|
|Two filters|<img
src="https://github.com/user-attachments/assets/2268b92f-e9be-4c06-aa74-5f2f003117d5"
width="280"> |<img
src="https://github.com/user-attachments/assets/278a4860-f691-4121-acb5-f61a76147b56"
width="280">|
|More than two filters|<img
src="https://github.com/user-attachments/assets/23aeb355-4932-452d-a6a8-ed1a2ccba428"
width="280">|<img
src="https://github.com/user-attachments/assets/30d7978e-1ec0-4736-8163-64790831bba0"
width="280">|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM][Settings][Custom links] Filters field changing value when selecting default option
7 participants