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

Add @hydrogen/remix (name TBD) #79

Merged
merged 2 commits into from
Oct 18, 2022
Merged

Conversation

frandiox
Copy link
Contributor

This builds on top of #73 and adds a new @hydrogen/remix package where we can place all the Hydrogen logic for Remix.

TODO: replace data/index.ts to start using the new storefront client.

Is this somewhat close to the package organization we want to have? I think some stuff here overlaps with the current Hydrogen UI.

@frandiox frandiox requested review from jplhomer and frehner October 17, 2022 08:46
Copy link
Contributor

@jplhomer jplhomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My gut says we're not gonna be able to get access to this namespace, but should be an easy find/replace when we know for sure.

@@ -0,0 +1,26 @@
import { createRequestHandler as createOxygenRequestHandler } from "@remix-run/oxygen";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that the graphql API helpers will only be available for Hydrogen deployments to Oxygen? Or is Hydrogen only really meant to be deployed to Oxygen in v2? cc @benjaminsehl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible for anyone to import this function directly from @remix-run/another-provider so perhaps that simple enough?

[key: string]: any;
};

export function createStorefrontClient(clientOptions: StorefrontClientProps) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is essentially solving much of this too? #58 minus some of the features like cache.

Is that right @frandiox

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's meant to be the place where we add all of those features. I've added the storefront object that is described there to start with something.

@frandiox frandiox merged commit 018ec2d into fd-remix-oxygen Oct 18, 2022
@frandiox frandiox deleted the fd-hydrogen-remix branch October 18, 2022 08:09
remcolakens added a commit to remcolakens/hydrogen that referenced this pull request Jul 14, 2023
## Context

This PR has the focus on adding the new product detail page in the style
of the new Code Base Theme.

## Changes

- Added tailwind screen breakpoints in JS with retrievable config
- Added `@remix-eslint-config`
- Added PDP page with all UX-elements in place by the new CBT design
- Added: `ts-reset` to have more mainstream TypeScript properties and
solving known issues
- Added: New prop `availableForSale` on ProductCard 
- Added: `product-features` component for a list of features
- Added: `product-gallery` component for a displaying media content on
the PDP
- Added: `VariantSelector` component for selecting your product's
variant
- Added `product-mapper` for mapping all Shopify data into a managable
object
- Refactor: root page with unused query 
- Refactor: Made better object for ProductGrid without the nested props
- Refactor: Moved away from hardcoded (grid) values and load them in by
using a helper
- Refactor: Use the `import type` for types (new linting rule)
- Refactor: return null when object can be possible empty (new linting
rule)
- Refactor: use dynamic breakpoints for the img sizes
- Refactor: renamed variable `name` to `title` for `<HydrogenImage />
- Refactor: Make props of `<ProductCard />` more in line with Shopify by
renaming brand to vendor and name to title
- Fixed: grid issue for collection page on mobile devices
- Fixed: homePageFeaturedProducts.json mock file
- Fixed: Issue with accordion package where border was not correct
- Fixed: Issue with button where focus color was not correct

## Screenshot

![Screenshot 2023-07-11 at 17-29-58 Code Base Theme
Hydrogen](https://github.com/code-internet-applications/cbt-hydrogen/assets/2558163/c572eca7-a0f4-426c-8321-62ecb8fe3671)

## Paperwork

[SCH-49](https://codeinternetapplications.atlassian.net/browse/SCH-49)
[SCH-112](https://codeinternetapplications.atlassian.net/browse/SCH-112)
[SCH-47](https://codeinternetapplications.atlassian.net/browse/SCH-47)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I've performed a self-review of my own code
- [x] I've added a changeset if this PR contains user-facing or
noteworthy changes
- [x] I've commented my code, particularly in hard-to-understand areas
- [x] I've made corresponding changes to the documentation
- [x] I've tested my code for breaking changes and added the
corresponding
      footer in this PR if needed


[SCH-49]:
https://codeinternetapplications.atlassian.net/browse/SCH-49?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SCH-112]:
https://codeinternetapplications.atlassian.net/browse/SCH-112?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[SCH-47]:
https://codeinternetapplications.atlassian.net/browse/SCH-47?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants