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

Adapter architecture #1280

Open
fjorgemota opened this issue Feb 17, 2019 · 9 comments
Open

Adapter architecture #1280

fjorgemota opened this issue Feb 17, 2019 · 9 comments
Milestone

Comments

@fjorgemota
Copy link

Hey.

First, thanks for the project, it seems to work very well!

Second, and more related to the issues, I have a suggestion for this project: What about move this project from the vanilla to the adapter architecture, as suggested by MDC-Web.

I know that preact is pretty focused on DOM/browsers, but this change would allow a few things I think are cool for the future and maintainability of the project: With the MDC-Web migrating to Typescript in the near future, this change would allow to detect breaking changes easily when upgrading MDC-Web components.

To finalize, there are a few other advantages too, as seen on this discussion on the RMWC project.

What do you think?

@cromefire
Copy link
Collaborator

I had in mind to try that in 2.0, but had very little time. I will try to migrate them to that architecture when we start migrating the components

I know that preact is pretty focused on DOM/browsers

It could help with prerendering

@cromefire cromefire added this to the 2.0 milestone Feb 17, 2019
@prateekbh
Copy link
Owner

Let's check it out.

The only thing I ask skeptical about is that if we should undertake the task of rewrite plus reach together.

Preferably I'd want to do re-arch in 3.0 instead

@cromefire
Copy link
Collaborator

I mean, it not a breaking-change we can do it in 2.1

@fjorgemota
Copy link
Author

Hey.

I throught about suggesting the re-arch to migrate to 3.0, but...to what version of the MDC-Web this project will migrate in 2.0? 0.44? depending on the quantity of the breaking changes we will need to fix, I think it would be useful to already migrate to the adapter interface, which I think should be quite easy to do with the Preact features.

Also, as @cromefire noted, it's not a breaking change: There shouldn't be any user-facing breaking changes, because the adapter is basically internal to the DOM changes of the component...

IMO, my suggestion is: Migrate a few components to experiment, and then decide what todo with the next components. I think the adapter architecture will really help on the long-term, and will avoid a ton of bugs in the future (by using Typescript), and will really help with cool things like pre-rendering and, who knows? better performance. :)

@prateekbh
Copy link
Owner

Well my only reason to suggest 3.0 was not to block the community from getting 2.0 pmc, may be we should do it in 2.1.0 or something or may be a gradual shift if components one by one

@fjorgemota
Copy link
Author

Oh, I see. I wouldn't like to delay or even block the community from getting PMC 2.0, because of this I suggested a gradual shift of components. It shouldn't be that harder according to MDC-Web documentation anyway.

@prateekbh
Copy link
Owner

Yeah so let's just do them one by one after 2.0

@cromefire
Copy link
Collaborator

But I would still like to try it on one or two components

@prateekbh
Copy link
Owner

Sure, let's do it

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

No branches or pull requests

3 participants