These are chat archives for reactioncommerce/reaction

3rd
Apr 2015
Bogi
@boboci9
Apr 03 2015 10:55
@aaronjudd did you have time to consider adding the customers as an array in the shop collection? / or even the shops array in the Accounts but I think the first solution is better for statistics.
What do you think I should save in the the accountId or rather the userId in this array?
Aaron Judd
@aaronjudd
Apr 03 2015 15:04
@boboci9 I'm writing the magna carta of multi-vendor marketplace documents - almost done, I'll post shortly.
Bogi
@boboci9
Apr 03 2015 15:08
ok, looking forward to that
Aaron Judd
@aaronjudd
Apr 03 2015 15:09
I know we're living in no-schema world, but I wish there was a tool to create a old fashioned UML style doc for mongo
@aldeed we need a tool to visualize simple-schema definitions for a project as UML ;-) (why do I feel so bad about that?)
Eric Dobbertin
@aldeed
Apr 03 2015 15:21
I think of it as "no database schema". You still gotta have business logic schema, and it would be cool to have visualization of it. Some folks have talked about writing simple-schema -> jsonschema converters, and there are probably already jsonschema -> UML converters.
Aaron Judd
@aaronjudd
Apr 03 2015 15:24
yeah, i’ve been looking - haven’t found anything good out there - I hate making these things from scratch.
Aaron Judd
@aaronjudd
Apr 03 2015 20:03
@boboci9 is one of the questions you see having to answer with accounts data: “How many accounts does XXX shop have?"
vngo99
@vngo99
Apr 03 2015 20:16
I've been looking for a tool that automates the simple-schema/no schema data to something uml like diagram ie similar to that in sql.. Does not look like there is one?
Aaron Judd
@aaronjudd
Apr 03 2015 20:16
nothing exists, but sounds like a great little project ;-)
Bogi
@boboci9
Apr 03 2015 20:20
@aaronjudd that was a question in an earlier phase, since then I realized there should never be multiple accounts for a shop :) don't you agree? I mean one account per user
Aaron Judd
@aaronjudd
Apr 03 2015 20:22
correct- I was about to publish my thoughts here.. - and I’m just running through the “um, did I think of that list”… lol
Bogi
@boboci9
Apr 03 2015 20:23
since then I think it would be better to have the customers of a shop listed in the shop collection as an array just like member, but I'm waiting on your conclusion
Aaron Judd
@aaronjudd
Apr 03 2015 20:29
what’s the use case for having the customer array?
Bogi
@boboci9
Apr 03 2015 20:31
shop statistics without having to check all the orders added to the particular shop and the user's of those orders, but it could be considered redundant data too so I was not sure that's why I was asking :)
Aaron Judd
@aaronjudd
Apr 03 2015 20:48
ok see reactioncommerce/reaction#357 for all my thoughts on marketplace / multi-tenant
Bogi
@boboci9
Apr 03 2015 21:07
@aaronjudd this would mean that there will only be one account document for one user in all cases?
Aaron Judd
@aaronjudd
Apr 03 2015 21:07
yes, that’s what I’m thinking
really account = my personal information
it’s not what the shop uses/ edits (that’s in the orders)
so it doesn’t belong to a shop
in a single tenant situation - makes no diff.. but with a marketplace - should a user have to maintain different account information across shops? doesn’t make sense to me
Bogi
@boboci9
Apr 03 2015 21:09
ok that makes sense
Aaron Judd
@aaronjudd
Apr 03 2015 21:10
shopId could still be used in subdocuments (of accounts) if there were shop specific settings
Bogi
@boboci9
Apr 03 2015 21:10
this was my concern as well, not being to keep the information in order when user edited their accounts
Aaron Judd
@aaronjudd
Apr 03 2015 21:11
my diagram is wee bit off as well - it could be one user account as well -> but with merge, and I have some ideas on oauth down the road - I decided I was to lazy to change the diagram -it works this way as well
Bogi
@boboci9
Apr 03 2015 21:24
I will go over everything you wrote with a fresh brain because here is starting to get very late and I'm not sure I can see the whole picture with all the details right now but what I see now as open question/issue in my head is my last question in #154
Aaron Judd
@aaronjudd
Apr 03 2015 21:25
ok I’ll try to make sure that’s clearly addressed as well
Bogi
@boboci9
Apr 03 2015 21:28
ok thank you :) it will be a big help since I already implemented that but I don't want to get in conflict with any future reaction-core implementation
Aaron Judd
@aaronjudd
Apr 03 2015 21:29
I think it’s easier to get a pull request if you’ve got something working, and we can always see how things fit. there is always more than one way to do things..
Spencer Norman
@spencern
Apr 03 2015 21:33
@aaronjudd finally had a gap to start looking at refactoring the reaction-analytics package based on okgrow/analytics and they are using segment.io's analytics.js, but loading the whole file every time to enable every supported analytics provider. The analytics.js file they are loading clocks in at almost 250kb which seems pretty high to me for an analytics package. I've been looking into ways to break the file up and conditionally load different analytics snippets (ga, mixpanel, kissmetrics, segment, etc) but it seems like the best way to do that is to break each one up into a different meteor package.
The other lightweight option is to just force everything through segment's system, but that will require everyone who wants to use analytics to have a segment account.
They run a build script for their users that generates a custom analytics.js script based on the integrations you turn on on the segment dashboard
Any thoughts on this?
Aaron Judd
@aaronjudd
Apr 03 2015 21:36
ouch.. let me look around a little as well. wonder if someone has a custom build script
we could do it like the theme..
Spencer Norman
@spencern
Apr 03 2015 21:37
Well, the analytics.js project is open source
When you say we could do it like the theme, what does that look like?
Aaron Judd
@aaronjudd
Apr 03 2015 21:43
well, I was thinking about a build plugin.. but I’ve moved on from that idea.. you don’t have to include the tracking code for the actual providers do you? so they’re all in included… so I was thinking that we could use a build plugin and just include a smaller list than the whole shebang they support… if you wanted the whole shebang you’d use a segment.io account.
the issue is http://docs.meteor.com/#/full/Package-registerBuildPlugin, you can’t change which addons were included after build- it’d be a fixed list on build (like the theme is)
Spencer Norman
@spencern
Apr 03 2015 21:48
I'm trying to think through this use case: if admins want to enable/disable specific analytics packages from the dashboard, (e.g. enable GA and klaviyo, but not use segment, mixpanel, etc) how can we use that information to then load the correct analytics snippets.
Aaron Judd
@aaronjudd
Apr 03 2015 21:49
oh I’m suggesting it would be fixed.. GA, xx, xx. and that’s it, otherwise segment.io
Spencer Norman
@spencern
Apr 03 2015 21:49
Ok, that sounds way easier :)
:+1:
Aaron Judd
@aaronjudd
Apr 03 2015 21:49
give a build.json file, that could be configured.. like theme has.. and you could at least control which ones were included on a rebuild
but I dunno, if you want to go super simple - just pick three, and add segment. lol
we can refactor into a build plugin later if you don’t want to do that (but it’s actually fun)
Spencer Norman
@spencern
Apr 03 2015 21:52
haha, don't mind going the build-file route, but was hoping there was some magic that I could use to conditionally load files on the client based on some setting without reloading or rebuilding the server
Aaron Judd
@aaronjudd
Apr 03 2015 21:52
no I sure wish there was
Spencer Norman
@spencern
Apr 03 2015 21:52
thanks for the help
Aaron Judd
@aaronjudd
Apr 03 2015 21:53
you might be able inject something in the browser after and all that jazz. but I feel that’s ugly - I make it a point to keep it meteor based, or below..
Spencer Norman
@spencern
Apr 03 2015 21:54
yeah, I think there is technically a way to store stuff in the /public directory and load it after the fact, but it feels dirty
and then we'd have to give the client access to read certain admin settings to load the right files
Aaron Judd
@aaronjudd
Apr 03 2015 21:55
yeah, ok - I like the build plugin route. we can later inject our own (tracker) into the build as well. cool
Spencer Norman
@spencern
Apr 03 2015 22:55
Is the theme build plugin in reaction-core connected to the build-package shell script in core-theme at all?
Aaron Judd
@aaronjudd
Apr 03 2015 23:32
no, that’s just a trick to not have to add all the addFile’s manually