These are chat archives for reactioncommerce/reaction

30th
Mar 2018
Loan Laux
@loanlaux
Mar 30 2018 05:34
@mschipperheyn You're absolutely right. It's a poor and expensive fix. But until someone does some optimization work on the build process, it works. The thing is Meteor's Isobuild isn't as optimized as Webpack. There's a solution: filing an issue on the Meteor repo, hacking on Isobuild to make it faster and opening a PR.
But putting the "hacking in Isobuild" part aside, I would really love to see Reaction embrace Webpack + HMR. Provided that Reaction will move away from Meteor at some point, it'd make a lot of sense not to depend on its build system at some point in time.
Brent Hoover
@zenweasel
Mar 30 2018 05:41
Believe me, no one understands how bad the current development situation is more than the Reaction team. We do this all day, every day and it makes development really challenging.
The plan is to move off Meteor essentially as fast as possible. In the mean time we will be moving everything “optional” into NPM packages to decrease the number of files which is big contributor to how long it takes to rebuild.
Moving off Meteor is no small task though, it involves replacing every Meteor package we depend on with a corresponding NPM package. Which is why we moved to SimplSchema and removed CollectionFS along with others.
Loan Laux
@loanlaux
Mar 30 2018 05:47
If you had to give a rough ETA on this. what would it be? This is like a 1-year task ?
I'm wondering as the back end seems fully reliant on Meteor at the moment (well, except for schemas now). So that's indeed a lot of work! And I'm not even talking about replacing publications, trackers and MiniMongo usages virtually everywhere on the front-end... However, I'm not a core dev so in the end I have no idea
Brent Hoover
@zenweasel
Mar 30 2018 05:51
The idea is to move to GraphQL so that the client would/could be a separate app. So that could be a generic React app that uses Webpack or whatever
Loan Laux
@loanlaux
Mar 30 2018 05:52
So would that mean keeping Meteor for the back end only? If so, that's pretty awesome!
Brent Hoover
@zenweasel
Mar 30 2018 05:56
So to clarify, I mean the consumer-facing front-end.
Which is what most people want to customize
Loan Laux
@loanlaux
Mar 30 2018 06:00
Makes sense
That's great news :+1:
Brent Hoover
@zenweasel
Mar 30 2018 06:01
so it will be in stages, so it might be a year till we are 100% completely Meteor-free but it won’t be a year till we start seeing some improvements.
LeeIakokka
@LeeIakokka
Mar 30 2018 10:30
hey everyone!
could anyone please help with advice on what may be causing the frontend respose error : This site requires JavaScript. Please enable it in your browser settings.? Reaction is running in a kubernetes cluster and is routed using ingress and GCloud http(s) loadbalancer. The reaction is working 100% well, but somehow doesn't seem to be rendering when requested via loadbalancer. Does it have to be a different protocol or smth? gce docs are saying that ws/wss are natively supported by their loadbalancer.
Appreciate any help, thanks!
njbotkin
@njbotkin
Mar 30 2018 10:32
That message is in a <noscript> tag, which is rendered by any browser/client that doesn't support Javascript.
It sounds like your load balancer is trying to do some rendering of its own?
LeeIakokka
@LeeIakokka
Mar 30 2018 10:41
will check if it is, but in theory I have no idea why it would do that
njbotkin
@njbotkin
Mar 30 2018 10:43
Yeah, that would be strange. Seems to me like either JS is disabled in your browser, or there's a proxy somewhere in between you and Reaction that's doing rendering.
LeeIakokka
@LeeIakokka
Mar 30 2018 10:47
thanks! @njbotkin
may the issue be that it has to be behind the TCP and not HTTP(S) Load Balancer?
njbotkin
@njbotkin
Mar 30 2018 10:49
I don't know how your network is configured, but Reaction shouldn't be concerned with TCP or anything else at that abstraction layer
Loan Laux
@loanlaux
Mar 30 2018 11:13
@njbotkin Nice job on your SSR preview plugin!
njbotkin
@njbotkin
Mar 30 2018 11:15
@loanlaux thanks! It could use some polish; I mostly wanted to see if it was possible.
It works about as well as I expected, which was surprising
njbotkin
@njbotkin
Mar 30 2018 11:32

@loanlaux I wrote a summary of what I understand the Reaction/Meteor/Webpack situation to be, mostly to solidify my understanding:

This is cool, (https://github.com/ardatan/meteor-webpack) but ultimately not that helpful if you're using a lot of meteor-ecosystem code that webpack doesn't support (in particular: meteor packages, Blaze). Using webpack means switching all of those components to something else. So Reaction is switching to npm and React. Lots of work, but seems like the right long-term solution.

If you're impatient, you can run a webpack dev server and a meteor dev server at the same time, and have the webpack server pull meteor-specific code from the meteor server. This is sort of crazy, but some people opt for this.

https://github.com/zmikaya/meteor-webpack-blaze
https://github.com/jedwards1211/meteor-imports-webpack-plugin
njbotkin
@njbotkin
Mar 30 2018 11:46
Oh, actually, looks like https://github.com/ardatan/meteor-webpack is compatible with meteor packages. So the big stopper with it is Blaze.
Loan Laux
@loanlaux
Mar 30 2018 11:48
@njbotkin Yup, I came accross Ardatan's package a few days ago. Definitely great work and a solution to consider. I'll have to look into it!
njbotkin
@njbotkin
Mar 30 2018 11:49
Yeah, I found it because you linked to it :)
Loan Laux
@loanlaux
Mar 30 2018 11:50
If we can eliminate Blaze completely from Reaction, then it looks like we're good to go. And it'll have to be done anyway since they want the client side to be independent of Meteor. Let's see what we can do here!
njbotkin
@njbotkin
Mar 30 2018 11:59
indeed, my fine french friend
Loan Laux
@loanlaux
Mar 30 2018 12:00
As for you... Should I assume "NJ" in "njbotkin" stands for New Jersey?
njbotkin
@njbotkin
Mar 30 2018 12:01
ha, no, those are my initials. Tennessee.
Loan Laux
@loanlaux
Mar 30 2018 12:01
At least I got the country right, haha!
njbotkin
@njbotkin
Mar 30 2018 12:01
True, nice work
Marc Schipperheyn
@mschipperheyn
Mar 30 2018 12:20
I actually also want to do some significant modifications/additions on the admin menus. So, I guess I'm screwed or have to go the cloud server way. Well, thanks for your clarifications and transparency. It's appreciated. Hope to see some quick fixes soon.
LeeIakokka
@LeeIakokka
Mar 30 2018 12:34
@njbotkin Thanks again for the advice. Just figured out the way to make it work.
In case someone will face some problem running k8s at google cloud and using ingress controller - just setup nginx-ingress load balancer and not gce one.
I will write to google's support to figure out what exactly the issue is, but reaction behind their def load balancer just won't work (at least with current k8s & dependency releases)
William Moss
@willmoss1000
Mar 30 2018 14:50
has anyone added a discourse forum using SSO to their website?
William Moss
@willmoss1000
Mar 30 2018 17:20
I'll assume not. I'll write it up when I figure it out. Just going to do without SSO for now.
I've got a problem with my customer product grid. I've added Loggers and I can see that productFilters for Products/grid { shops: [ 'reaction' ] } is passed to the following section.
```
 Logger.info(shopIdsOrSlugs, "shopIdsOrSlugs");

  if (shopIdsOrSlugs) {
    // Get all shopIds associated with the slug or Id
    const shopIds = Shops.find({
      "workflow.status": "active",
      "$or": [{
        _id: { $in: shopIdsOrSlugs }
      }, {
        slug: { $in: shopIdsOrSlugs }
      }]
    }).map((shop) => shop._id);

    Logger.info(shopIds, "shopIds");
The top Logger gives [ 'test' ] 'shopIdsOrSlugs'
( changed the shop slug to test)
the bottom logger gives [] 'shopIds'
William Moss
@willmoss1000
Mar 30 2018 17:25
why could it be that slug: { $in: shopIdsOrSlugs } would not find the relevant slug?
** where it's reaction above this is actually test
ooops fixed. please ignore - the shop was not active...........
Marc Schipperheyn
@mschipperheyn
Mar 30 2018 19:32
I'm wondering with @loanlaux s idea of using a cloud server with real time integration using SSHFS, is there some kind of docker config available that gets you set up quickly? I'm assuming this will require some customization
Nuruddin Badawi
@NuruddinBadawi
Mar 30 2018 20:13
hello everyone, I want some help just some idea or maybe it's available in Reaction by default but I didn't reach it.
the idea is: I want to add follow for the marketplace, and how to use in homepage his followed marketplace.
the question is: can I follow the store, if not where is the best place to register following records in the collections?