Commit graph

2 commits

Author SHA1 Message Date
Jean-Louis Leysens c5ab7493e5
[ES UI] Reintroduce import of brace/mode/json (#78571)
* added brace/mode/json import everywhere json mode is being used

* added brace mocks to tests

* slight refactor of imports

* remove import from es ui shared

* Reverse adding brace/mode/json import everywhere

- different approach of just adding brace/json/mode to
  es_ui_shared as before with a BIG comment

* updated @kbn/ace readme

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 12:20:33 +02:00
Jean-Louis Leysens 38e63d1029
[ES UI Shared] Remove 'brace' from es_ui_shared public (#78033)
* major wip

* major wip

* fix worker creation leak

* just copy the file over for now

* Remove xjson from static and from es_ui_shared entirely

- moved expand and collapse logic back to es_ui_shared. It has
  nothing to do with ace
- refactor the useXJson hook which bundled XJsonMode with it.
  This was convenient but ultimately inflates the amount of code
  Kibana needs to first load up in the client. Users will need to
  import XJsonMode and instantiate it when they want to use it.
  Updated existing usage.
- Cleaned up Monaco namespace from es_ui_shared because of how
  useXJsonMode was refactored -- no longer exporting an editor
  specific instance means this code does not know about anything
  to do with code editors so it is decoupled from ace and monaco.

* fix export of collapse and expand string literals

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-24 16:02:14 +02:00