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

replacing Angular watch list UI with React one #32401

Merged
merged 19 commits into from
Mar 7, 2019

Conversation

bmcconaghy
Copy link
Contributor

This replaces the watcher list Angular UI with a React one. It also starts using Typescript in watcher and uses hooks/function components instead of classes + Redux.

@bmcconaghy bmcconaghy added Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Mar 4, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

🙌 Great work Bill! This is looking terrific. I tested this in browser and looked through the code. I found one error that I think needs to be addressed as part of this PR, and had a few other minor suggestions regarding UI and variable names.

What do you think of migrating the code from lib to services? I have a hard time drawing a distinction between the two, and our other apps only have a services directory.

@bmcconaghy
Copy link
Contributor Author

@cjcenizal thanks for the review, pushed some changes based on your feedback. Had to tweak the flexbox stuff for status to get it to look right to me. Mind taking another look?

@bmcconaghy bmcconaghy requested a review from cjcenizal March 4, 2019 20:57
@bmcconaghy
Copy link
Contributor Author

re lib -> services will do that as a separate PR at the end

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

❤️ Looks great man! I had a couple more comments about whitespace, and also wanted to mention #32401 (comment) in case you wanted to address that one too.

@bmcconaghy bmcconaghy requested a review from jen-huang March 4, 2019 22:28
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@bmcconaghy
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

This starts looking great! I added a few comments. The enum one might be a big change but I've seen it a lot used for the list of constants that we have here. I let you decide.

Regarding the layout, wouldn't it be good to follow the pattern used in other apps regarding where the resource create buttons (top right of the screen, fill background) and the delete button (on the left of the search bar) are located?

screen shot 2019-03-05 at 16 52 22

screen shot 2019-03-05 at 16 52 04

@@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

export const ACTION_MODES = {

export const ACTION_MODES: { [key: string]: string } = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typescript string-based enums (https://www.typescriptlang.org/docs/handbook/enums.html) are normally used for these list of constant values.

export const PLUGIN = {
ID: 'watcher'
};
declare module 'plugins/watcher/models/watch' {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to manually create this file and maintain it? Normally it is automatically generated by Typescript from our exposed index.ts file.

Choose a reason for hiding this comment

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

I am also curious about this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This module is not in TS, so yes I had to create it manually.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bmcconaghy For missing module typings it would be better to use the /x-pack/typings folder then.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@bmcconaghy
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

This looks really good! I left a few very minor comments.

I agree with @sebelga regarding the layout. It seems a little weird having the delete button to the right of the search. In one of the design library examples, I noticed the delete button doesn’t actually render unless an item(s) in the table is selected. That might be another option!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@bmcconaghy
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@bmcconaghy
Copy link
Contributor Author

@sebelga @alisonelizabeth I just want to get this merged so others can use it as the basis for other Reactification. I do think there are some design issues to be addressed but want to handle those all at the end after we have finished off the porting work. So I'm not ignoring your feedback just deferring it.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@bmcconaghy bmcconaghy merged commit a170f7a into elastic:watcher-port Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Watcher Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants