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

Beats/ui tweaks #23655

Conversation

mattapperson
Copy link
Contributor

Many UI tweaks + autocomplete search on table

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

If I click the search bar on the edit tag screen I receive an error:

image

image

Using Chrome v69

@mattapperson
Copy link
Contributor Author

Si, this is the thing I was saying would go into a follow up PR after you merge your table refactor (along with the table on beats details doing the same)

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Congrats on these changes, they add a ton of cool functionality to the app.

I had a few questions and some minor arch suggestions, but on the whole it LGTM

name: 'Beats Activity',
disabled: false,
},
// {
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 need to keep this object commented for now or can it be removed?

<div>
<EuiButtonEmpty
onClick={() => {
// random, but spacific number ensures new tab does not overwrite another _newtab in chrome
Copy link
Contributor

Choose a reason for hiding this comment

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

"random, but specific"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hahah mash the keyboard. "random" in that its not 3000 or something another dev of another app might have used. Specific in that its hard coded and not randomly generated. Ion this way if a user clicks this link 20 times its not going to open 20 tabs. Also it will not overwrite another tab or the URL changed by another app opening something in a new tab if someone leaves the tab open

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah sorry - I should have been clearer, I just meant there's a typo in the comment, "specific" was misspelled 👼

name: 'Beat Activity',
disabled: false,
},
// {
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 need to keep this object commented out for now, or can it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be the very first thing we do in phase 2... up to you. I tend to over comment things out

state.currentRequest &&
state.currentRequest.expression !== expression &&
state.currentRequest.cursorPosition !== cursorPosition
? state // ignore this result, since a newer request is in flight
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments like this in these longer one-liners are helpful. It may be useful to include more, like in withSuggestionAtIndexSelected in the autocomplete component.

render={() => <Redirect from="/" exact={true} to="/overview/beats" />}
<div>
<Header
breadcrumbs={[
Copy link
Contributor

Choose a reason for hiding this comment

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

Love that we've added breadcrumbs, it will make the navigation UX much better.

Are you planning to add more functionality to this at a later time? Right now when I click into a beat's details view, it doesn't add a crumb for my selected beat, and the only functional link is the Management one that takes me out of CM altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, yea... ill add that as a TODO before GA

breadcrumbs?: EuiBreadcrumbDefinition[];
}

export class Header extends React.PureComponent<HeaderProps> {
Copy link
Contributor

Choose a reason for hiding this comment

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

So happy to have this UX addition 🥇

@@ -43,6 +60,14 @@ export function ControlBar(props: ControlBarProps) {
/>
) : (
<PrimaryOptions
onKueryBarSubmit={onKueryBarSubmit}
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like a lot of these props are being referenced and then passed through so they can be used in other components.

In the re-arch I'm working on, I've compressed a lot of the assignment options fields into an optional prop that is defined in the table module and passed along. Do you think it would be useful to employ a similar approach here, since it seems like a lot of these props are unused by the intermediary components?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@justinkambic Great question. So the props here are borrowed from whats being used in InfraOps. Perhaps a destruct/spread would be better? That way its passed in how the shared HOC passes in, but we only need to pass through a single prop?

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 that would be good. Can be done in a follow-up, I don't know that we have to halt the changes based on that here, given the timeline for what we want to get merged this week

items: any[];
renderAssignmentOptions?: (item: any, key: string) => any;
showAssignmentOptions: boolean;
type: TableType;

isLoadingSuggestions: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar comment as in the controls file about passing these props through. Could we define an interface for these and pass them through as an object, or include the interface definition when assigning the props type to the class, to keep the table's props definitions cleaner, and only related to what it needs to function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

similar answer 😊

@mattapperson mattapperson merged commit f93d715 into elastic:feature/x-pack/management/beats Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants