## Summary
This PR adds types to Renderers and the DropdownFilter. It also adds snapshots and stories for DropdownFilter. This change also includes better `recompose` typings.
<img width="1439" alt="screen shot 2019-01-24 at 5 53 57 am" src="https://user-images.githubusercontent.com/297604/51674396-80efbe00-1f9e-11e9-9ad9-d63b1ec51dbd.png">
## Bugs Found and Resolved
- `AdvancedFilter` renderer never successfully passed a selected `filter` value.
- `DropdownFilter` CSS did not constrain the dropdown arrow. Without a `relative` positioned parent, the arrow would end up in the top-right of the screen.
- `DropdownFilter` had several [shadowed variables](https://palantir.github.io/tslint/rules/no-shadowed-variable/).
- `DropdownFilter` logic has several improvements, including creation of options and order of inclusion
Now you can use the Enter key to submit the form used e.g. when saving a new dashboard
Good for a11y + a time saver
Adds Form element, migration of Button onClick to Form's onSubmit
Adds functional test for Enter key submission
Fix#30831
* [Maps] replace jquery_ui_sortable with EUI Drag And Drop
* minor clean up
* fix drag and drop skipping
* add jest snapshot test for LayerTOC
* extract EuiDraggable list to js variable
* more unique droppableId
* update jest snapshot
The FilterEditor component was not updating derived state when the filter prop changed. This issue was exposed by a race condition in the dashboard app. When there are no panels with an index pattern the dashboard will fetch the default index pattern and pass it into the FilterBar. As a result, if a user managed to click the "Add Filter" button before the default index pattern finished loading the editor would first render with a filter containing no index pattern, which would cause the Field ComboBox to render in a disabled state. The FilterEditor props would update after the default index pattern finished loading, but state variables such as selectedIndexPattern would remain unchanged.
The root issue is that the source of truth about which index pattern should be used is stored in both the filter prop and the selectedIndexPattern state variable. To fix this I added a key prop to the FilterEditor that will be unique to each filter so that the component will be recreated on each filter change, while the draft state can remain fully uncontrolled in the FilterEditor component.
* uptime design cleanup
* uptime design cleanup
* test
* errorlist now styled
* errorlist now styled
* errorlist now styled
* cleanup
* replace color vars with correct naming
* some titles
* more cleanup
* clean up silly gray graph
* Address problems with UI update.
* Refresh jest snapshots.
* Fix busted types.
* Refresh jest snapshots broken by busted type fix.
* Rename duplicate localization key.
* Use same curve type for both check series on monitors page.
* Remove unused translations.
* Display name instead of ID in ErrorList component.
* Update x-pack/plugins/uptime/public/components/functional/ping_list.tsx
Co-Authored-By: snide <dave.snider@gmail.com>
* Update x-pack/plugins/uptime/public/components/functional/ping_list.tsx
Co-Authored-By: snide <dave.snider@gmail.com>
* Modify updated code to avoid flooding console log with errors.
* Get functional and unit tests passing.
* Fix busted unit test.
* Update jest snapshots.
* Add panel to empty state.
* Avoid rendering monitor list sparkline charts when downSeries has no values.
* Remove crosshair synchronization from monitor charts because of display bug. Provide default 0 value to series for check chart.
* Fix broken snapshot.
* Update monitor list and errors list to handle simple_query_string filters.
* Make FilterBar component incremental to avoid overwriting queries that are in progress of being edited.
* Update histogram query to support simple_text_query.
* Delete hardcoded height prop that was breaking UI in mobile-sized windows.
* Fix bug in check histogram function and add tests.
* Update API tests and functional UI tests.
* Fix type error in test file.
* Last few fixes
- Center empty prompt
- remove crosshairs from sparkline
- reconcile styles of text in table
* Update snaps
* WIP.
* Update snapshot query to avoid Apollo Query class and allow manual fetching.
* Update SnapshotLoading component to better reflect the actual shape of the Snapshot component.
* Introduce HOC to manage GraphQL querying.
* Remove unneeded code.
* Update monitor page query components to use new query paradigm.
* Remove remaining references to apollo query component.
* Update filter bar snapshot.
* Update empty state.
* Fix busted type in test.
* Update schema type to avoid server error.
* Remove obsolete translations.
* Remove more obsolete translations.
* Remove obsolete code from Snapshot component. Rewrite graphql HOC with hooks.
* Change loading state condition for filter bar.
* Simplify app refresh process.
* Update loading state for several components to avoid unnecessary renders.
* Add default sort order for getAll pings function.
* Add translation to bare UI string.
* Update API fixtures to handle new default sort direction.
* Fix type errors.
* Remove unused import.
* Change the way component passes children prop.
* Fix typing error.
* Modify import APIs to handle special use cases from the previous import process
* Cleanup
* Add more examples to the docs
* Make title come from data inside file
* Fix some broken tests
* Fix docs
* Fix docs wording
* Apply PR feedback pt1
* Apply PR feedback pt2
* Fix migrate significant terms include/exclude
* update ref to expect, update test initialization
* created function to encapsulate duplicated code
* commented seemingly extraneous code in test
* Removed extraneous initialization code from sig terms test, updated migrate_include_exclude_format.js to use named import from lodash, added localized displayName to sig terms
* Delete dirty prompt
* Moved check box directive
* Move kbn tooltip directive to watcher
* Moved toggle directives to watcher
* Moved json input directive to watcher
* Moved sortable column to watcher
* Fixed sortable column translations
* Remove kbn src directive (unused)
* Moved table cell directive to paginated table
* Moved number list into agg types
* Moved
- agg table
- paginated table
to table_vis plugin
* Moved draggable to vis editor
* Moved sort_prefix_first filter to agg types
* Now actions from dashboard/discovery/visualize listing table is screenreader accessible
* passing screen title to search_bar compoenent
* remove screen title from URL state
* removed obsolete translation for Asian language
* fix: add expression and filter to ElementWrapper propso
cause the component to re-render when these values change
* fix: correctly spread additional props
* chore: convert ElementWrapper to functional component
* chore: refactor ElementWrapper container
use connectAdvanced instead of connect since it provides a way to get a hold of dispatch just one time, so the handlers object can be built in the container and only updated when something actually changes
* fix: reset handlers isComplete when element changes
allow completeFn to be called again, required so that the correct external actions happen
* feat: make expression available on shapes object
* fix: reset done checker on function change
* fix: only rebuild handlers when element changes
rebuild on happens when id, filter, or expression change
* chore: remove unused ElementWrapper props
This commit introduces two changes:
- Adds new platform plugins as a new bundles to the optimizer
- A PluginsService in the UI that loads plugin bundles, initializes plugins, and manages the lifecycle of plugins.