-
Notifications
You must be signed in to change notification settings - Fork 60
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
noVNC-style vertical menu #330
Conversation
6d57837
to
f4bd79f
Compare
Don't worry about the commit names, I will go back and squash when I'm done |
What would be the best way to add this other type of menu? Should I hack together something in HTML or just give up and make a different element for this style of menu? I don't know |
I have no opinion on this. And if I did, it would not be worth much anyway! |
f26265c
to
4823a63
Compare
I'm sorry @totaam , but eslint is erroring out for me. If you could checkout the branch and just run the formatting for me, that would be of great help. Other than that, I think I finished all the implementations of everything, just check over it. Thanks! |
Let's completely ignore whatever mess |
a95b8b8
to
299c991
Compare
I tried to do as best of a job I could, but it still does have significant diffs from the old commits (probably just due to moved lines from the formatter I used). I could fix it further if you want |
Yes, please. |
299c991
to
e5caaa9
Compare
e5caaa9
to
3de6709
Compare
Should be all good now @totaam |
On a side note, it seems that prettier is the formatter xpra-html5 uses. Prettier should either be removed or run once in a while, since it appears it hasn't been run for a long time. Not a huge issue though. |
Thanks! |
Yes, I would love to do that - I've had to undo some of the obnoxious changes it made. The question is, where? |
I'm pretty sure it is due to the git hooks on the husky npm package. It seems that the npm build system really doesn't serve any purpose, so I am pretty sure the entire thing can be removed. If that is not doable, just remove the hook that runs prettier. I have no experience with nodejs, but it should probably be in package.json. I think it would be beneficial for this project to have a formatter, although it definitely isn't necessary. However, prettier should either be configured to be less newline-obsessed or a different one should be found. Although, I think that it would be better for prettier to be removed than to have it doing whatever it is doing right now |
I would love to do that! It only causes problems: #306 (comment) |
We should probably move this to a discussion or issue instead of a closed PR, but when I said to "remove the whole thing," I meant that NodeJS in it's entirety could probably be removed. I don't know if there is something that people actually use inside of it, but afaik it only makes things harder. |
I have found a pretty configurable and non-intrusive html and JS formatter, however, like all formatters, it is a compromise. A weak and lenient formatter like this one does not make a line break after a few tokens, but it cannot enforce a strict code style. An intrusive formatter like prettier would enforce a strict code style, but prettier is very unconfigurable and has a really annoying tendency to create newlines when they are not necessary. I think I agree with you when you said to remove everything node related. This project is not in need of a system like that |
Alright, the one I was using was https://github.com/beautifier/js-beautify. We could still use node (not a huge fan, a lot of boilerplate and unnecessary files for nothing) or we could use nix or something. For nix, a shell.nix would look like let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
pkgs = import nixpkgs { };
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [ jsbeautifier ];
} However, nix is kind of annoying to install on windows (less annoying on anything else, but still inconvenient if you aren't using nixOS like I am). So maybe node is better in that regard? I don't know, I don't use node A demo for the formatter is https://beautifier.io/ |
I very much dislike the cost of running |
Right. Fedora's repos weridly package a perl rewrite of js-beautifier, but not the actual thing. I don't know if the perl version has a cli, or just a module. Nix can be installed on fedora. If I am not wrong, it has a few deps and is roughly 500mb. I think the right course of action is to start with removing node, and if needed, another formatter can be added, but only if it is needed. |
@totaam If you would like a formatter, I believe I have come to a fairly satisfactory solution.
I have gotten it working, so I could make a draft pr if you want. I would probably need to edit the README to add in that to contribute, run |
I could also add a |
I'm sold. |
|
TODO:
I could use some suggestions for a proper name for it other than "noVNC style menu".