Skip to content

[ui/public/utils] Copy rarely used items to where they are consumed #52841

@lukeelmers

Description

@lukeelmers

Part of #51560

There are a few utils in src/legacy/ui/public/utils that are small and not widely used. Rather than find a "shared" place for them to live, it is probably cleaner to just copy them to the places that rely on them:

  • case_conversion
    • keysToSnakeCaseShallow + tests
      • copy to src/legacy/server/status/lib
      • remove duplicate from src/legacy/utils/case_conversion.ts
    • keysToCamelCaseShallow + tests
      • copy to src/legacy/core_plugins/kibana/public/management
      • remove duplicate from src/legacy/utils/case_conversion.ts
  • collection tracked in Kibana app migration: Move static code dependencies into kibana_legacy plugin #50670
    • move+ tests 👉 src/legacy/core_plugins/timelion
      • also copy to src/legacy/ui/public/vis/editors/default
    • organizeBy + tests 👉 src/legacy/ui/public/indexed_array
    • pushAll + tests -- delete, unused
  • diff_object + tests 👉ui/state_management
  • function + tests 👉ui/state_management
    • also copy to ui/directives/watch_multi
  • key_map 👉ui/directives
    • also update import from src/test_utils/public
  • math
    • leastCommonMultiple 👉ui/vis (update imports in ui/vis/lib and ui/vis/editor
    • greatestCommonDivisor -- move with leastCommonMultiple, but do not export as it is unused outside of this file
  • numeric 👉src/legacy/core_plugins/kibana/public/management
  • parse_interval 👉src/legacy/core_plugins/data/common
  • sort_prefix_first 👉x-pack/legacy/plugins/kuery_autocomplete
  • string_utils 👉ui/saved_objects
    • also copy to src/legacy/core_plugins/kibana/public/management
  • supports 👉src/legacy/core_plugins/tile_map/public
  • Document changes[0] in the ui/public cleanup section of the dev docs issue Dev Docs entry: ui/public & angular cleanup 7.6 #43511

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions