Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:37
    calculuschild commented #2282
  • 02:35
    Johnny2136 opened #2282
  • Aug 18 14:03
    calculuschild commented #116
  • Aug 18 14:00
    calculuschild closed #2281
  • Aug 18 14:00
    calculuschild commented #2281
  • Aug 18 12:13
    phicups opened #2281
  • Aug 17 12:11
    ericscheid opened #2280
  • Aug 17 12:11
    ericscheid labeled #2280
  • Aug 17 12:11
    ericscheid labeled #2280
  • Aug 17 12:11
    ericscheid labeled #2280
  • Aug 17 12:11
    ericscheid labeled #2280
  • Aug 17 12:00
    ericscheid commented #1085
  • Aug 15 03:01

    dependabot[bot] on npm_and_yarn

    (compare)

  • Aug 15 03:01
    dependabot[bot] closed #2270
  • Aug 15 03:01
    dependabot[bot] commented #2270
  • Aug 15 03:01
    dependabot[bot] labeled #2279
  • Aug 15 03:01
    dependabot[bot] opened #2279
  • Aug 15 03:01

    dependabot[bot] on npm_and_yarn

    Bump eslint from 8.19.0 to 8.22… (compare)

  • Aug 14 00:46
    G-Ambatte labeled #2278
  • Aug 14 00:46
    G-Ambatte labeled #2278
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!
Charlie Humphreys
@jeddai
https://discuss.codemirror.net/t/having-trouble-with-nodejs-require-and-codemirror-addons/1079 Seems this has been an issue for a while -- most common with electron apps but definitely seems to be the case here as well. If I use the codemirror/lib/codemirror js file instead of just codemirror the addons work as expected, but the modes stop working. I'm leaning towards taking the code needed from the addons and putting it in its own js file that can be imported without the IIFE wrapper but that's definitely not ideal if codemirror ever needs to be updated
Trevor Buckner
@calculuschild
We do update it pretty regularly as they come out with new versions. Maybe you can throw what you have into a draft PR and you can get more eyes on it to help crack the case.
Charlie Humphreys
@jeddai
Cool I'll open that PR in a bit
Charlie Humphreys
@jeddai
It has been opened -- any thoughts/feedback would be appreciated!
G.Ambatte
@G-Ambatte
From memory, I don't think you can rely on the CodeMirror object existing - with the recent Undo/Redo history stuff, everything would crash if the CodeMirror editor object properties weren't referenced with optional chaining.
image.png
G.Ambatte
@G-Ambatte
I am totally prepared to be wrong, of course. That is always an option I am willing to consider.
PR #1794 has been opened to fix the issue raised on Reddit about User Page ordering not working correctly for ordering by view count (https://redd.it/qlh2hn - opened on Github as issue #1793).
G.Ambatte
@G-Ambatte
Another easy PR idea: add page count to available sort options on the User Page. Not sure why anyone would want to sort by page count, but it is a thing that could be done now.
G.Ambatte
@G-Ambatte
Random thought: we could add Bugfinder flair to the subreddit. Users who report a confirmed bug get Bugfinder. Perhaps also a Bugsquasher flair, for users who have submitted PRs that fix bugs.
Just some sort of validation for the Redditors, that we value their (good) bug reports.
Trevor Buckner
@calculuschild

we could add Bugfinder flair to the subreddit. Users who report a confirmed bug get Bugfinder. Perhaps also a Bugsquasher flair, for users who have submitted PRs that fix bugs.

Sounds good to me.

Another easy PR idea: add page count to available sort options on the User Page.

Easy, but I don't think it really solves anything. Where possible lets focus our PRs on resolving existing issues.

Eric Scheid
@ericscheid_twitter
But do raise an issue for the idea, flag it as a "P2 - minor feature or tweak" and maybe "Ready to add". It's a simple low-hanging fruit with ample similar code available to copy from — ideal for someone new to the project to get their feet wet with.
Charlie Humphreys
@jeddai
@calculuschild I just noticed that if you have any sections folded as soon as you go to edit anything it unfolds all of them -- I need to figure out why it's doing that before that PR is ready. Is there a label I can add to the PR to mark it as on hold?
Trevor Buckner
@calculuschild
Click this:
image.png
Charlie Humphreys
@jeddai
Awesome, thanks
Charlie Humphreys
@jeddai
image.png
Any thoughts on having the content of the fold inside the fold widget?
It seems to wrap well but I'm currently limiting it to 20 characters
Trevor Buckner
@calculuschild
Hmmmm.... I don't know. It looks a little messy. What happens if you just leave whitespace as whitespace to reduce the clutter of symbols?
Trevor Buckner
@calculuschild
I'm tempted to say just don't show the contents in anticipation of allowing users to add more stuff onto the \page lines, possibly as folding labels (naturalcrit/homebrewery#1667) or even styling that applies to the whole page. But showing page contents might be enough for now until we make that change since I think it's still a way off.
Charlie Humphreys
@jeddai
image.png
Definitely a little cleaner -- maybe some css changes we could make to the widget could help as well?
Charlie Humphreys
@jeddai
But yeah we can also just leave it empty as an open/close arrow and call it a day haha
G.Ambatte
@G-Ambatte
Hacktoberfest T-shirt redeemed... We'll see how long it takes to ship.
Trevor Buckner
@calculuschild
@G-Ambatte I merged naturalcrit/homebrewery#1777 but found an error shortly after. I reverted the changes, but we can't reopen PRs so we will need to open a new one and keep tinkering on it.