Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 19:51
    corrosivebee opened #2243
  • 03:01
    dependabot[bot] labeled #2242
  • 03:01
    dependabot[bot] opened #2242
  • 03:01

    dependabot[bot] on npm_and_yarn

    Bump jest from 28.1.1 to 28.1.2… (compare)

  • Jun 28 03:02
    dependabot[bot] labeled #2241
  • Jun 28 03:02
    dependabot[bot] opened #2241
  • Jun 28 03:02

    dependabot[bot] on npm_and_yarn

    Bump @babel/preset-react from 7… (compare)

  • Jun 28 03:02
    dependabot[bot] labeled #2240
  • Jun 28 03:02
    dependabot[bot] opened #2240
  • Jun 28 03:02

    dependabot[bot] on npm_and_yarn

    Bump @babel/core from 7.18.5 to… (compare)

  • Jun 28 03:01
    dependabot[bot] labeled #2239
  • Jun 28 03:01
    dependabot[bot] opened #2239
  • Jun 28 03:01

    dependabot[bot] on npm_and_yarn

    Bump @babel/plugin-transform-ru… (compare)

  • Jun 28 03:01
    dependabot[bot] labeled #2238
  • Jun 28 03:01
    dependabot[bot] opened #2238
  • Jun 28 03:01

    dependabot[bot] on npm_and_yarn

    Bump mongoose from 6.4.0 to 6.4… (compare)

  • Jun 28 03:01
    dependabot[bot] labeled #2237
  • Jun 28 03:01
    dependabot[bot] opened #2237
  • Jun 28 03:01

    dependabot[bot] on npm_and_yarn

    Bump @babel/preset-env from 7.1… (compare)

  • Jun 27 18:09
    Waldleufer commented #2236
G.Ambatte
@G-Ambatte
Beyond that, Docker support has mostly been left alone.
G.Ambatte
@G-Ambatte
The other thing that I do is, when I'm ready to test out a new change, is to first run npm lint to make sure my code is correctly formatted, then the npm build script. It's meant a lot less follow up commits with a description of "Lint fixes".
Charlie Humphreys
@jeddai

re:docker: Gotcha -- so I've done a couple things that have made my workflow with it a bit easier, definitely curious of your thoughts (not sure how helpful this would be for the group)

  • I separated the watch/livereload server from the dev argument, so now the buildHomebrew.js has both a --dev and a --watch. With just --dev it will watch the files and update the build folder as they're changed, but it doesn't start up the server.
  • the docker compose file now bind-mounts the build folder to the homebrewery docker image, so now when I change a file it'll pick up those changes as the buildHomebrew script updates the build folder without needing to be restarted. Just have to refresh the browser to pick up the changes

re:linting: that's a great tip, definitely will be sure to run that!

Trevor Buckner
@calculuschild
@jeddai We have the --dev option set up to both watch files and start up a server for that very reason you mention: The server it starts will automatically pick up updates in the build folder and you only have to refresh the browser to see the changes. Since we don't normally do our dev work inside a Docker container we have never had a need to separate the livereload server out.
Charlie Humphreys
@jeddai
Gotcha, makes sense -- I'll switch it back then before I commit
G.Ambatte
@G-Ambatte
@calculuschild Another request for help with a password change from the subreddit: https://redd.it/qjqx0t
Trevor Buckner
@calculuschild
Got it.
Sigh... Some day I'll get some password management figured out.
G.Ambatte
@G-Ambatte
I think we need to decide which way to jump on that... We could implement a login system locally, within Homebrewery, that produces the same JWT token. I know that the original intention was the NaturalCrit could be a centralized repository of D&D tools but none of the others ever got finished or fandom like Homebrewery... It may just be a case of making the leap to have HB stand alone.
G.Ambatte
@G-Ambatte
Moving to an internal login may also give us the ability to make some minor changes... Like eliminate case sensitivity in user names, add input validation to the user name field, and add password reset confirmation password/passphrase to simplify or even automate password resets.
Eric Scheid
@ericscheid_twitter
One of the reasons password resets were never done was because storing email addresses for such would make it a target 🎯. Once we start collecting email addresses that raises all sorts of technical and legal issues.
G.Ambatte
@G-Ambatte
Precisely - GDPR becomes a thing to worry about.
Eric Scheid
@ericscheid_twitter
That said, linking an account to another service (eg. twitter or facebook) can 1. enables login via that service, and 2) provides another channel with limited spammage rights.
Does reddit provide a “log in with reddit” option?
G.Ambatte
@G-Ambatte
I don't think so... There's a post about it - https://redd.it/5oxaos - but it was more about granting access to the user's Reddit account, rather than authenticating the user against said account.
The post does recommend using OpenID instead.
Trevor Buckner
@calculuschild
We could implement a login system locally
Well, we can make those changes on Naturalcrit as well. There's nothing stopping us because I have access to both halves of the system now.
Trevor Buckner
@calculuschild
I think we've had this discussion many times before, and I think we can pull password management off without collecting any additional user info, and without forcing users to log in with social media. We wouldn't have 2-factor authentication, but as long as a user can either 1) log in currently or 2) can't log in, but can provide their username and info about private brews under the account, I feel like that should be enough to let the user change their password? If something goes wrong like they leave themselves logged in and someone maliciously changes the password, then they can still come to me and I can manually fix things. But I think that will be far less likely than users wanting to just change their own password legitimately.
Essentially automating what I have to do manually now (verify with the user their username + brew info), and shifting the need for manual intervention to only the more rare case of a malicious user happening to access the Homebrewery on the same computer as another user who happened to not log out of a public machine.
Trevor Buckner
@calculuschild
Of course that means we should have an obvious logout button finally. And possibly a pop-up when you close the page that says you should log out first if on a public machine.
Trevor Buckner
@calculuschild
Maybe also a pop-up when you log in that asks if this is a trusted machine, and if yes, we just check a box in local storage to not bug you about it again on this machine.
Eric Scheid
@ericscheid_twitter
Logging in with OpenID does provide an additional benefit - one fewer password that someone needs to remember.
Charlie Humphreys
@jeddai
I also agree that OpenID would be a great option for this. Probably a lot of work to do to make that happen though
Trevor Buckner
@calculuschild
That is true, and was kind of the idea with allowing sign on with Google. And we can keep encouraging that and add more OpenId compatibility in the future. Unfortunately not everyone wants to be linked to Google/Facebook/whatever, especially where so many are already signed in with username/password and finding yourself locked out one day because now you need to link to XYZ platform is going to push some people away.
Gazook89
@Gazook89

Are you able to get a coutn of how many users there are with no linked google account?

Logging in with reddit account (if possible) and github account should be allowed, since those are the platforms in which homebrewery engages with users for reports, feature requests, updates, etc.

And if the GMB discord is any indication, I think more people are going to start moving to HB over time--- Their developer hadn't replied to messages for 6 months until last week when their SSL cert expired for a few hours and most of the active people are advising newcomers that it is abandonware.

Gazook89
@Gazook89
which leads to two thoughts on logins: 1) more users, more manual work for calculuschild, and 2) if calculuschild disappears for whatever reason, users with login problems are SOL.
Trevor Buckner
@calculuschild
Easy fix for a recent issue if someone wants a PR: naturalcrit/homebrewery#1789
Charlie Humphreys
@jeddai
Ngl I'm in that discord and that whole ordeal is why I've decided to help contribute to homebrewery :) Definitely taking me a hot minute to come up to speed on the tech used in the project though.
Trevor Buckner
@calculuschild

Kind of funny since the Homebrewery is the original, then GMBinder took our source code (it is open-source so... good for them?), tweaked a few features, and then slapped a subscription model on it. Granted, we did have a lull for a year or so when the original owner was leaving the project before I joined which is what led a lot of people to switching over, but we've been pretty active lately and are seeing more traffic back this way again.

Not that we are trying to "win" anything, but it does mean people are watching our progress more these days, so more help is always welcome.

Gazook89
@Gazook89

right, but I think we can likely all agree that it is a little "icky" that they don't provide support for a paid (and especially subscription-based) app. And they haven't completed their well-funded kickstarter goals. But I try not dwell on it or take a HB vs GMB mindset since I really have no horse in the race, though I do indulge in a bit of schadenfreude occasionally.

And then there is Norn--- I'm skeptical, but interested to see what happens since it is a very different approach to the same cause.

Or actually i think Norn is now "Scribe" or something similar.
Trevor Buckner
@calculuschild
I liked what I saw of Norn but it seemed to be just an early demo at the time. I'm not sure where it's at now but it seemed cool.
Trevor Buckner
@calculuschild
@jeddai Feel free to ask any technical questions you have if it helps you get up to speed on things. We all kind of learned the same way from the original creator or an older contributor, and by fiddling around and figuring things out together.
Charlie Humphreys
@jeddai
Good to know! I am not crazy familiar with React (I work for an Angular shop) but at the moment the only thing tripping me up is CodeMirror and how it loads its helpers and stuff. Despite having required the necessary js files for code folding the CodeMirror editor instance that gets created doesn't seem to have the methods it's supposed to. I'm gonna keep poking about but I'm starting to lean towards it being a weird interaction with document swapping and the language mode switch happening there. I might have to manually enable/disable code folding on document swap but there doesn't appear to be much documentation surrounding that (if it's even an option with the cm library)
Trevor Buckner
@calculuschild
Ah, yeah we are just recently diving into more of the CodeMirror stuff and it's been a lot of trial and error figuring that library out. I might not be much help on that particular topic since you know as much as I do on the code folding stuff. Anywhere else though :wink:
Charlie Humphreys
@jeddai
Yeah there don't seem to be many stackoverflow questions (and more importantly answers) about the code folding, so I'm currently digging through the library to get a better understanding on how/when it chooses to do code folding and such
Oh this is a question spawned from curiosity, but what is the mechanism by which homebrewery is deployed in production? Kubernetes? An app engine kinda service?
Gazook89
@Gazook89
not sure if this answers your question, but it runs through heroku. (I am the least technically minded person here, just learning)
Charlie Humphreys
@jeddai
Yep that answers it!
Gazook89
@Gazook89

great. And in case it's mentioned, the staging site is here: https://homebrewery-stage.herokuapp.com/

I don't think there is anything in staging that isn't currently on the production site, but if there is, you'll find it here.

Charlie Humphreys
@jeddai
Ahh that's also good to know -- is code ending up in the staging site a manual thing or automatic?
Gazook89
@Gazook89
I am not sure, @calculuschild will know, but I think it's linked to one of the branches ("staging"?).
Charlie Humphreys
@jeddai
Okay!
Trevor Buckner
@calculuschild
Staging is always current with the Master branch, so it might be one or two PRs ahead of the live site right now. We can probably get rid of that "staging" branch....
Similarly, "Production" is (usually) set to whatever the current Live version is and should be updated with each version release, just for easy comparison between Live and Master.
Charlie Humphreys
@jeddai

So I am beginning to think the way modes/addons are imported in the codeEditor.jsx isn't working properly. If I use the require method similar to the mode imports

require('codemirror/addon/fold/foldcode.js');
require('codemirror/addon/fold/foldgutter.js');

the fold gutter shows up (since that's all CSS), but there are never any fold buttons inside it and the extensions that should exist don't. If I copy the contents of the IIFEs in those two files and paste them into the codeEditor.jsx where I'm importing them it works as expected. The IIFE at the top of the codemirror js files has some logic to determine whether it should use a new instance of codemirror or use one that already exists, and I confirmed via debugging that it's entering into the first if block here (the one commented with CommonJS), and not the last one which I think would be expected:

(function(mod) {
  if (typeof exports == "object" && typeof module == "object") // CommonJS
    mod(require("../../lib/codemirror"));
  else if (typeof define == "function" && define.amd) // AMD
    define(["../../lib/codemirror"], mod);
  else // Plain browser env
    mod(CodeMirror);
})(function(CodeMirror) {
I'd argue this is a CodeMirror issue, because it should probably check if the CodeMirror object exists before trying to import/create a new one based solely off the type of various JS terms
Charlie Humphreys
@jeddai
What's making less sense as a continue debugging, is that importing the modes works fine -- as I step through the require lines the modes get added to the CodeMirror object as I allow the require lines to complete. It seemingly just falls apart when I hit the require line for foldcode/foldgutter. It doesn't add the helpers for them, but then after I run all the code copied from those files the helpers exist as expected
Charlie Humphreys
@jeddai
Outside of figuring out the import issue I have it working though so that's fun!