Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] CSS editors don't open at all. #337

Open
3 tasks done
FrobtheBuilder opened this issue Apr 11, 2019 · 6 comments
Open
3 tasks done

[Bug] CSS editors don't open at all. #337

FrobtheBuilder opened this issue Apr 11, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@FrobtheBuilder
Copy link

  • Used appropriate template for the issue type
  • Searched both open and closed issues for duplicates of this issue
  • Title adequately and concisely reflects the feature or the bug

Describe the bug
Neither the custom editor nor system editor buttons in the CSS editor menu seem to actually do anything at all on the macOS version of BetterDiscord.

To Reproduce
Build and inject BetterDiscord from master on macOS and try to open either CSS editor. Nothing will happen.

Expected behavior
The custom editor window should open when you press its button, and the CSS file should open in the system editor when you press the other button.

Screenshots
image

System information
MacOS Mojave, mainline Discord, BetterDiscord built from master yesterday.

Are you willing and able to fix this?
Well, if somebody could tell me where BetterDiscord stores the CSS file I could open it in my system editor myself to work around it, assuming the "Recompile" button works. Or maybe this is a recent known issue and somebody can point me to an earlier commit where those buttons worked. Other than that, I have no idea what's wrong so I suppose not.

Sorry for bothering you guys so much, but when I'm forced to use Discord for community management I like to use CSS edits to shrink the sidebar and make the chat text not light grey on white in the light theme and I recently had to switch to macOS for work purposes. This project is a perfect solution on Windows but I've been having some issues getting it working properly on macOS. Thanks!

@FrobtheBuilder FrobtheBuilder added the bug Something isn't working label Apr 11, 2019
@HYPExMon5ter
Copy link

The System Editor button doesn’t work for me but the Custom Editor does, I’m on windows 10 though.

@FrobtheBuilder
Copy link
Author

Yeah I only ever used the custom editor when I was on Windows and it worked fine. Doesn't open on macOS though.

@FrobtheBuilder
Copy link
Author

FrobtheBuilder commented Apr 11, 2019

Some additional information, when you press the custom editor button this error appears in the console:
image
Is this package.json being left out of the build or did I miss some required step building or something? It looks like there's a package.json in the editor directory, but not editor/dist

@FrobtheBuilder
Copy link
Author

FrobtheBuilder commented Apr 11, 2019

If I copy that outer package.json to the dist directory, a white window pops up instead of nothing happening, but the contents are totally missing.
image
No errors show up in the console either.

@FrobtheBuilder
Copy link
Author

Yeah, running build_editor doesn't work either, I think something about the configuration is just wrong. It's expecting some package.json in the dist directory but the top level one in the built editor isn't the right one or something.

@FrobtheBuilder
Copy link
Author

FrobtheBuilder commented Apr 11, 2019

Eureka! I got it to work by copying the package.json and changing the "main" property from "dist/editor.js" to "editor.js". It looks like the application isn't following the node module resolution spec and searching for the package.json only in the dist directory instead of walking up the directory tree to the one above.

The build process should probably be aware of this and copy a fixed package.json into that dist directory, or it could be fixed on the app side by allowing it to walk up the tree to find the file, in accordance with the node module resolution strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants