Live data from Hacker News

A Firefox-only minimap (2021)

stefanjudis.com

81–90 of 114 posts

Re: A Firefox-only minimap (2021)

#81
post #11

A decade ago I built a silly JS library for folding up DOM elements like paper [1] and I eagerly anticipated using element() instead of tediously cloning nodes for every fold. Here we are ten years later and this niche CSS feature has yet to be adopted by the other browsers. Similarly, I thought I'd soon be using the CSS custom filter spec from the same era (which allows custom GLSL shaders to be applied to elements)…

My understanding was that browser makers looked at the CSS custom filter spec and decided they were too difficult to implement securely[0]. On one hand, I definitely appreciate that, I'm glad to see a feature abandoned if it's being abandoned because it's impossible to do it safely. On the other hand... I wanted CSS custom filters so much and I still regularly think of things I could have done with them :) [0]: https…

There's already enough problems with CSS and what it can do that I want an add-on which either disables it entirely, or allows only a tiny subset of it.

I can appreciate a clever use of CSS the same way I can with JS but for my day to day browsing I don't want either being able to do whatever it wants because far too often what websites use it for is user-hostile.

Re: A Firefox-only minimap (2021)

#82
post #15

Earlier quoted context omitted.

I exclusively use firefox, have a pretty normal browsing pattern, and that almost never happens to me! Much less that once a month, maybe once every 3 months

Finding one once every few months sound about right but usually the bugs impacting Firefox users are major PITA. Some I’ve had over the past few years: * myADP had some kind of bug preventing firefox authentication that lasted months. * Elan financial redid their credit card site for fidelity visa and had a CSS bug that hid the card total balance. This lasted for about a month. * bitbucket (work required) had this bu…

> myADP

For years they had a terrible implementation that only worked in _old_ versions of IE. They had no incentive to change because they were the main players in that space. I loathed them because their tagline was "Anytime, anywhere" which was clearly missing an asterisk.

Re: A Firefox-only minimap (2021)

#83
post #35

The first thing I do when I work in an editor with a mini-map is -- turn it off. I find it mostly the most useless feature for coding, and for sites it seems to be equally useless. Why? 1. Stuff is too small to really make out where I'm going or navigating. 2. Short or long pages, both don't really benefit from the loss of screen real-estate. Or the distraction really. 3. Other tools like a proper index with descript…

I leave it on. It acts as a larger scrollbar when I use the mouse/trackpad/whatever pointing device to scroll. Operating systems these days are all about hiding the scrollbar and/or making it as small as possible. The minimap not only solves that issue, but also gives a bit of a visual representation of the file contents. Sure, you can't read the text, but if you've worked with a file long enough, you know exactly wh…

I disable it. I like vsc to be minimal like vim. I even use Vim extensions which help me avoid using scroll bar and use crtl-D/u/e/y instead.

Re: A Firefox-only minimap (2021)

#84
Wow I had never heard of element()!

Along similar lines, HyperCard had a lockScreen flag that would stop sending draw commands to the screen, and instead buffer them internally, so that the screen would update once drawing was finished. It's such a powerful abstraction that much of the hand-waving we do today to avoid redraw would just go away, including nearly all of the effort that goes into building single-page applications (SPAs), because their functionality can be simulated by simply locking the screen and fetching new HTML from the server as a dumb terminal so the loading bar doesn't animate:

https://www.hypercard.center/HyperTalkReference/lockScreen

To a first-order approximation, all apps/libraries/frameworks are missing critical functionality like this. The most common design mistake is to provide a setter without a getter, or vice versa. Another one is for a console app to provide a config file setting, with no way to override that as a shell argument to the executable. There are dozens, if not hundreds of these common anti-patterns, so statistically the odds of any piece of software having any of one of them can be considered to be 100%.

So in this case, most "modern" browsers provide a way to render the screen image from an HTML description, but no way to retrieve that image. The canvas element is a band-aid over these original design mistakes. A proper DOM implementation would look like iframes (windows) all the way down, where the contents could be specified from url, attributes, html, vectors/buffers or code. Each would have its own sandbox attributes defaulting to full isolation, so could be treated as its own browser, then their data dependencies could be piped together, a bit like unix executables. Mashups/portals/aggregators would be so easy to build that kids would be doing it.

It's a serious enough problem that honestly I don't really think in terms of HTML/CSS/Javascript anymore. I work in tables mentally, then let the designers transpile that description to CSS. And the real work of building the rich interactions available in desktop programming simply can't be done without massive yak shaving. This was also a problem in OpenGL before better access to render buffers and shaders went mainstream.

IMHO this all started when Netscape became a private enterprise from its Mosaic roots, then was exacerbated when Microsoft monopolized the browser market for so many years, then cemented when Firefox and Chrome endorsed the status quo. The only way out now would probably be to formally build a programmer's browser from scratch with hard security constraints around the core element's external communication, then emulate the current HTML/CSS/Javascript experience we're used to. Sort of like Qt, Postscript, etc. Which of course will never happen, so it's hard to see the positive in discussing these foundational decisions when there's nothing any of us can do to fix them in any reasonable amount of time/money/effort.

Re: A Firefox-only minimap (2021)

#85

Every day I hit sites that literally only work in Chrome.. it’s time to fight back :)

I exclusively use firefox, have a pretty normal browsing pattern, and that almost never happens to me! Much less that once a month, maybe once every 3 months

Similar for me, I’d say it’s actually more like once or twice a year. More if you count sites that are specifically about Chrome experiments, which sometimes get linked from HN.

Re: A Firefox-only minimap (2021)

#86
post #42

Earlier quoted context omitted.

Could be used for a lot of cool things, like a mirror, a magnifying glass, keeping a part of the page in view even if it is outside of the screen (for editing purposes for instance), I'm sure I'm missing many other use cases. None of them fundamentally useful but cool in their own ways.

The tricky bit here is that it's not going to do things like forward events, so using this to keep the page in view won't allow selecting text for example. For some things like the mimimap here, that seems like a feature? You want it to be purely visual in that case. For other cases, I'm not sure if I should think of that as a feature or a limitation. Definitely something to play around with though.

Yes but you could make a change at the top of the page that would have an impact at the bottom, and that would be useful to see both changes at the same time.

Re: A Firefox-only minimap (2021)

#87

The first thing I do when I work in an editor with a mini-map is -- turn it off. I find it mostly the most useless feature for coding, and for sites it seems to be equally useless. Why? 1. Stuff is too small to really make out where I'm going or navigating. 2. Short or long pages, both don't really benefit from the loss of screen real-estate. Or the distraction really. 3. Other tools like a proper index with descript…

When I first encountered mini-maps (in Sublime Text, which I still use), I just thought it was just a gimmick that looked cool, but that's about it.

Now, I use it all the time, that's essentially a better scroll bar. In fact, the moment I saw the mini-map on the linked websites, I instantly tried to use it as a scrollbar, and was very disappointed to see that it didn't work.

Re: A Firefox-only minimap (2021)

#88

Earlier quoted context omitted.

My understanding was that browser makers looked at the CSS custom filter spec and decided they were too difficult to implement securely[0]. On one hand, I definitely appreciate that, I'm glad to see a feature abandoned if it's being abandoned because it's impossible to do it safely. On the other hand... I wanted CSS custom filters so much and I still regularly think of things I could have done with them :) [0]: https…

There's already enough problems with CSS and what it can do that I want an add-on which either disables it entirely, or allows only a tiny subset of it. I can appreciate a clever use of CSS the same way I can with JS but for my day to day browsing I don't want either being able to do whatever it wants because far too often what websites use it for is user-hostile.

CSS shaders are the kind of feature that I would get a ton of use out of for specific projects, and would also very likely either turn off entirely or at least put behind a permission in my own personal browser.

I get why they're likely a bad idea, I'm not saying they should be implemented. It's very likely the right decision to get rid of them. I just mean... I want them XD

Re: A Firefox-only minimap (2021)

#89
Crazy that `element()` has been fully supported (with `-moz-`) in Firefox since 2011 while no other browsers seem to even partially support it [0]. I can think of a few powerful use cases (not just minimaps) if this had cross browser support.

Does anyone connected to the Chrome or Webkit teams have any idea why? Is there a lack of interest, is it hard to implement with good performance, does it create any tricky security issues?

[0] https://caniuse.com/css-element-function

Post reply on HN