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

[Canvas][tech-debt] Refactor Layout Annotations (kill recompose.pure Part 2) #73305

Merged
merged 2 commits into from
Jul 28, 2020

Conversation

clintandrewhall
Copy link
Contributor

Summary

A broken-out PR from #73295

While converting various layout annotations to remove the pure HOC, I noticed they're 1/ all very alike, and 2/ spread out throughout the components directory. Seemed to make sense to combine them, (and their styles).

This PR kills recompose.pure, refactors the files and related CSS, and applies best practices.

@clintandrewhall clintandrewhall added review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort technical debt Improvement of the software architecture and operational architecture v8.0.0 release_note:skip Skip the PR/issue when compiling release notes impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. v7.10.0 labels Jul 27, 2020
@clintandrewhall clintandrewhall requested review from monfera and a team July 27, 2020 15:50
@clintandrewhall clintandrewhall requested a review from a team as a code owner July 27, 2020 15:50
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas (Team:Canvas)

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Marking as approved since stuff is just being moved to another file. There is some future clean up that could happen here, as noted.

Copy link
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.

Changes look good. 👍

width: number;
}

export const BorderConnection: FC<Props> = ({ transformMatrix, width, height }) => (
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: A few of the annotations like this one get called frequently. Should we look into doing any memoization of these components? Or do you think the overhead of the memoization would outweigh any performance gains?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's not a bad idea. I'm not sure of the perf gain, but the rendering aspect could certainly weigh heavily. I'll test before committing.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
canvas 1.5MB -777.0B 1.5MB

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes review Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas technical debt Improvement of the software architecture and operational architecture v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants