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

[SIEM] fix circular dependency #57729

Merged
merged 5 commits into from
Feb 18, 2020

Conversation

XavierM
Copy link
Contributor

@XavierM XavierM commented Feb 14, 2020

Summary

I broke the circular dependency a while back, I am still surprised about it but I did. Therefore it is only fair that I had to fix it. So here we go!!!

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@XavierM XavierM added bug Fixes for quality problems that affect the customer experience critical Team:SIEM v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v7.6.1 labels Feb 14, 2020
@XavierM XavierM self-assigned this Feb 14, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

Copy link
Contributor

@rylnd rylnd left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this! I appreciate the thought that went into isolating these various constants/helpers into meaningful modules.

I smoke tested this locally, as well as ran the script to make sure things were green, and that if a new cycle was added it'd break properly.

I had one comment about renaming a type, but that's up to your discretion.

EVENTS_VIEWER_ACTIONS_COLUMN_WIDTH,
} from '../constants';

describe('helpers', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

🙏 thank you for adding tests!

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, just realized that you didn't add them per se, but: 🙏 thank you for not deleting them!

export type ColumnId = string;

/** The specification of a column header */
export interface ColumnHeader {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this be more accurate as ColumnHeaderOptions? I personally found it a little confusing that a ColumnHeader component receives a ColumnHeader prop.


interface ColumneHeaderProps {
draggableIndex: number;
header: ColumnHeader;
header: IColumnHeader;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't have anything against naming things with a capital I at the front, but just wonder why we are changing it here and there? Should we be moving towards I with interfaces?

If it's just subjective and per person that's fine. Just curious.

Copy link
Contributor

Choose a reason for hiding this comment

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

@FrankHassanabad I had a similar question, but I think it's because this file also defines a const ColumnHeader ? One should be a type and the other a value so it might not be strictly needed, but I'm guessing this is just a disambiguation. My comment about changing this to options: ColumnHeaderOptions is related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right @rylnd but I agree, I will rename it to ColumnHeaderOptions, that makes more sense to me too.

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

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

Reviewed it, checked it out, played with it.

Appreciate the fixes for the circular deps and how fast this all came together (just like always).

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@XavierM XavierM merged commit fbf75e3 into elastic:master Feb 18, 2020
XavierM added a commit to XavierM/kibana that referenced this pull request Feb 18, 2020
* fix Timeline url dependency

* fix circular dependency

* rename ColumnHeader to ColumnHeaderOptions
XavierM added a commit that referenced this pull request Feb 18, 2020
* fix Timeline url dependency

* fix circular dependency

* rename ColumnHeader to ColumnHeaderOptions
XavierM added a commit to XavierM/kibana that referenced this pull request Feb 18, 2020
* fix Timeline url dependency

* fix circular dependency

* rename ColumnHeader to ColumnHeaderOptions
XavierM added a commit that referenced this pull request Feb 18, 2020
* fix Timeline url dependency

* fix circular dependency

* rename ColumnHeader to ColumnHeaderOptions
@XavierM XavierM deleted the siem-fix-circular-dependency branch June 4, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience critical release_note:skip Skip the PR/issue when compiling release notes Team:SIEM v7.6.1 v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants