Live data from Hacker News

A Firefox-only minimap (2021)

stefanjudis.com

41–50 of 114 posts

Re: A Firefox-only minimap (2021)

#41
I always liked Lars Jung's implementation where the text is abstracted into blocks (which works on chrome) [0][1] and Rauno Freiberg's demo (uses -moz-element) where you can use it to pin sections, jump between them, and navigate the page in general [2].

[0] https://larsjung.de/pagemap/ [1] https://larsjung.de/pagemap/latest/demo/text.html [2] https://uiw.tf/minimap

Re: A Firefox-only minimap (2021)

#42

I can see the use, but this is also kind of wild. It's live-updating if you select text, it's almost literally a separate viewport into the same content. I'm trying to figure out the use-cases and implications of this. You can do offscreen/overflow:hidden tricks to make it work with hidden elements. But... as far as I know there's still no way without a library to convert that element to an image (for privacy reasons…

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.

Re: A Firefox-only minimap (2021)

#43
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://lists.webkit.org/pipermail/webkit-dev/2014-January/0...

Re: A Firefox-only minimap (2021)

#44

What a shame that it doesn't seem to work recursively.

Yes it can- that's the first thing I tried- but it will not iterate forever. The trick is to use indirect recursion:

  
  

  #a,
  #b {
    height: 200px;
    width: 200px;
    border: dashed;
  }
  #a {
    background: -moz-element(#b) no-repeat;
    background-size: 80%;
    border-color: green;
  }
  #b {
    background: -moz-element(#a) no-repeat;
    background-size: 80%;
    border-color: purple;
  }

Re: A Firefox-only minimap (2021)

#45
post #24

Earlier quoted context omitted.

Opening fastmail in Firefox crashes the whole browser. I don't know why. I stopped my subscription due to that.

I have used fastmail in Firefox daily for years, never had an issue.

Well maybe it only happens for me. Not only the page becomes non responsive the whole browser becomes non responsive.

Re: A Firefox-only minimap (2021)

#46
post #42

I can see the use, but this is also kind of wild. It's live-updating if you select text, it's almost literally a separate viewport into the same content. I'm trying to figure out the use-cases and implications of this. You can do offscreen/overflow:hidden tricks to make it work with hidden elements. But... as far as I know there's still no way without a library to convert that element to an image (for privacy reasons…

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.

Re: A Firefox-only minimap (2021)

#47
post #23

Earlier quoted context omitted.

Weirdly enough I can't see it on this article but it's showing just fine on the OP. Maybe my extensions?

Site author here: there's some logic to only show the minimap when there's enough screen estate and it generally fits. Couldn't be bothered to scrolling/dragging logic. :D

It should definitely take a responsive design into account, I think. The beauty is that most sites, on desktop at least, should be able to benefit — we all have plenty of horizontal real-estate to spare!

Re: A Firefox-only minimap (2021)

#48
post #24

Earlier quoted context omitted.

Opening fastmail in Firefox crashes the whole browser. I don't know why. I stopped my subscription due to that.

I have used fastmail in Firefox daily for years, never had an issue.

Yeah, something is going on with GP's browser. I have Fastmail open in Firefox right now, I've never had an issue with it.

I'm not saying that to dismiss the problem, I believe GP that it's crashing; more bringing it up to say "there is something going wrong here that's not at the browser/site level that could potentially be fixable for you on your local device if you want to use Fastmail in Firefox."

Re: A Firefox-only minimap (2021)

#49
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 just use the scroll wheel / touch pad, especially the one on Apple's mouse is really intutive. But I also try to not have my files get too large, or use the search function to quickly scroll to somewhere I know.
Post reply on HN