WinBox: Window manager in a web browser
github.com
github.com
The show example "button" is a non-focusable div element
<div class="button" onclick="window.examples['theme-modern']()">Show Example</div>
Once the window is open, the minimise, maximise, full-screen and close "buttons" are spans containing no useful text. <span class="wb-min"></span>
<span class="wb-max"></span>
<span class="wb-full"></span>
<span class="wb-close"></span>
The list goes on...Sure, sometimes accessibility can be hard to get right but it's quite something for it to have been completely disregarded.
Open Source software is great insofar as you can contribute to it in many ways, but applying this logic to all situations is really dismissive. There are many aspects of software projects that are largely or solely dictated by the creators/maintainers of that software, that may be impossible for idle contributors to significantly affect (and even forking can be a gargantuan/unviable option in some cases).
TL;DR: Open-sourcing your software should not shield you from constructive criticism, NOR should it invalidate the advice of informed people recommending against using your software.
...that's in development. Professional things are not allowed to be in development?
Do you go around your town criticizing people that are in the process of constructing office buildings, because they don't have the wheelchair ramp installed yet?
Perhaps if you care so much, you can lend a helping hand...
Have you considered that the analogy breaks after the obvious bit?
In a 3 week old code base? Please... You can write the entire thing over again in a week and add what you want during that time.
The commenters here should do that too! It would probably take less effort than bitching about someone's side project that they'll probably never even use here on HN.
God save us all!
<div class="button">
instead of just using an actual html button?Also, "Show HN" implies that the project is your own personal work. If that's the case, let us know and we'll put it back. But if it's not the case, please read https://news.ycombinator.com/showhn.html and only put "Show HN" on your own projects.
I honestly thought this was a window manager, you know, the piece of software on a desktop OS that draws the windows. IE, I thought it was a window manager that made it easier to use web applications on a desktop computer.
It took me awhile to realize that this allows desktop-style windows inside of a web browser. Not really a "window manager."
This could work for things like Email clients or UI's like Owncloud/Nextcloud. Any app that wants to allow the user to juggle multiple actions at once.
The idea was to make the common action of "opening multiple links from a list in new tabs" better, where tabs are too large containers and OS windows are often unwieldy. If you wanted to look at one of the results further in a bigger window, you could then pop it out into a new tab (again, kind of like tiling WMs with desktops).
https://lh3.googleusercontent.com/proxy/UZCuKtNMML225va5prEG...
So basically, think of how an IDE tends to allow you to customise its UI to suit whatever task you're thinking of. Clearly, we can and will ensure that the main use cases have a compelling equivalent in the web version, but it's fairly intimidating to think that there's no easy way to offer these kind of expected features on the web.
One example is https://github.com/node-projects/dock-spawn-ts , but there are many more. Maybe you can also tease out the layout logic from VS Code or Theia (or even better, someone else might have done the work).
In the second case, reasonable, and "should be" and "considered" are all value judgment words that you will decide yourself if there's a fit for you. So if you meant how can someone judge a phone, you'll have to decide for yourself, because that's the only way you'll feel satisfied with your particular definitions of reasonableness, consider, and should. If you insist on discussing it with other people I think it would be an easy way if you wanted to spend a bit of time arguing about those definitions and which one you personally feel is right, or getting even more meta you could probably try to start a long-winded argument with people by suggesting that these words have no subjective judgment definition but are in fact truly objective. But I think all that's kind of pointless so of course I wouldn't waste my time arguing any of that. ;) ;P xx
If you meant, case 1, guess from JS, you can get the memory and the number of cores from the deviceMemory and hardwareConcurrency properties of the navigator global object. While i think that's probably not sufficient I think it's a start and you could always research more for yourself if you were genuinely curious about this.
If it's case two you don't need to be afraid to make a choice, just look at it and make a judgment about whether you think it's low spec or not.
A better approach might be to simply let the user choose. At the start either default to one version (full fat or basic), or give the user a choice up-front, and make it easy to switch later. Perhaps do a quick test and warn the user if they pick the setup intended for high performance on a device upon which it might be slow, or recommend switching down if things get problematical later.
I don't think having an in-tab window manager is a bad idea. There are numerous sites that I like to keep contained in one tab, however for the heavy-interactive types of site where windows like this make the most sense I would generally rather use OS windows so that I get keyboard shortcuts, tiling, multi-monitor, snapping, always on top and all of the other features that exist in my OS.
It's called Multi-Document Interface (MDI). https://en.wikipedia.org/wiki/Multiple-document_interface
Who would use this and why?
IDEs (and a lot of web apps) work like tiling WMs, which is a far better UX.
There's a good reason Gimp is one of very few apps with that frustrating, disjointed everything-is-a-window design.
I can see this being useful for an application in which the user needs to interact with multiple things and they don't each need a full tab/window (would in some cases be pointless in its own window). A chat application, or a monitoring system, perhaps. Or just when porting over an old desktop system to run in-browser with minimal UI changes.
It is like nested virtualisation. Why would I want to run a VM in a VM in a VM when the inner VM would be more efficient run directly on the metal? The answer is two-fold:
1. Generally, I wouldn't...
2. ... but for some niche use cases the facility can be very useful
Then... just open a new native window, like a normal person. You can still do it with modern browsers without incurring megabytes of JavaScript and performance slowdowns.
Though I think you misunderstood what I was getting at with the tab/window thing. I was pointing out that the general "why X when you can Y" stated in the parent post isn't a great arguement, on its own, for not X.
I prefer to tinker with code without a compliation step. So I made the demo work with the code in src/ to run without a compilation step. The demo is almost pure html/js/css but not completely. It uses webpack for the styles (pipes them through less) and the js. The js is plain js but the index.html expects a version that is de-modularized by webpack.
But changing a few lines index.html got me to run the demo with the default styles.
A lot of JS in the wild favors putting everything in objects (maybe not explicitly, but they end up doing it a lot anyway) so gets away with a lot of "const" use that still lets them mutate the values of those objects. If you're dealing with primitives you're going to need "let" a lot more.
To me, the code smell is the syntax from BASIC (and later C) that goes:
<code> x = y </code>
I've always disliked that notation; it looks like the statement "the value of x is the same as the value of y". So "let" turns the code into something that makes sense when read aloud.
I don't think syntactic sugar is a code smell.
let isn't syntactic sugar — it's the only way to declare a reassignable block-scoped variable (as opposed to const, which can't be reassigned, and var, which is function-scoped or globally-scoped).
I'm admittedly not sure what symbol should be used instead. I'd suggest <= except it reads as "less than or equal to".
Looked almost as intuitive and easy as WinAPI, PDF documentation has 200 pages.
split panes are good enough.
Window managers should not be nested. This was tried in Windows 3.1 and it wasn't a big success to say the least.
I can't drag a window so it lies partly off-screen, instead the window stops moving when I keep moving the mouse, allowing the mouse to change position relative to the title bar.. I can't aero snap, nor "snap window to full height". Only minimized windows are visible at the bottom of the screen, not a taskbar of all open windows.
There's some additions not present on Windows, that threw me off. There's an full-screen button in the title bars, which confused me at first (but could be useful). And each minimized window has a maximize button, which isn't present on Windows and confused me. It seems that whether a minimized window gets restored or maximized depends on whether you press the button or not, rather than being remembered like Windows does.
Does this person owe you something?
This sort of “critique” common on HN and it’s a toxic culture. Not all critique is good critique. We should be against crappy critique like this because it’s not helpful, it’s mean spirited, and it’s anti-maker.
Arguably I tend to be not only perfectionist and detail-oriented (whether on important or unimportant details), but even pedantic, or quick to judge, at times. Nonetheless I do not appreciate being having my writing called "mean spirited" or a "toxic culture".
> Be kind. Don't be snarky. Have curious conversation; don't cross-examine. Please don't fulminate. (...) Please don't post shallow dismissals, especially of other people's work.
Specially when projects like Lively Kernel are already around for such long time.