profile
viewpoint

robin-drexler/cosch 3

cosch - a COnference SCHedule tool

robin-drexler/bashroulette 2

Feeling bold today? curl http://bashroulette.robin-drexler.com/pullthetrigger | bash

robin-drexler/assert-pm 1

Assert that a package manager was used when running a yarn/npm script.

robin-drexler/Autofocus 1

Chrome extension to auto focus search input fields on popular sites.

robin-drexler/babel-plugin-debug-source 1

Adds file path and loc information to debug calls. Heavily inspired by babel-plugin-console-source

PR opened Shopify/argo-checkout-template

Reviewers
Upgrade dependencies

Upgraded our and most other dependencies. Even those with major bumps. None seemed to have affected us.

🎩 by locally generating and running the extensions with updated package versions.

Refrained from upgrading React to 17 and TS to 4 yet. I feel like we may want to coordinate that across repos(?)

+506 -303

0 comment

2 changed files

pr created time in 2 days

create barnchShopify/argo-checkout-template

branch : upgrade-dependencies

created branch time in 2 days

Pull request review commentShopify/remote-ui

Make it easier to provide children

 export function createRemoteRoot<       }        if (initialChildren) {-        for (const child of initialChildren) {-          normalizedInitialChildren.push(normalizeChild(child, remoteRoot));+        if (Array.isArray(initialChildren)) {+          for (const child of initialChildren) {+            normalizedInitialChildren.push(normalizeChild(child, remoteRoot));+          }+        } else {+          normalizedInitialChildren.push(+            normalizeChild(initialChildren, remoteRoot),+          );++          // The complex tuple type of `rest` makes it so `moreChildren` is+          // incorrectly inferred as potentially being the props of the component,+          // lazy casting since we know it will be an array of child elements+          // (or empty).+          for (const child of moreChildren as any[]) {+            normalizedInitialChildren.push(normalizeChild(child, remoteRoot));

True, I got that confused. When you omit moreChildren completely it's an empty array. 👍

lemonmade

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentShopify/remote-ui

Make it easier to provide children

 export function createRemoteRoot<       }        if (initialChildren) {-        for (const child of initialChildren) {-          normalizedInitialChildren.push(normalizeChild(child, remoteRoot));+        if (Array.isArray(initialChildren)) {+          for (const child of initialChildren) {+            normalizedInitialChildren.push(normalizeChild(child, remoteRoot));+          }+        } else {+          normalizedInitialChildren.push(+            normalizeChild(initialChildren, remoteRoot),+          );++          // The complex tuple type of `rest` makes it so `moreChildren` is+          // incorrectly inferred as potentially being the props of the component,+          // lazy casting since we know it will be an array of child elements+          // (or empty).+          for (const child of moreChildren as any[]) {+            normalizedInitialChildren.push(normalizeChild(child, remoteRoot));

I think it's possible that undefined gets pushed onto normalizedInitialChildren when initialChild, but no moreChildren are passed.

Is this being sanitized later or could it lead to issues?

lemonmade

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentShopify/argo-checkout

Remove need to explicitly mount UI

 extend('Checkout::PostPurchase::ShouldRender', (api) => { }); ``` +For extensions that render UI, like [`Checkout::PostPurchase::ShouldRender`](./extension-points.md), the first argument is always a [`@remote-ui` `RemoteRoot` object](https://github.com/Shopify/remote-ui/tree/main/packages/core#remoteroot) that allows you to render UI components into your extension point in checkout. You do not need to explicitly [`mount()`](https://github.com/Shopify/remote-ui/tree/main/packages/core#remoterootmount) this object; once the callback you registered for this extension point ends (or, if it returns a `Promise`, once that promise resolves), your initial UI will be rendered.
For extensions that render UI, like [`Checkout::PostPurchase::ShouldRender`](./extension-points.md), the first argument is always a [`@remote-ui` `RemoteRoot` object](https://github.com/Shopify/remote-ui/tree/main/packages/core#remoteroot) that allows you to render UI components into your extension point in checkout. You do not need to explicitly call [`mount()`](https://github.com/Shopify/remote-ui/tree/main/packages/core#remoterootmount) on this object; once the callback you registered for this extension point ends (or, if it returns a `Promise`, once that promise resolves), your initial UI will be rendered.
lemonmade

comment created time in 4 days

PullRequestReviewEvent

pull request commentShopify/argo-checkout

Remove need to explicitly mount UI

What's the effect of still calling root.mount() when it's already done in the checkout sandbox? Will it be a noop or blow up things?

lemonmade

comment created time in 4 days

push eventShopify/checkout-ui

Robin Drexler

commit sha 2e3ade139f698bba39e0ec90ca09a10948b09b57

v0.2.0

view details

push time in 5 days

created tagShopify/checkout-ui

tagv0.2.0

created time in 5 days

push eventShopify/checkout-ui

Robin Drexler

commit sha 9f94c932058832bcd979a462d10a92d5f612c7a3

upgrade packages

view details

Robin Drexler

commit sha edd76a367612c7c0b238cac9a2ae1ba917eeda17

Merge pull request #9 from Shopify/upgrade-packages upgrade checkout-ui components

view details

push time in 5 days

delete branch Shopify/checkout-ui

delete branch : upgrade-packages

delete time in 5 days

PR merged Shopify/checkout-ui

upgrade checkout-ui components

Update with latest versions of checkout components for bug fixes and improvements.

🎩ed by building this package and copying it to https://github.com/robin-drexler/checkout-ui-usage-example node_modules/ and rendering a few components.

+3633 -1557

0 comment

204 changed files

robin-drexler

pr closed time in 5 days

Pull request review commentShopify/checkout-ui

upgrade checkout-ui components

   "dependencies": {     "@babel/preset-env": "^7.0.0",     "@quilted/react-auto-headings": "^0.1.0",-    "@shopify/argo-checkout": "^0.4.0",-    "@shopify/css-utilities": "^1.0.6",+    "@shopify/argo-checkout": "^0.7.0",+    "@shopify/css-utilities": "1.0.5",

Yeah, that's what's being used by checkout-web now.

robin-drexler

comment created time in 8 days

PullRequestReviewEvent

push eventrobin-drexler/checkout-ui-usage-example

Robin Drexler

commit sha 73b890c8594bb9fe8277fd10b9fb6046a5f1aa13

update versions

view details

push time in 8 days

push eventShopify/checkout-ui

Robin Drexler

commit sha 9f94c932058832bcd979a462d10a92d5f612c7a3

upgrade packages

view details

push time in 8 days

push eventShopify/checkout-ui

Robin Drexler

commit sha c6e454ebc3f9548bce8c1e4f309260ab3a4107de

upgrade packages

view details

push time in 8 days

push eventrobin-drexler/rails

Robin Drexler

commit sha 815e724bea3fb21a658162c63cdef1d4535b317a

set approriate crossorigin for js and css preload links

view details

push time in 10 days

PR opened rails/rails

[WIP] set appropriate crossorigin for js and css preload links

Summary

<!-- Provide a general description of the code changes in your pull request... were there any bugs you had fixed? If so, mention them. If these bugs have open GitHub issues, be sure to tag them here as well, to keep the conversation linked together. -->

Other Information

<!-- If there's anything else that's important and relevant to your pull request, mention that information here. This could include benchmarks, or other information.

If you are updating any of the CHANGELOG files or are asked to update the CHANGELOG files by reviewers, please add the CHANGELOG entry at the top of the file.

Finally, if your pull request affects documentation or any non-code changes, guidelines for those changes are available here

Thanks for contributing to Rails! -->

+16 -1

0 comment

2 changed files

pr created time in 10 days

create barnchrobin-drexler/rails

branch : fix-crossorigin-preload

created branch time in 10 days

pull request commentShopify/argo-checkout

[WIP] add stepper component

Just learned that the component isn't quite ready yet. Let's keep that PR open and only update props (if needed) once the Stepper is available

robin-drexler

comment created time in 10 days

PullRequestReviewEvent

push eventShopify/argo-checkout

Robin Drexler

commit sha b37bb0331ff38300b1abaabd176cd56b76912b3f

add stepper

view details

push time in 10 days

PR opened Shopify/argo-checkout

add stepper
+114 -0

0 comment

7 changed files

pr created time in 10 days

create barnchShopify/argo-checkout

branch : stepper

created branch time in 10 days

pull request commentModernizr/Modernizr

Add detect/tests for prefetch

Hey, just stumbled upon this. This check may exclude IE11 which appears to support prefetch, but not relList :(

This isn’t an issue for preload because IE supports neither.

HeroProtagonist

comment created time in 16 days

push eventShopify/checkout-ui

Robin Drexler

commit sha 9524d2e9e699bea14c5f7e3d9d840cf79c4f0caa

upgrade packages

view details

push time in 17 days

push eventShopify/checkout-ui

Robin Drexler

commit sha 92bfa7d25400ff4d8e86c0adea303927f42d420d

upgrade packages

view details

push time in 17 days

PR opened Shopify/checkout-ui

upgrade packages
+3085 -1344

0 comment

118 changed files

pr created time in 17 days

create barnchShopify/checkout-ui

branch : upgrade-packages

created branch time in 17 days

Pull request review commentShopify/argo-checkout

Fix relative links on NPM for @shopify/argo-checkout

   "name": "@shopify/argo-checkout",   "description": "The API for Argo extensions that run in Shopify’s Checkout",   "version": "0.7.0",+  "repository": {

Interesting. Should we be doing this for all packages in this repo?

ravangen

comment created time in 22 days

PullRequestReviewEvent

push eventShopify/argo-checkout

Robin Drexler

commit sha 51e90ec6e52c66ba4fc8a31c42dc8c2f7ad25ae0

Publish - @shopify/argo-run@0.2.3

view details

push time in 22 days

created tagShopify/argo-checkout

tag@shopify/argo-run@0.2.3

created time in 22 days

delete branch Shopify/argo-checkout

delete branch : fix-terser

delete time in 22 days

push eventShopify/argo-checkout

Robin Drexler

commit sha 01274c25eefffed713db10149da08fc1fcd6b305

ensure terser does not produce IE 11 incompatible bundles

view details

Robin Drexler

commit sha 49e99a9fd59a7b2ece700bdd52194b536cdb161b

Merge pull request #51 from Shopify/fix-terser ensure terser does not produce IE 11 incompatible bundles

view details

push time in 22 days

PR merged Shopify/argo-checkout

Reviewers
ensure terser does not produce IE 11 incompatible bundles

It optimized objects to use shorthand property syntax.

{setTimeout: setTimeout} to {setTimeout}

Which isn't supported in IE(11).

Changed ecma version to 5 to avoid even more potential surprises. 😬

+1 -1

0 comment

1 changed file

robin-drexler

pr closed time in 22 days

push eventShopify/remote-ui

Robin Drexler

commit sha dca8fc3a4e29b8a95b23845a0f4fdd3bc2a6e1b6

Publish - @remote-ui/async-subscription@1.0.5 - @remote-ui/core@1.4.3 - @remote-ui/dom@1.1.4 - @remote-ui/htm@1.1.4 - @remote-ui/mini-react@1.0.3 - @remote-ui/react@2.0.3 - @remote-ui/rpc@1.0.5 - @remote-ui/testing@1.1.4 - @remote-ui/traversal@1.1.4 - @remote-ui/web-workers@1.2.1

view details

push time in 23 days

delete branch Shopify/remote-ui

delete branch : pass-endpoint-options

delete time in 23 days

push eventShopify/remote-ui

Robin Drexler

commit sha b46aae91c4eb071c396d9c3044486e114305be78

pass endpoint options kn createWorker

view details

Robin Drexler

commit sha 45cc208ebb0fe4489717cc85a61465d5e79e07dc

Merge pull request #28 from Shopify/pass-endpoint-options pass endpoint options kn createWorker

view details

push time in 23 days

PR merged Shopify/remote-ui

pass endpoint options kn createWorker

Mainly to allow to pass callable to make workers work in IE and other envs that don't support proxies.

+17 -8

0 comment

3 changed files

robin-drexler

pr closed time in 23 days

push eventShopify/remote-ui

Robin Drexler

commit sha b46aae91c4eb071c396d9c3044486e114305be78

pass endpoint options kn createWorker

view details

push time in 23 days

PullRequestReviewEvent

Pull request review commentShopify/remote-ui

pass endpoint options kn createWorker

-import {createEndpoint, Endpoint, MessageEndpoint} from '@remote-ui/rpc';+import {+  createEndpoint,+  Endpoint,+  MessageEndpoint,+  CreateEndpointOptions,+} from '@remote-ui/rpc'; import {createWorkerMessenger} from '../messenger'; import {createScriptUrl, FileOrModuleResolver} from './utilities'; -export interface CreateWorkerOptions {+export interface CreateWorkerOptions<T> {   createMessenger?(url: URL): MessageEndpoint;+  endpointOptions?: CreateEndpointOptions<T>;

Not sure if those should be spread into CreateWorkerOptions instead ?

robin-drexler

comment created time in 23 days

Pull request review commentShopify/remote-ui

pass endpoint options kn createWorker

 interface MessageMap {   [FUNCTION_RESULT]: [string, Error?, any?]; } -interface Options<T = unknown> {+export interface CreateEndpointOptions<T = unknown> {

Stayed close to the already existing CreateWorkerOptions

robin-drexler

comment created time in 23 days

PullRequestReviewEvent

PR opened Shopify/remote-ui

pass endpoint options kn createWorker

Mainly to allow to pass callable to make workers work in IE and other envs that don't support proxies.

+18 -8

0 comment

3 changed files

pr created time in 23 days

create barnchShopify/remote-ui

branch : pass-endpoint-options

created branch time in 23 days

PR opened Shopify/argo-checkout

Reviewers
ensure terser does not produce IE 11 incompatible bundles

It optimized objects to use shorthand property syntax.

{setTimeout: setTimeout} to {setTimeout}

Which isn't supported in IE(11).

Changed ecma version to 5 to avoid even more potential surprises. 😬

+1 -1

0 comment

1 changed file

pr created time in 23 days

create barnchShopify/argo-checkout

branch : fix-terser

created branch time in 23 days

pull request commentShopify/argo-checkout-template

upgrade shopify deps

superseded by https://github.com/Shopify/argo-checkout-template/pull/34

robin-drexler

comment created time in a month

PullRequestReviewEvent

push eventShopify/remote-ui

Robin Drexler

commit sha acf42966b63c6c807dd8ea50ba3a9e75baf00125

Publish - @remote-ui/core@1.4.2 - @remote-ui/dom@1.1.3 - @remote-ui/htm@1.1.3 - @remote-ui/mini-react@1.0.2 - @remote-ui/react@2.0.2 - @remote-ui/testing@1.1.3 - @remote-ui/traversal@1.1.3 - @remote-ui/web-workers@1.2.0

view details

push time in a month

delete branch Shopify/remote-ui

delete branch : iframe-messenger

delete time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha a6cb25b3c8a1fe986634ff7081125d23c2db7987

introduce remote origin iframe messnger

view details

Chris Sauve

commit sha 4034b7ee0de956ce99119a9d1db29e10d27abcc5

Add TS cache version

view details

Robin Drexler

commit sha a1fbb8b510ef8d98765b41cb5c18ec034fef7c9d

Merge pull request #25 from Shopify/iframe-messenger introduce remote origin iframe messenger

view details

push time in a month

PR merged Shopify/remote-ui

introduce remote origin iframe messenger

ensure null origin still works as before and remote messenger can be imported without adding the null origin's iframe content to the bundle.

+190 -153

1 comment

9 changed files

robin-drexler

pr closed time in a month

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

+import {createIframeWorkerMessenger} from './create-messenger';+import {IFRAME_RUN_IDENTIFIER} from './constants';++export function createNullOriginIframeMessenger(url: URL) {+  return createIframeWorkerMessenger(url, (iframe) => {+    const IFRAME_SOURCE = `+    <html>+      <body>+        <script>+          window.addEventListener('message', function (event) {+            var data = event.data;+            if (data == null || typeof data.${IFRAME_RUN_IDENTIFIER} !== 'string') return;++            var workerScript = URL.createObjectURL(+              new Blob(['importScripts(' + JSON.stringify(data.${IFRAME_RUN_IDENTIFIER}) + ');']),+            );++            var worker = new Worker(workerScript);+            worker.postMessage({__replace: event.ports[0]}, [event.ports[0]]);+          });+        </script>+      </body>+    </html>+  `;++    iframe.setAttribute('sandbox', 'allow-scripts');

sandbox allow-scripts forced remote iframe to be considered a null iframe as well, which defeated its purpose, so I moved it to be only applied here.

robin-drexler

comment created time in a month

PullRequestReviewEvent

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

+import {createIframeWorkerMessenger} from './create-messenger';++export function createRemoteOriginIframeMessengerFactory(iframeSrc: string) {

@lemonmade after I used 🎩 in an actual project, I noticed that the signature was off.

the createWorkerMessenger strategy function is actually being called with the URL later by remote-ui itself, but we need to setup the iframeSrc earlier. So I had to change it to be a factory function.

robin-drexler

comment created time in a month

PullRequestReviewEvent

push eventShopify/remote-ui

Robin Drexler

commit sha a6cb25b3c8a1fe986634ff7081125d23c2db7987

introduce remote origin iframe messnger

view details

Chris Sauve

commit sha 4034b7ee0de956ce99119a9d1db29e10d27abcc5

Add TS cache version

view details

push time in a month

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

 export {createWorkerMessenger} from './worker';-export {createIframeWorkerMessenger} from './iframe';+export {+  createNullOriginIframeMessenger as createIframeWorkerMessenger,+  createNullOriginIframeMessenger,+  createRemoteOriginIframeMessenger,+  IFRAME_RUN_IDENTIFIER,

Decided to export the const as folks could use that to generate iFrame host files whenever they update remote-ui.

robin-drexler

comment created time in a month

PullRequestReviewEvent

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

 export {createWorkerMessenger} from './worker';-export {createIframeWorkerMessenger} from './iframe';+export {+  createNullOriginIframeMessenger as createIframeWorkerMessenger,+  createNullOriginIframeMessenger,+  createRemoteOriginIframeMessenger,+} from './i-frame';

@lemonmade not sure if that's a privilege I may be missing for the repo?

robin-drexler

comment created time in a month

PullRequestReviewEvent

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

 export {createWorkerMessenger} from './worker';-export {createIframeWorkerMessenger} from './iframe';+export {+  createNullOriginIframeMessenger as createIframeWorkerMessenger,+  createNullOriginIframeMessenger,+  createRemoteOriginIframeMessenger,+} from './i-frame';

pushed some updates according to your comments.

I can't seem to change the ci.yml file, though.

 ! [remote rejected] iframe-messenger -> iframe-messenger (refusing to allow an OAuth App to create or update workflow `.github/workflows/ci.yml` without `workflow` scope)

Got to figure out how to fix that first.

robin-drexler

comment created time in a month

PullRequestReviewEvent

push eventShopify/remote-ui

Robin Drexler

commit sha fb0ee55e58143c165b263d15a0171882051e068f

introduce remote origin iframe messnger

view details

push time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha e77bb61d1f94a2506739fc95f449bdcb41c76dcb

introduce remote origin iframe messnger

view details

push time in a month

Pull request review commentShopify/remote-ui

introduce remote origin iframe messenger

 export {createWorkerMessenger} from './worker';-export {createIframeWorkerMessenger} from './iframe';+export {+  createNullOriginIframeMessenger as createIframeWorkerMessenger,+  createNullOriginIframeMessenger,+  createRemoteOriginIframeMessenger,+} from './i-frame';

I agree. It's self defense for now 😬

robin-drexler

comment created time in a month

PullRequestReviewEvent

pull request commentShopify/remote-ui

introduce remote origin iframe messenger

Ok, I had to rename iframe to i-frame for now. It seems like github is caching some older build output which still had the iframe as a file and not a folder(?)

Or I'm missing something here.

robin-drexler

comment created time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha 784f8ff3d7c52f30a6a5049ee1177bcc87a3a115

introduce remote origin iframe messnger

view details

push time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha 25ee397b8b5dfc8696fb1fa236994d00b4a2b794

introduce remote origin iframe messnger

view details

push time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha d77adeaea3a57d1853db58bf57a435f5297196f7

introduce remote origin iframe messnger

view details

push time in a month

push eventShopify/remote-ui

Robin Drexler

commit sha 587fe2b485bd6b9f2cd96edace35e5f4ced35df8

introduce remote origin iframe messnger

view details

push time in a month

PR opened Shopify/remote-ui

introduce remote origin iframe messenger

ensure null origin still works as before and remote messenger can be imported without adding the null origin's iframe content to the bundle

+52 -23

0 comment

5 changed files

pr created time in a month

create barnchShopify/remote-ui

branch : iframe-messenger

created branch time in a month

created tagShopify/argo-checkout

tag@shopify/argo-run@0.2.2

created time in a month

push eventShopify/argo-checkout

Robin Drexler

commit sha 7d8f37dd0e3435c6fb47098143f0ca48a837801e

Publish - @shopify/argo-checkout-react@0.7.0 - @shopify/argo-checkout@0.7.0 - @shopify/argo-run@0.2.2

view details

push time in a month

created tagShopify/argo-checkout

tag@shopify/argo-checkout@0.7.0

created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentShopify/argo-checkout

[Post Purchase] Add InputData type

 interface Storage {   update(data: any): Promise<void>; } +interface InputData {+  /** Identifier for the extension point */+  extensionPoint: string;+  /** Initial purchase */+  initialPurchase: Purchase;+  /** Checkout customer locale */+  locale: string;+  /** Shop where the checkout/order is from */+  shop: Shop;+  /** JWT representing the input_data payload */+  token: string;

No, the comments are fine, I just found it a bit surprising to have the token be part of the object that the token itself represents without itself being included.

I personally would have expected the token to be a sibling of inputData, but that's not a blocker of course. Just wanted to be sure I understood correctly.

ginmrt

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentShopify/argo-checkout

[Post Purchase] Add InputData type

 interface Storage {   update(data: any): Promise<void>; } +interface InputData {+  /** Identifier for the extension point */+  extensionPoint: string;+  /** Initial purchase */+  initialPurchase: Purchase;+  /** Checkout customer locale */+  locale: string;+  /** Shop where the checkout/order is from */+  shop: Shop;+  /** JWT representing the input_data payload */+  token: string;

For my understanding: token holds the entire signed inputData sans the token itself? 🤔

ginmrt

comment created time in a month

Pull request review commentShopify/shopify-app-cli

read and push post purchase config

+# frozen_string_literal: true+require 'test_helper'+require 'project_types/extension/extension_test_helpers'++module Extension+  module Features+    class ArgoConfigTest < MiniTest::Test+      def setup+        super+        File.stubs(:size?).returns(true)+        ShopifyCli::ProjectType.load_type(:extension)+      end++      def test_parses_and_symbolizes_yaml_hash+        value = {}+        another_value = 10+        yml = { "value": value, "another_value": another_value }+        YAML.stubs(:load_file).returns(yml)++        parsed_config = ArgoConfig.parse_yaml(@context, [:value, :another_value])++        assert_equal(value, parsed_config[:value])+        assert_equal(another_value, parsed_config[:another_value])+      end++      def test_aborts_when_yaml_is_invalid+        Psych::SyntaxError.any_instance.stubs(:initialize)

thanks for letting me know! I have created an issue on our board, but am not sure yet when we'll be able to get to it.

robin-drexler

comment created time in a month

PullRequestReviewEvent
more