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/render_complete 👉 src/plugins/kibana_utils #44743

Merged
merged 10 commits into from
Sep 25, 2019

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Sep 4, 2019

Summary

Fixes #44367.

Moves ui/render_complete -> src/plugins/kibana_utils.

Notes & Questions

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

For maintainers

@sainthkh sainthkh requested a review from a team as a code owner September 4, 2019 04:01
@elasticmachine
Copy link
Contributor

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@ppisljar
Copy link
Member

ppisljar commented Sep 4, 2019

jenkins, test this

@ppisljar ppisljar added release_note:skip Skip the PR/issue when compiling release notes review Team:AppArch v7.5.0 v8.0.0 labels Sep 4, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@ppisljar
Copy link
Member

ppisljar commented Sep 4, 2019

the directive doesn't need to be imported in the index.ts
in this PR i would move to utils and leave directive.js behind, and create new index.ts which just imports the directive.js
also it would be nice if we can list all the places where we use the renderComplete directive here so we can see when can it be removed or if there is just a single place we could move it there.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@sainthkh sainthkh force-pushed the move-render-complete branch from c4884f2 to 1d579a5 Compare September 4, 2019 23:09
@sainthkh
Copy link
Contributor Author

sainthkh commented Sep 4, 2019

@ppisljar

You're right. index.ts should be removed and directive should be imported directly from new index.ts. This change made functional test pass.

When we search the term render-complete, there are 3 places where this directive is used.

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

mostly LGTM, left two minor cmments

src/legacy/ui/public/vis/vis.js Outdated Show resolved Hide resolved
@ppisljar
Copy link
Member

ppisljar commented Sep 5, 2019

jenkins, test this

@sainthkh sainthkh force-pushed the move-render-complete branch from 58237af to 5b575b9 Compare September 5, 2019 10:53
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mattkime
Copy link
Contributor

mattkime commented Sep 5, 2019

kibana_utils doesn't have kibana.json. Is it intended?

Yes, because its only providing static code.

@streamich streamich mentioned this pull request Sep 5, 2019
13 tasks
@lizozom
Copy link
Contributor

lizozom commented Sep 5, 2019

Looking at this PR, will we need this in our React code?

If not, it should be left in ui/public. If so, it shouldn't be in kibana_react plugin, but rather in visualize or embeddables.

What do you think @gammon ?

@sainthkh sainthkh force-pushed the move-render-complete branch from 5b575b9 to 90e72de Compare September 5, 2019 23:01
@@ -29,8 +29,7 @@ import './lib/pager';

import { getLimitedSearchResultsMessage } from './doc_table_strings';

uiModules
.get('app/discover')
uiModules.get('app/discover')
Copy link
Contributor Author

@sainthkh sainthkh Sep 6, 2019

Choose a reason for hiding this comment

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

@mattkime I reverted to old code. But according to the JavaScript Styleguide, it is recommended to use prettier. I guess that the our goal is to change the entire code base with prettier like the previous version of this commit.

Later, I should break the commit when there are changes by prettier to help others distinguish what's done by me and what's done by prettier.

If you're new to prettier, you can learn how to set up in this article. You'll soon wonder how you wrote code without this.

(Edit: I removed note because it's somewhat fixed after reinstall.)

@sainthkh
Copy link
Contributor Author

Looking at this PR, will we need this in our React code?

If not, it should be left in ui/public. If so, it shouldn't be in kibana_react plugin, but rather in visualize or embeddables.

What do you think gammon ?

@lizozom asked a question but ended with a wrong name tag and this callout didn't reach you @stacey-gammon. So, I copied it here.

@stacey-gammon
Copy link
Contributor

thanks @sainthkh. I think @mattkime is looking into how to replicate this via embeddables. So maybe this is on hold till that is figured out?

@ppisljar
Copy link
Member

i think this can be moved without affecting @mattkime work. if in the end he finishes up with solution that would still use this helpers he would just import them from new place. If he ends up with something that doesn't need this anymore, then we can remove it at that point.

@ppisljar
Copy link
Member

retest

@ppisljar
Copy link
Member

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

@sainthkh
Copy link
Contributor Author

@ppisljar This failure is a bit weird. When I ran it on my local Ubuntu, it failed at the first try. But after that, it passed 10 times without fail.

@ppisljar
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@sainthkh
Copy link
Contributor Author

@ppisljar Another flaky test. I've run the test 5 times on local, it all passed.

@ppisljar
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ppisljar
Copy link
Member

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@mattkime mattkime merged commit f260466 into elastic:master Sep 25, 2019
mattkime pushed a commit to mattkime/kibana that referenced this pull request Sep 25, 2019
* Moved ui/render_complete to kibana_utils.
mattkime added a commit that referenced this pull request Sep 26, 2019
* Moved ui/render_complete to kibana_utils.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes review v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui/render_complete 👉 src/plugins/kibana_utils
6 participants