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

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

Closed
17 of 19 tasks
lukeelmers opened this issue Dec 12, 2019 · 2 comments · Fixed by #53819
Closed
17 of 19 tasks

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

lukeelmers opened this issue Dec 12, 2019 · 2 comments · Fixed by #53819
Assignees

Comments

@lukeelmers
Copy link
Member

lukeelmers commented Dec 12, 2019

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
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@alexwizp
Copy link
Contributor

alexwizp commented Jan 4, 2020

@lukeelmers almost all items were resolved in #53819 except

collection
   move+ tests 👉 src/legacy/core_plugins/timelion
   also copy to src/legacy/ui/public/vis/editors/default .  

Not sure if we should create new duplicates of the code. Let's try to find a more suitable place for this file.

alexwizp added a commit that referenced this issue Jan 8, 2020
…53819)

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

Closes: #52841

* sort_prefix_first 👉x-pack/legacy/plugins/kuery_autocomplete

* numeric 👉src/legacy/core_plugins/kibana/public/management

* diff_object + tests 👉ui/state_management

* function + tests 👉ui/state_management (function.js was removed!)

* key_map 👉ui/directives

* leastCommonMultiple 👉ui/vis

* string_utils 👉ui/saved_objects

* collection

* parse_interval

* it -> test

* fix CI

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
alexwizp added a commit to alexwizp/kibana that referenced this issue Jan 8, 2020
…lastic#53819)

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

Closes: elastic#52841

* sort_prefix_first 👉x-pack/legacy/plugins/kuery_autocomplete

* numeric 👉src/legacy/core_plugins/kibana/public/management

* diff_object + tests 👉ui/state_management

* function + tests 👉ui/state_management (function.js was removed!)

* key_map 👉ui/directives

* leastCommonMultiple 👉ui/vis

* string_utils 👉ui/saved_objects

* collection

* parse_interval

* it -> test

* fix CI

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
alexwizp added a commit that referenced this issue Jan 8, 2020
…53819) (#54233)

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

Closes: #52841

* sort_prefix_first 👉x-pack/legacy/plugins/kuery_autocomplete

* numeric 👉src/legacy/core_plugins/kibana/public/management

* diff_object + tests 👉ui/state_management

* function + tests 👉ui/state_management (function.js was removed!)

* key_map 👉ui/directives

* leastCommonMultiple 👉ui/vis

* string_utils 👉ui/saved_objects

* collection

* parse_interval

* it -> test

* fix CI

* fix PR comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants