fix(components): Making FormatFile a Composed Solution #2322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivations
We've been talking about different ways to compose with our existing components, especially the ones where we have an opinionated solution that we want to keep, but we also want to expose the components under the hood.
This PR breaks up FormatFile into smaller chunks, and makes the actual top-level FormatFile a composed version of those underlying parts. So if in the future if anyone wants to extend or build their own FormatFile, they have all the parts to get started with immediately, and can update only the part they want.
In addition, there is a "slot" pattern in this PR that we can talk about. This pattern is consistent with a slot from a web component. Whatever element you provide gets the exact same props our underlying component would.
This PR is meant as a discussion tool. We may not move forward with anything in this PR, or we may choose to cherry pick certain solutions and leave others behind.
The primary goal of this PR, and any solution we choose should be 1:1 compatibility with existing usages, nothing changed, only reconfigured.
Changes
FormatFile is now a compound component that can be used to compose your own FormatFile.
InternalThumbnail has been made into a new component called Thumbnail. Why should we keep our building blocks for ourselves?
Testing
Our test suite should pass, and ideally the entire JO/JF test suite should pass as well.
Changes can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.