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

[Lens] Move empty string handling into field formatter #102877

Merged
merged 9 commits into from
Jun 24, 2021

Conversation

flash1293
Copy link
Contributor

@flash1293 flash1293 commented Jun 22, 2021

Fixes #93969
Fixes #68060

This PR removes the local handling of empty strings as (empty) and moves this logic into the string field formatter which can handle it in a single place.

This has two effects:

  • Reduced complexity because it only has to be handled in one place
  • Consistency for all places using field formatters

The most debatable side effect IMHO is that this is also reflected in formatted csv exports. I still don't think it's worth a flag of some kind, but LMK what you think.

@flash1293 flash1293 marked this pull request as ready for review June 23, 2021 10:12
@flash1293 flash1293 requested a review from a team June 23, 2021 10:12
@flash1293 flash1293 requested a review from a team as a code owner June 23, 2021 10:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Code LGTM, tested both Lens and Visualize. It also has fixed the problem in vislib (we didn't have an open issue for that, but now it works as Lens, it renders (empty) for empty strings).

Tbh, I prefer it that way. As soon as we visualize it with (empty), it makes perfect sense to me to also apply this change to the Inspector and the csv export.

@flash1293
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

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

AppServices converter change LGTM.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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
lens 1.5MB 1.5MB -603.0B
visTypePie 74.6KB 74.5KB -117.0B
visTypeXy 113.7KB 113.4KB -332.0B
total -1.0KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 833.2KB 833.3KB +161.0B
lens 40.0KB 39.4KB -606.0B
total -445.0B

History

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

@flash1293 flash1293 merged commit 59d4223 into elastic:master Jun 24, 2021
@flash1293 flash1293 added auto-backport Deprecated: Automatically backport this PR after it's merged and removed auto-backport Deprecated: Automatically backport this PR after it's merged labels Jun 24, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 102877

flash1293 added a commit to flash1293/kibana that referenced this pull request Jun 24, 2021
# Conflicts:
#	x-pack/test/functional/apps/discover/__snapshots__/reporting.snap
flash1293 added a commit that referenced this pull request Jun 24, 2021
…3223)

# Conflicts:
#	x-pack/test/functional/apps/discover/__snapshots__/reporting.snap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Filter action on other doesn't handle (empty) correctly [Lens] Refactor handling of empty values
5 participants