Skip to content

Releases: ctrl-alt-del-world/midway

groq conversion - removal of graphql

06 Feb 21:08
Compare
Choose a tag to compare

This release removes the use of the sanity-source-plugin. The reasoning for this is simple, I do not/have not been a fan of graphQL and as you all noticed I was using the _raw key for our grapqhl experience anyway. The graphQL code has been saved into a branch, for anyone wishing to still use it. Additionally I will begin updating the sanity schema away from the nested object structure as it's not needed now that we don't support graphQL in the experience.

I believe everything should be fully operational and I tested things like preview, add to cart so those things should be good to go!

Analytics, Cart + Theming Adjustment

28 Nov 17:10
Compare
Choose a tag to compare

Analytics Pattern
I have implemented a very basic pattern via Ian, it loads the analytics with helmet with out of the box support for GTM, GA and Facebook pixel tracking. Should be relatively easy to implement additional pixels. Noticing potential multi-tagging paired with the transition group so be aware of that in your implementation. May need to move the pixel tracking to a single useEffect call at the template level. (currently in the gatsby-browser.js)

The theme has been modified to use Ians Magic Tricks Sass lib. Anyone using the PostCSS can absolutely continue to do so, keeping in mind this is really all just a theme preference. Granted there are some utility classes that I use which hopefully is easy enough to swap if you are using another framework. This is because I am doing a number of projects with Ian and we're both using this framework + doing similar styling to increase our workflows. Hopefully y'all like Magic Tricks ;).

I also swapped some basic styling and hopefully made it all a little nicer to look out by default. I have been updating some of the actual documentation to reflect some of the recent updates, especially revolving around the changes to the Shopify-Sync functionality.

Big Cart Update--
I have modified the cart to be both more functional and have some low-fi styling. This is because carts, especially slide out carts are relatively tedious and also relatively difficult to implement. Hoping this cart is as close as you need to get you to a finalized experience without too much headache. It works great on mobile and supports the max-height issues etc that come with iPhones. It also comes with a free shipping progress bar + messaging. If you're not offering this you can easily comment it out!

Sanity-Shopify Sync Rewrite with Metafields

06 Nov 21:38
Compare
Choose a tag to compare

The Sanity webhook has been extended to diffmatch against itself. This is a pattern I am implementing to resolve an issue with inventory/hourly incremental syncs from Shopify.

The new function now converts various elements of the Shopify product to an object to diff match (including: title, handle, variants, images). You can easily extend this for your own needs and potentially include metafields etc. From there the function checks if a meta field exists on your product that I have key valued to not conflict with any of your possible metafields. If no metafield exists it will update Sanity as well as create the metafield on the Product you are updating.

Future updates will Diffmatch the json object of the saved metafield and the current instance of the product during the webhook sync. This should ideally prevent excessive Sanity hits/updates and also prevent your site rebuilds from being triggered if you are using Netlify.

Redirects & Storybook Support

23 Sep 15:29
Compare
Choose a tag to compare

The Sanity CMS has been extended to include a redirects content type courtesy of @dictions The frontend redirects are built in the gatsby-node at the top of the file if you want to see how they work!

You can test a redirect here: https://midway.ctrlaltdel.world/spaghetti

Storybook Support

This is something I tried to make very limiting in terms of integration, I have potential need of Storybook in some of my projects so I added support for this directly in Midway, you can take this or leave it, should be easily removable if it doesn't suite your individual needs!

Clean up

Cleaning up some console logs and removing some unused files like the og shopify-sdk handling prior to converting to siteContext.

Sanity & Shopify Sync Refresh + Docs

21 Sep 22:28
Compare
Choose a tag to compare
Pre-release

Shopify Sync now checks against a few key attribute values to determine if we should trigger Sanity updates and as a result trigger a Netlify rebuild. This will also help with Netlify build cycles, if this check needs to be more exact or more explicit please modify it

  • Added a pattern for handling Docs, follows a similar pattern to the Preview component in the Gatsby system. Allows for you to code docs directly in Sanity, and preview them in the CMS.

Fix Account Routing

Transition routing was added back in with proper context for account related routes before the transition group is mounted inside the layout component

Previews + Subscriptions

09 Jul 12:50
Compare
Choose a tag to compare
  • Added a /previews/* route to the gatsby app
  • Added a preview tab to the sanity studio for pages + products
  • Added subscription content type to sanity (via recharge)
  • Added subscription reference to products inside of the sanity product content type
  • Fix async registration try/catch