Skip to content

[NP] Move saved object modal into new platform#56383

Merged
maryia-lapata merged 23 commits intoelastic:masterfrom
maryia-lapata:save-object-modal
Feb 6, 2020
Merged

[NP] Move saved object modal into new platform#56383
maryia-lapata merged 23 commits intoelastic:masterfrom
maryia-lapata:save-object-modal

Conversation

@maryia-lapata
Copy link
Copy Markdown
Contributor

@maryia-lapata maryia-lapata commented Jan 30, 2020

Fixes #55423.

The functionality around the save modal for saved objects was moved into a new NP plugin saved_objects:

  • src/legacy/ui/public/saved_objects/components/saved_object_save_modal.tsx was removed;
  • src/plugins/kibana_react/public/saved_objects and src/legacy/ui/public/saved_objects/show_saved_object_save_modal.tsx were moved into new plugin src/plgins/saved_objects.

Dev Docs

SavedObjectSaveModal, showSaveModal and SaveResult from ui/saved_objects, and SavedObjectFinderUi, SavedObjectMetaData and OnSaveProps from src/plugins/kibana_react/public were moved to a new plugin src/plugins/saved_objects.

Also now showSaveModal requires the second argument - I18nContext:

import { showSaveModal } from 'src/plugins/saved_objects/public';
...

showSaveModal(saveModal, npStart.core.i18n.Context);

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
This reverts commit f2f9f5e.
This reverts commit d0f0ea6.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js
import { useKibana } from '../context';

// TODO the typings for EuiListGroup are incorrect - maxWidth is missing. This can be removed when the types are adjusted
const FixedEuiListGroup = (EuiListGroup as any) as React.FunctionComponent<
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

EuiListGroup already contains maxWidth, so, I think, we can remove the wrapper FixedEuiListGroup.

@@ -0,0 +1 @@
@import './save_modal';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@flash1293 I don't see that the styles from src/plugins/saved_objects are imported automatically. Maybe do you know how I can load them?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@flash1293 Should be able to help with adding this file to the SASS compiler, but currently this line is wrong. There is no save_modal.scss file in this folder. The import needs to point to the index file within that folder instead.

Suggested change
@import './save_modal';
@import './save_modal/index';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@cchaos Nice catch! thanks.
Since styles can't move to the new platform at the moment, I left its import in ui/saved_objects for now.

@maryia-lapata maryia-lapata marked this pull request as ready for review February 3, 2020 12:59
@maryia-lapata maryia-lapata requested a review from a team February 3, 2020 12:59
@maryia-lapata maryia-lapata requested review from a team as code owners February 3, 2020 12:59
Copy link
Copy Markdown
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

ML edit LGTM

Copy link
Copy Markdown
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

LGTM once green. Can you add a dev doc section about the updated paths to import those?

@maryia-lapata maryia-lapata added release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. and removed release_note:skip Skip the PR/issue when compiling release notes labels Feb 4, 2020
@maryia-lapata
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

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

Tested and overall LGTM.
Added a couple of structural comments.

Copy link
Copy Markdown
Contributor

@crob611 crob611 left a comment

Choose a reason for hiding this comment

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

Canvas changes look good 👍 Nice work on this

# Conflicts:
#	src/legacy/core_plugins/visualizations/public/np_ready/public/wizard/search_selection/search_selection.tsx
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

History

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

@maryia-lapata maryia-lapata merged commit f4f5b04 into elastic:master Feb 6, 2020
@maryia-lapata maryia-lapata deleted the save-object-modal branch February 6, 2020 16:56
maryia-lapata added a commit that referenced this pull request Feb 7, 2020
* Move saved object modal into new platform

* Fix TS

* Revert "Fix TS"

This reverts commit f2f9f5e.

* Revert "Move saved object modal into new platform"

This reverts commit d0f0ea6.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js

* Move save_object_save_modal

* Move show_saved_object_save_modal.tsx

* Move save_object_finder.tsx

* Remove unused export

* Pass I18nContext to showSaveModal

* Update i18n ids

* Fix map save

* Refactoring

* Load styles

* Revert importing styles

* Update snapshot

* Update snapshot

* Structural refactoring

* Fix path

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@flash1293 flash1293 added the Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// label Feb 10, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

majagrubic pushed a commit to majagrubic/kibana that referenced this pull request Feb 10, 2020
* Move saved object modal into new platform

* Fix TS

* Revert "Fix TS"

This reverts commit f2f9f5e.

* Revert "Move saved object modal into new platform"

This reverts commit d0f0ea6.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js

* Move save_object_save_modal

* Move show_saved_object_save_modal.tsx

* Move save_object_finder.tsx

* Remove unused export

* Pass I18nContext to showSaveModal

* Update i18n ids

* Fix map save

* Refactoring

* Load styles

* Revert importing styles

* Update snapshot

* Update snapshot

* Structural refactoring

* Fix path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
majagrubic pushed a commit that referenced this pull request Feb 11, 2020
…56428)

* [Add panel flyout] Moving create new to the top of SavedObjectFinder

* [Add panel flyout] Moving create new to the top of SavedObjectFinder

* Fixing failing unit test

* Readd missing test

* [NP] Move saved object modal into new platform (#56383)

* Move saved object modal into new platform

* Fix TS

* Revert "Fix TS"

This reverts commit f2f9f5e.

* Revert "Move saved object modal into new platform"

This reverts commit d0f0ea6.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js

* Move save_object_save_modal

* Move show_saved_object_save_modal.tsx

* Move save_object_finder.tsx

* Remove unused export

* Pass I18nContext to showSaveModal

* Update i18n ids

* Fix map save

* Refactoring

* Load styles

* Revert importing styles

* Update snapshot

* Update snapshot

* Structural refactoring

* Fix path

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

* Applying PR comments

Removing faulty rebase imports

Fixing unresolved conflict

Removing faulty merge files

Removing faulty import

Readd accidentally added file

* Removing unnecessary eslint-ignore

Co-authored-by: Maryia Lapata <mary.lopato@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
majagrubic pushed a commit that referenced this pull request Feb 12, 2020
…56428) (#57360)

* [Add panel flyout] Moving create new to the top of SavedObjectFinder

* [Add panel flyout] Moving create new to the top of SavedObjectFinder

* Fixing failing unit test

* Readd missing test

* [NP] Move saved object modal into new platform (#56383)

* Move saved object modal into new platform

* Fix TS

* Revert "Fix TS"

This reverts commit f2f9f5e.

* Revert "Move saved object modal into new platform"

This reverts commit d0f0ea6.

# Conflicts:
#	src/legacy/core_plugins/kibana/public/discover/np_ready/angular/discover.js

* Move save_object_save_modal

* Move show_saved_object_save_modal.tsx

* Move save_object_finder.tsx

* Remove unused export

* Pass I18nContext to showSaveModal

* Update i18n ids

* Fix map save

* Refactoring

* Load styles

* Revert importing styles

* Update snapshot

* Update snapshot

* Structural refactoring

* Fix path

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

* Applying PR comments

Removing faulty rebase imports

Fixing unresolved conflict

Removing faulty merge files

Removing faulty import

Readd accidentally added file

* Removing unnecessary eslint-ignore

Co-authored-by: Maryia Lapata <mary.lopato@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Maryia Lapata <mary.lopato@gmail.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

Labels

backported Feature:NP Migration Feature:Saved Objects release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.7.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move saved object modal into new platform

9 participants