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

fix(components): Making FormatFile a Composed Solution #2322

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

scotttjob
Copy link
Contributor

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.

Random photo of Atlantis

Copy link

cloudflare-workers-and-pages bot commented Jan 17, 2025

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ae7112
Status: ✅  Deploy successful!
Preview URL: https://be78fb7a.atlantis.pages.dev
Branch Preview URL: https://scott-t-formatfilerefactor.atlantis.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant