These are chat archives for reactioncommerce/reaction

5th
Aug 2016
Spencer Norman
@spencern
Aug 05 2016 00:28 UTC
So I’m still not really sure I understand the purpose of the options object here, but it doesn’t seem like it’s settable. https://github.com/reactioncommerce/reaction/blob/master/client/modules/router/main.js#L202-L207
Brent Hoover
@zenweasel
Aug 05 2016 00:28 UTC
it seems like there is an problematic intersection of routes and workflows
in routes you set a template and in layout you set a template
Spencer Norman
@spencern
Aug 05 2016 00:29 UTC
yeah, and then add ‘workflows’ on top of that
Brent Hoover
@zenweasel
Aug 05 2016 00:29 UTC
yeah, there’s a bit of a confusing intersection of workflows on top of that, which is already something I am trying to grapple with
I think options is how routes without a workflow get a template
  registry: [
    {
      route: "/about",
      name: "about",
      template: "aboutUs",
      workflow: "coreWorkflow"
    }
  ],
so that’s kind of important
Spencer Norman
@spencern
Aug 05 2016 00:31 UTC
yeah, one of the reasons I’m wondering if the easiest fix is to re-arrange the args
so that options fills in for routes that aren’t set, but get overridden if they are set
but I also still think I’m missing something
Brent Hoover
@zenweasel
Aug 05 2016 00:33 UTC
what if you just set layout/workflow/template in a route
Spencer Norman
@spencern
Aug 05 2016 00:33 UTC
I think that’s fine too
just not really how it currently works
Brent Hoover
@zenweasel
Aug 05 2016 00:34 UTC
This message was deleted
Spencer Norman
@spencern
Aug 05 2016 00:34 UTC
Are workflow and layout a bit redundant
could we merge those in anyway?
and I realize that this would be a pretty major breaking change :/
Brent Hoover
@zenweasel
Aug 05 2016 00:34 UTC
no, when you get to stuff like cartWorkflow it gets important
Spencer Norman
@spencern
Aug 05 2016 00:34 UTC
ah, yeah
Brent Hoover
@zenweasel
Aug 05 2016 00:36 UTC
I think that workflow and layout (and layout record) are concepts that a bit muddy to me
but I had sort of tabled the issue for now
this is where it would be good to get in a room and talk through this
Spencer Norman
@spencern
Aug 05 2016 00:40 UTC
haha, yeah we’ll fly you in for a few hours
Brent Hoover
@zenweasel
Aug 05 2016 00:41 UTC
well not just your problem but also trying to make this quick, easy, and understandable for new developers
Spencer Norman
@spencern
Aug 05 2016 00:41 UTC
yeah agreed
Brent Hoover
@zenweasel
Aug 05 2016 00:46 UTC
I think the shortest/least-breaking path now would be to specify layout in a route, and then you need to overrides the routes as well as layouts
Spencer Norman
@spencern
Aug 05 2016 00:46 UTC
Routes are overrideable?
Brent Hoover
@zenweasel
Aug 05 2016 00:49 UTC
well.. I don’t know
const uniqRoutes = new Set(newRoutes);
Do you have updated code I can play around with?
Spencer Norman
@spencern
Aug 05 2016 00:51 UTC
since we set (or are strongly encouraged to set) routes in the registry, I’d imagine that routes w/ same name would create additional routes in the registry potentially causing conflicts.
though I’ve never tried
yeah
just pushed latest WIP
Brent Hoover
@zenweasel
Aug 05 2016 00:52 UTC
I think that Set would eliminate dupes but how exactly it resolves dupes is another story
Brent Hoover
@zenweasel
Aug 05 2016 01:12 UTC
so I think I am coming around to swapping options as a temporary solution now that I understand better what is happening. options is the default info for the route and then you can override that with the layout.
Lukas Sägesser
@ScyDev
Aug 05 2016 14:34 UTC

@3Maestros Sorry for the late response. My marketplace extension is not for multiple stores but for multiple sellers in one store. Every registered user can become a seller. The fork is at: https://github.com/ScyDev/reaction

It was forked around mid 0.12 and we're currently in the process of refactoring everything so it can merge with Reaction HEAD in the (hopefully) near future.

3Maestros
@3Maestros
Aug 05 2016 15:28 UTC
@ScyDev thanks for getting back, your store looks quite impressive!
3Maestros
@3Maestros
Aug 05 2016 15:52 UTC
@ScyDev I believe I need to clone this https://github.com/ScyDev/reaction.git to get your customization correct?
Spencer Norman
@spencern
Aug 05 2016 20:16 UTC
Another question about workflows and layouts - my registry entries seem to be overwriting all routes that are associated with a particular workflow with a single template.
Specifically both the products template associated with /tag/:slug? and the productDetail template associated with /product/:handle/:variantId are both being assigned to my goProductDetail template
Brent Hoover
@zenweasel
Aug 05 2016 20:19 UTC
Adding stuff to the registry should not overwrite anything, just adds to it.
Spencer Norman
@spencern
Aug 05 2016 20:20 UTC
overwriting is probably the wrong term
‘overriding’ might be better
Brent Hoover
@zenweasel
Aug 05 2016 20:22 UTC
so layout records need to be unique for layout/workflow
is it pulling up the correct layout record?
Spencer Norman
@spencern
Aug 05 2016 20:22 UTC
it’s not, it’s pulling up the productDetail record
trying to override that route’s template
I think the coreProductWorfklow workflow + my getoutfittedLayout is triggering the existing goProductDetail template to display
but trying to figure out how to override because the workflow + layout are identical, but the route and template are different
Brent Hoover
@zenweasel
Aug 05 2016 20:26 UTC
Yeah I see that, I’m not sure how to handle that
Brent Hoover
@zenweasel
Aug 05 2016 20:32 UTC
you could override the route but then your change to options would mean the layout override would take precedence
Spencer Norman
@spencern
Aug 05 2016 21:04 UTC
yeah, current workaround is to redefine the route in my module, and comment it out in the included/product-variant module. Not a great option b/c changes to core, but I don’t really have any other good ideas right now
potentially the issue is that both the product list/grid route and the productDetail route use the same workflow
Brent Hoover
@zenweasel
Aug 05 2016 21:13 UTC
yeah, arguably if there is a “workflow” around product, those are probably it, but it’s not how we use workflow elsewhere
Spencer Norman
@spencern
Aug 05 2016 21:13 UTC
I can submit a PR if helpful, when I change the ‘workflow’ for the product list (/tag/:slug), I’m able to override it and it doesn’t appear to break anything.
I still don’t fully understand everything that workflows do though, so not sure if that would break other areas
Brent Hoover
@zenweasel
Aug 05 2016 21:14 UTC
I think the thing about workflows (currently) is that they do a lot less than you would expect
Spencer Norman
@spencern
Aug 05 2016 21:15 UTC
ok, I’ll submit a PR about this issue and maybe it will fix things, maybe it will start a discussion
Brent Hoover
@zenweasel
Aug 05 2016 21:15 UTC
:+1:
Spencer Norman
@spencern
Aug 05 2016 21:15 UTC
is there a reaction-cli command to pull latest into new directory?
Brent Hoover
@zenweasel
Aug 05 2016 21:16 UTC
init
Spencer Norman
@spencern
Aug 05 2016 21:16 UTC
dope
Brent Hoover
@zenweasel
Aug 05 2016 21:16 UTC
lol
Spencer Norman
@spencern
Aug 05 2016 21:16 UTC
;)
Spencer Norman
@spencern
Aug 05 2016 21:43 UTC
Hey @zenweasel I figured out a way to alert when Meteor is ready
side research while waiting for Meteor to be ready
Brent Hoover
@zenweasel
Aug 05 2016 21:44 UTC
Yeah, audio alert?
Spencer Norman
@spencern
Aug 05 2016 21:44 UTC
if you don’t have your iterm bell silenced
scratch that, even if you do
if you use iterm
Brent Hoover
@zenweasel
Aug 05 2016 21:48 UTC
I do
Spencer Norman
@spencern
Aug 05 2016 21:50 UTC
writing up a quick blog post b/c it seems useful, but basically set triggers in iterm for the => Meter server restart.
Brent Hoover
@zenweasel
Aug 05 2016 21:51 UTC
yeah, that makes sense
Spencer Norman
@spencern
Aug 05 2016 22:45 UTC
Do you guys want issues for every PR or can I submit a PR that describes the issue and fixes it all in one?
Jeremy Shimko
@jshimko
Aug 05 2016 23:09 UTC
RE: meteor alerts... Nice!