stylus icon indicating copy to clipboard operation
stylus copied to clipboard

add "max age" input in popup search

Open tophf opened this issue 3 years ago • 35 comments

image

tophf avatar Mar 06 '22 22:03 tophf

Max-age refers to updated date? If so, that's a handy little filter, and it looks fine.

On a somewhat related note, I'm testing on this github page we're currently on right now, and results are all over the place. First result is for instagram, and there's as many results for other random sites, as there are for github.

Also, why all the 404s on webp URLs?

narcolepticinsomniac avatar Mar 07 '22 02:03 narcolepticinsomniac

  1. Yes, the updated date.
  2. The instagram style's category is github, the author probably didn't understand what this means. @Gusted, could you infer the category automatically from -moz-document on USWorld?
  3. I guess those styles don't have a preview. @Gusted, maybe you could make it mandatory? USWorld's gallery and our style finder look bleak and non-informative.

tophf avatar Mar 07 '22 02:03 tophf

USWorld's gallery and our style finder look bleak and non-informative.

Seems so. Let's ping @vednoc as well.

narcolepticinsomniac avatar Mar 07 '22 02:03 narcolepticinsomniac

First result is for instagram, and there's as many results for other random sites, as there are for github.

You can blame it on the people that put wrong categories. I reworked that system (in my upcoming changes) to hopefully prevent such issues, or at least make them less common. ATM I have to manually fix incorrectly set categories.

[...] maybe you could make it mandatory?

We thought about it and decided to leave it optional as some people might upload "random" images. And we had to deal with quite a few of those already. With that said, we might be able to get https://github.com/userstyles-world/stylus-eval up and running. IIRC it's functional, but I don't recall what @Gusted's plan was in the end. All I remember is that it used lots of resources, so we would need to run it on their Raspberry Pi or find some other way.

vednoc avatar Mar 07 '22 04:03 vednoc

@narcolepticinsomniac, the age input looks kinda lame, so what about showing the years of the found styles instead? I've already updated the PR. Clicking the same year again unsets the filter.

image

tophf avatar Mar 07 '22 05:03 tophf

I guess it does look a little nicer. My only concern would be if it's more rigid filtering by years from January on, vs years as 12 months. Also, total page numbers didn't appear to be updating

narcolepticinsomniac avatar Mar 07 '22 06:03 narcolepticinsomniac

I think people normally get excited about stuff made in the current year, even if it just started, so I'd say it's fine. If there are no styles in the current year, it won't be shown anyway, as only the actually present years are shown.

The page now holds 100 elements, so there's just one page usually, if that's what you meant. Previously we limited to 10 because that was the USO's response limit.

tophf avatar Mar 07 '22 06:03 tophf

there's just one page usually, if that's what you meant

Default results on this page start 1/5. Click 2022 - 1/1. Click 14- - still 1/1. IIRC, the number input was updating this in a more expected fashion.

I get that the number input wasn't exactly impressive, but I appreciate years being calculated starting from the current date.

narcolepticinsomniac avatar Mar 07 '22 06:03 narcolepticinsomniac

1/1 means there just one page in both cases so there's nothing to change. I can show the number of styles somewhere I guess? Although it may be the same sometimes just as well.

tophf avatar Mar 07 '22 06:03 tophf

The difference is that the year label shows styles updated in that year, not a range of years.

tophf avatar Mar 07 '22 06:03 tophf

The difference is that the year label shows styles updated in that year, not a range of years.

Oh, then this is terrible comparatively, IMO. Number input FTW, if you ask me.

narcolepticinsomniac avatar Mar 07 '22 06:03 narcolepticinsomniac

I can change the year labels to set the range, it's easy.

tophf avatar Mar 07 '22 06:03 tophf

IDK man, not only was it a range, it was a far more exact range. Number input was intuitive. You're sacrificing precision for aesthetics, which is just weird for you.

narcolepticinsomniac avatar Mar 07 '22 06:03 narcolepticinsomniac

That's not how I see it. The years give an immediate outlook so you know if there are modern styles, and you need just one click to set the range instead of clicking through the number input.

tophf avatar Mar 07 '22 06:03 tophf

Fair enough. Switch it to range, and maybe add some pretty little dot pseudos to separate numbers. =)

narcolepticinsomniac avatar Mar 07 '22 06:03 narcolepticinsomniac

Switched to a slider:

image

tophf avatar Mar 07 '22 09:03 tophf

With that said, we might be able to get https://github.com/userstyles-world/stylus-eval up and running. IIRC it's functional, but I don't recall what @Gusted's plan was in the end. All I remember is that it used lots of resources, so we would need to run it on their Raspberry Pi or find some other way.

Sites with cloudflare -> Not going to work very well. It can be abused easily, it's better to create a site teaching people about making screenshots than us offering such feature(It will cost way too many time to maintain it)

Gusted avatar Mar 07 '22 21:03 Gusted

Switched to a slider

I suppose if you mention 'range' enough, it was bound to come up. It's solid, other than the styling, and perhaps a mouseover tooltip so you know what year you're currently hovering,

Sites with cloudflare -> Not going to work very well.

I thought you had it working with headless Chrome. Even if you didn't, this is a relatively small percentage.

It can be abused easily

How so?

narcolepticinsomniac avatar Mar 08 '22 22:03 narcolepticinsomniac

The tooltip will be shown only when it's hovered again, not while dragging, otherwise I would have to re-implement the entire thing manually as a bunch of multiple controls, which would be quite complicated.

As for styling, I can make it gray:

image

image

tophf avatar Mar 08 '22 22:03 tophf

Found a simple solution for a live tooltip: image

tophf avatar Mar 08 '22 22:03 tophf

Styling's fine. I assumed you'd use filters, but whatever's easiest and works well cross-browser.

Found a simple solution for a live tooltip

Exactly that, but with a mousemove listener on the input to update the text and position with offsetX. Show/hide with hover CSS.

narcolepticinsomniac avatar Mar 08 '22 23:03 narcolepticinsomniac

Exactly that, but with a mousemove listener on the input to update the text and position with offsetX. Show/hide with hover CSS

I think it works like that already but using a simpler implementation, doesn't it?

tophf avatar Mar 08 '22 23:03 tophf

I'm talking about showing in real time as it's hovered, like a video timeline tooltip. It'd be a nice touch, is all.

narcolepticinsomniac avatar Mar 08 '22 23:03 narcolepticinsomniac

Maybe, but hovering normally has a delay, otherwise it'll flicker when the cursor just travels across the control. To implement it I would have to manage the delay programmatically and use a long one at first, then remove it when the control is hovered for half a second. I'm not sure this is worth it. Right now the year is shown when the control is used i.e. clicked/dragged.

tophf avatar Mar 08 '22 23:03 tophf

The real benefit is seeing which year you're hovering before clicking. If CSS is glitchy, add a class at the end of mousemove, and remove on mouseleave. If you want, just remove all the tootip stuff, and I'll do it soon, but not today, unfortunately.

narcolepticinsomniac avatar Mar 08 '22 23:03 narcolepticinsomniac

I'm not against doing it myself, I'm against adding this complexity at all. Just had a better idea: always show the current range persistently at the end e.g. 2009-2022 and update it on change.

tophf avatar Mar 08 '22 23:03 tophf

Note that there's no practical benefit in seeing the year before clicking. Clicking and seeing the change and the results is meaningful.

tophf avatar Mar 08 '22 23:03 tophf

Note that there's no practical benefit in seeing the year before clicking.

I think that's an opinion based solely on how you use a slider. As many people who drag it, will guesstimate a position, and click. They shouldn't need to guess, and the code ain't that complex. That said, I've had a rough day at work, and don't feel like debating this anymore.

narcolepticinsomniac avatar Mar 08 '22 23:03 narcolepticinsomniac

What is the practical usefulness of seeing the year before clicking it? It won't give you anything meaningful. It's not a library or a news search engine where knowing the exact year is useful. The practical use case for this feature is to click and drag it first, then examine the result. People normally won't go for a specific year.

Also, moved it higher just below the pager and the number of styles currently shown image

tophf avatar Mar 09 '22 00:03 tophf

Made more sense to me when the range started full, and got smaller as years were subtracted. Also not sure why we wouldn't leave the current year as a link, but NBD either way.

I'd still prefer a hover tooltip, but not enough to argue about it anymore. Only real bug I see, is that styling's currently broken, in dark mode, at least.

narcolepticinsomniac avatar Mar 15 '22 03:03 narcolepticinsomniac