Comments (25)
- Any chance of a
hydrogen-ui
sandbox/demo store being propped up in the near future?I'm not sure we'll do a full-on demo store, but I do actually plan on spinning up a different framework (Remix probably?) to use as an E2E test for hydrogen-ui, in order to ensure that things work well outside of hydrogen-framework.
A demo of hydrogen-ui
with Next.js would be helpful! Currently reading through the docs and looking to build a site with that combo.
from hydrogen-v1.
Congrats on 1.0 Hydrogen team π
Thanks!
From the handy TODO list here #66 (comment) and the recent PRs from @frehner, I think I have a rough sense of how this effort is evolving.
Understood that the
hydrogen
+hydrogen-ui
split is an ongoing affair, but had a few questions on general direction for this effort that weren't totally clear based on my reading of docs/decisions, PRs and issue threads. Many thanks in advance :)
- Certain functionality of
hydrogen
which currently seems bound up with Vite/RSC/Oxygen context would be well-suited for Nextjs, Gatsby, CRA or other SPA integration purposes (e.g. shopifyConfig, CSR graphql client calls, cart query/state). Is it anticipated that there will be any provided interface to tap into the non-Vite/Oxygen aspects ofhydrogen
for such use cases?
Forgive me if I don't completely understand what you're asking here, hopefully I answer it but if not feel free to ask again. But yes, we do hope to be able to pull as much as we can out of hydrogen-framework and into hydrogen-ui, including things like shopifyConfig
, etc.
- Somewhat related, is it expected that
hydrogen-ui
will be completely stripped down presentational components or will they be handling things like cart state, queries and mutations?
The goal is to include things like Cart State, yeah! Things like queries/mutations are hopeful as well, but we're still a little less clear at the moment how to best include these things, and what they look like.
- Any chance of a
hydrogen-ui
sandbox/demo store being propped up in the near future?
I'm not sure we'll do a full-on demo store, but I do actually plan on spinning up a different framework (Remix probably?) to use as an E2E test for hydrogen-ui, in order to ensure that things work well outside of hydrogen-framework.
from hydrogen-v1.
Congrats on 1.0 Hydrogen team π
From the handy TODO list here Shopify/hydrogen#66 (comment) and the recent PRs from @frehner, I think I have a rough sense of how this effort is evolving.
Understood that the hydrogen
+ hydrogen-ui
split is an ongoing affair, but had a few questions on general direction for this effort that weren't totally clear based on my reading of docs/decisions, PRs and issue threads. Many thanks in advance :)
-
Certain functionality of
hydrogen
which currently seems bound up with Vite/RSC/Oxygen context would be well-suited for Nextjs, Gatsby, CRA or other SPA integration purposes (e.g. shopifyConfig, CSR graphql client calls, cart query/state). Is it anticipated that there will be any provided interface to tap into the non-Vite/Oxygen aspects ofhydrogen
for such use cases? -
Somewhat related, is it expected that
hydrogen-ui
will be completely stripped down presentational components or will they be handling things like cart state, queries and mutations? -
Any chance of a
hydrogen-ui
sandbox/demo store being propped up in the near future?
Cheers!
from hydrogen-v1.
That pretty much answers all my questions, thanks @frehner!
Would be fantastic to see some sort of example non-hydrogen sandbox at some point. If Remix, I'd wager that'd probably be of interest to @wintersieck and followers of #1718
from hydrogen-v1.
when you go to run/install/setup hydrogen, it's actually hydrogen the superset (i.e., framework + components)
The combo of these two (framework + components) will always be pulling from two separate packages. Throughout various files in the project you create (from whatever starter template), you will see references to both the framework package
and the components package
.
My initial proposal was to use @shopify/hydrogen
as the package for components because:
- It's slightly shorter and easier to refer to in all of our docs & examples for using components
- It's likely to be used more than
hydrogen-framework
since the components can be added elsewhere (Next.js, etc)
But I like your proposal with a slight variation:
@shopify/hydrogen
is the React meta-framework@shopify/hydrogen-react
is the React SDK (components + hooks)
This obviously leaves the door open for @shopify/hydrogen-vue
.
What do you think?
from hydrogen-v1.
Would be fantastic to see some sort of example non-hydrogen sandbox at some point. If Remix, I'd wager that'd probably be of interest to @wintersieck and followers of #1718
This would be of interest π― We are currently using Remix and looking to begin a replatform project to Shopify and the hydrogen-ui
would be something we would want to invest in.
from hydrogen-v1.
Hey all, just having a read of this, am mostly interested in the Vue stuff mentioned earlier.
From what I can gather from the comments this is almost done, but a hydrogen-vue
framework has not been started on?
from hydrogen-v1.
LFG π π π π π π
from hydrogen-v1.
hey, can we actually reverse that to be: hydrogen
and hydrogen-components
?
and im assuming that when you go to run/install/setup hydrogen, it's actually hydrogen the superset (i.e., framework + components). is that right?
from hydrogen-v1.
The proposal of
@shopify/hydrogen
+@shopify/hydrogen-react
was clear to me till@shopify/hydrogen-vue
is in the mix. In the world where@shopify/hydrogen-vue
exist, it feels very strange that@shopify/hydrogen
is React dependent?
I can see the source of confusion there. However, I'm OK with hydrogen
being the reserved namespace for the original "Shopify Hydrogen framework," where React happens to be an implementation detail. I think folks will see their specific language/framework (e.g. vue
) and gravitate towards that without wondering too much about what hydrogen
proper is.
from hydrogen-v1.
@morganmccunn and I aligned on the following:
@shopify/hydrogen
will be the React meta framework1@shopify/hydrogen-react-sdk
will the the React SDK
1 We will investigate exposing the React SDK through the same package as the framework for maximum typability, e.g. @shopify/hydrogen/sdk
or just re-exporting its entire contents in the framework package's index.js
entrypoint.
from hydrogen-v1.
An experimental version of Hydrogen UI is available at https://github.com/Shopify/hydrogen-ui
from hydrogen-v1.
The proposal of @shopify/hydrogen
+ @shopify/hydrogen-react
was clear to me till @shopify/hydrogen-vue
is in the mix. In the world where @shopify/hydrogen-vue
exist, it feels very strange that @shopify/hydrogen
is React dependent?
from hydrogen-v1.
A couple questions/comments:
- I agree with the statement above. If the framework is the foundational piece I agree with calling this
@shopify/hydrogen
- However, one concern with ^ is that when someone uses
npm init @shopify/hydrogen
aren't they are getting both/hydrogen
and/hydrogen-react
to get the full "playground" ? Perhaps we need to rename this? - I would think that
@shopify/hydrogen-react-sdk
is more specific, and potentially less confusing since/hydrogen
is also react-specific. I would vote for this over/hydrogen-react
. Is the concern with the above simply the length of typing it out?
from hydrogen-v1.
However, one concern with ^ is that when someone uses
npm init @shopify/hydrogen
aren't they are getting both/hydrogen
and/hydrogen-react
to get the full "playground" ? Perhaps we need to rename this?
Right. They're getting both hydrogen-react-framework
and hydrogen-react
. Short of a major rename for the framework part, I think folks are just going to "get" this after it happens. It's tough to envision now, but it makes sense to me as a developer, especially if we add the additional context to what hydrogen-react-sdk
is.
Is the concern with the above simply the length of typing it out?
Yeah haha. It's a major bummer typing this out as a developer, especially since it's already namespaced with @shopify/
. Typing e.g. next
is super super nice when you're working in Next.js, and I wouldn't be opposed to finding a package name someday that doesn't have @shopify/
prefixed, since this needs to be repeated in code examples, tutorials, starter templates βΒ everywhere.
from hydrogen-v1.
We've agreed to delay this work to post v1.0.0 given that we expect these to be tightly coupled on launch. So while this work is still valuable for future growth, it can be delayed until after official launch!
cc @jplhomer @heimidal @igrigorik @zkoch
from hydrogen-v1.
Update here: We decided we would separate the SDK and the framework before 1.0.0 to:
- Help folks better understand βwhat is hydrogenβ
- Enable the community to use the parts that are relevant
- Not delay the inevitable (and potentially make it harder for us to do this in the future)
However, I want to be clear that we are building the hydrogen happy path which is framework + SDK together. If we do something that unintentionally breaks integration where perhaps they are only using the SDK, then we it will be on that group to address. Obviously we try to keep disruptions to a minimal as best as possible! :)
cc @elisenyang
from hydrogen-v1.
Update: We've aligned on hydrogen-ui
as the name for the package containing the components, hooks, and utilities
from hydrogen-v1.
As part of the work done in #786 , we got rid of our custom graphql script (because it wasn't working and it wasn't documented).
Having looked into it a bit more, one of the things that script did was to pull the raw GraphQL queries / fragments from the .graphql
files and put them into a file (called graphql-constants.ts
) where they could be imported as normal strings. With that script removed, however, the graphql-constants.ts
file isn't kept up-to-date with the changing queries anymore.
To solve this, we have a couple of options:
- Finish the work to split hydrogen-ui and hydrogen, in which case we'll start using a real bundler (Vite) instead of TS to compile our code. Once that's done, we can use the Rollup graphql plugin - which coincidentally is already in our hydrogen package anyway. π€
- Remove fragments altogether, which is something still being explored and tracked in #778
from hydrogen-v1.
I thought @michenly just shipped work to export all these fragments from @shopify/hydrogen/fragments
instead, which removes the need for a graphql-constants.ts
file. Or am I confused?
from hydrogen-v1.
I thought @michenly just shipped work to export all these fragments from
@shopify/hydrogen/fragments
instead, which removes the need for agraphql-constants.ts
file. Or am I confused?
She's actually importing from the graphql-constants.ts
file and having to manually copy over the fragments into that file in order for it to work. (Or using the existing ones in there, that are probably out of date). See #845 as an example
from hydrogen-v1.
I made a list of things that could be worked on in #1060 , but let me put them here for better visibility:
- #1025
- #1074
- Update hydrogen-ui to SFAPI
2022-07
? (Do we keep the components in hydrogen still at 2022-04 and don't change them, and only update things in h-ui to 07?) -
Maybe HMR for h-ui components updating while working on the demo store? Honestly not sure on this oneFor now, let's skip this. -
CI checks for package size? Maybe.for now, let's skip this -
#1071this is a framework issue, not a hydrogen-ui issue, so I'm skipping this for now - Testing:
- Versioning and publishing to npm fully working.
-
Maybe make a small Vite/Rollup plugin that ensures that if you're importing something from theFor now, let's skip thisindex.client.ts
entry file, that the imported file is also a.client.[t|j]sx?
file? - Add a
/shared
entry point - Add typechecking as part of the PR process
- Maybe setup auto-dependency-PRs like Vite does so that we're always up-to-date
from hydrogen-v1.
CI checks for package size? Maybe.
@cartogram βΒ going to add this to our linting sprint.
from hydrogen-v1.
going to add this to our linting sprint.
@benjaminsehl For storefront code, great idea! I think @frehner is referring to the framework in his point though, and would make sense that we start there. I think most OS frameworks use https://github.com/ai/size-limit
from hydrogen-v1.
The only work left to consider this done is
- Publishing to NPM
- #1154
from hydrogen-v1.
Related Issues (20)
- Shopify Hydrogen App crashes
- [BUG] CartCheckoutButton resolved to an invalid checkout page URL while BuyNowButton works fine HOT 5
- "CartLineProvider is not being given..." (/api/hydrogen/hooks/cart/usecartline)
- useQuery throws an error saying useQuery isn't exported when using in a custom hook HOT 2
- server-side redirects, preserving legacy Shopify URL patterns HOT 4
- [BUG] cannot obtain current URL in client code HOT 3
- [BUG] Oxygen is not defined Error on Deployment
- Hydrogen App not starting in Local Env. HOT 17
- [BUG] unclear docs regarding environment variable usage
- [BUG] 'Request Entity Too Large' error when POSTing to internal api routes HOT 1
- [BUG]
- Shop Pay Button not customizable with className provided HOT 1
- [BUG]
- [BUG] Back to Storefront from Checkout on Safari ios Error
- [BUG] linesRemove and linesAdd do not support promises
- [BUG]
- [BUG] HOT 2
- [BUG]
- [BUG]
- [BUG]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydrogen-v1.