These are chat archives for reactioncommerce/reaction

5th
Aug 2016
Spencer Norman
@spencern
Aug 05 2016 00:28
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
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
yeah, and then add ‘workflows’ on top of that
Brent Hoover
@zenweasel
Aug 05 2016 00:29
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
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
what if you just set layout/workflow/template in a route
Spencer Norman
@spencern
Aug 05 2016 00:33
I think that’s fine too
just not really how it currently works
Brent Hoover
@zenweasel
Aug 05 2016 00:34
This message was deleted
Spencer Norman
@spencern
Aug 05 2016 00:34
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
no, when you get to stuff like cartWorkflow it gets important
Spencer Norman
@spencern
Aug 05 2016 00:34
ah, yeah
Brent Hoover
@zenweasel
Aug 05 2016 00:36
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
haha, yeah we’ll fly you in for a few hours
Brent Hoover
@zenweasel
Aug 05 2016 00:41
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
yeah agreed
Brent Hoover
@zenweasel
Aug 05 2016 00:46
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
Routes are overrideable?
Brent Hoover
@zenweasel
Aug 05 2016 00:49
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
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
I think that Set would eliminate dupes but how exactly it resolves dupes is another story
Brent Hoover
@zenweasel
Aug 05 2016 01:12
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

@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
@ScyDev thanks for getting back, your store looks quite impressive!
3Maestros
@3Maestros
Aug 05 2016 15:52
@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
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
Adding stuff to the registry should not overwrite anything, just adds to it.
Spencer Norman
@spencern
Aug 05 2016 20:20
overwriting is probably the wrong term
‘overriding’ might be better
Brent Hoover
@zenweasel
Aug 05 2016 20:22
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
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
Yeah I see that, I’m not sure how to handle that
Brent Hoover
@zenweasel
Aug 05 2016 20:32
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
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
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
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
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
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
:+1:
Spencer Norman
@spencern
Aug 05 2016 21:15
is there a reaction-cli command to pull latest into new directory?
Brent Hoover
@zenweasel
Aug 05 2016 21:16
init
Spencer Norman
@spencern
Aug 05 2016 21:16
dope
Brent Hoover
@zenweasel
Aug 05 2016 21:16
lol
Spencer Norman
@spencern
Aug 05 2016 21:16
;)
Spencer Norman
@spencern
Aug 05 2016 21:43
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
Yeah, audio alert?
Spencer Norman
@spencern
Aug 05 2016 21:44
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
I do
Spencer Norman
@spencern
Aug 05 2016 21:50
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
yeah, that makes sense
Spencer Norman
@spencern
Aug 05 2016 22:45
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
RE: meteor alerts... Nice!