Skip to content

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

Merged
clintandrewhall merged 2 commits intoelastic:masterfrom
clintandrewhall:tech-debt/annotations
Jul 28, 2020
Merged

[Canvas][tech-debt] Refactor Layout Annotations (kill recompose.pure Part 2)#73305
clintandrewhall merged 2 commits intoelastic:masterfrom
clintandrewhall:tech-debt/annotations

Conversation

@clintandrewhall
Copy link
Copy Markdown
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 t// 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 a team and monfera 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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 t// 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