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
Allow multiple border colors to display on post thumbnails #1316
Comments
This would be more consistent and even more convenient in some cases, true. But at the same time it would create additional problems when viewing multiple deleted posts that are linked. If parent post is deleted as well as (part of) its child posts, then you won't be able to tell which post is the parent without manually checking all of them. |
That's true. It would be better if it somehow displayed all applicable borders instead of just one. |
We have parent, child, and one of deleted/flagged/pending (can pending posts be flagged?). We need the power set of those three groups. Use the CSS styles border-right, border-left, border-top, and border-bottom. If all three groups, give deleted/flagged/pending two sides. If two groups, give two sides to each. |
not possible in the web, at least for basic members and builders. but i was able to flag a pending post through api post #1396914 |
Are there selectors for combination of classes? If not, we'd have to involve some "!important" magic to properly override those. |
I tried doing this with I think that a better way of doing it may be to use the combined class selectors like |
Instead of dividing the border into differently colored sections, it would be better to be able to display more than one border at a time. One around the other. |
@MyrMindservant I think you would need to create pseudo-elements around each thumbnail, one for each border, and apply the borders to those. |
Another possible solution would be to have multiple colours in a single border, but that probably will need to involve a bit of javascript hacking and using css gradients |
@kotarou3 ...incidentally, it seems that status classes are applied through javascript. I have to wonder why. UPD: that's how "flagged image with children" would look like with divided borders: |
Divided borders looks decent. I feel like this trying to push too much information into borders though, it becomes somewhat messy on color images (like, when the image itself already has a border - red_border). Perhaps it would be easier on the eyes if the border was 1-2px thicker. Edge case for divided borders: the sides on wide_image, are very short, it would become hard to see. same for tall_image. The css for divided borders could be done like this (untested);
While deleted/pending/flagged gets:
Ps. span is a inline element, it won't properly wrap around a block element like img. |
That did happen, but it appears they were added back. Though I didn't even realize this until earlier today, and I haven't a clue when it actually happened. |
Even if it's only 4 pixels on each side, that would add up to be quite a bit for all previews combined for users with many posts per page. On my screen, it loses me a column of posts. |
Well, there's also an option to resize IMG element instead, but that could turn out to be hack-ish. |
There are other options besides borders. Perhaps a small icon could be overlayed on top of the image, at least for some statuses. |
i think this is a decent idea, but would it require recreating the thumbnail every time the status/relationship changes? how about superimposing text/icon/small image on mouse hover? |
That's what i meant. It would be more CSS/JS code however. |
Also, is there really a need to apply borders with javascript? We can do it directly in post presenter. |
Was it actually added back, or "there exist posts with both parent/child"? I remember reading posts with both parent & child were because of a bug. If there are only 2 possible combinations - (parent|child).(pending|flagged|deleted) - then i think Divided borders + 1-2px padding looks best so far. This css also works (tested), without !important - http://pastebin.com/xnxZR1YD
Less work for the server? |
At first, it was made impossible to add a post to a grandchild-like relationship, but the existing ones weren't removed. But currently, you can add new ones again, is what I meant. In other words, the original D1 behavior has been restored. Which is probably a good thing, as I was repeatedly running into issues due to that change. |
The grandfathering change was reverted because you couldn't update posts with grandfathers. It was just annoying to deal with and I didn't think the advantages outweighed the disadvantages. |
somewhat a modification of suggestions above, how about we replace the borders entirely of small squares maybe 4x as thick as the current border, aligned to the right, and below the post? the parent/child and status (flagged, deleted, pending) will be represented by one square each inline below the post, maybe 1 or 2 pixel/s apart, just enough space to distinguish one from the other. this will eliminate superimposing the symbols on the thumbnails and offers more visibility. this will also easily show the relationships on extremely long or wide posts whose thumbnails are almost 1 pixel in one dimension as the relationships have enough breathing space no matter what the thumbnail looks like. it can also accommodate future statuses in case we think of something new as the one inline section below the post is long enough (horizontally). maybe we can set a new color for banned posts? and personally, i think it's more economical and not overcrowding the thumbnails with much information as the statuses and relationships are concentrated in one location. additionally, the current max squares i can think of the moment is only three: a post can both be a parent and a child, and either of flagged, pending, or deleted. the order of precedence will also not be an issue, i think, because it doesn't matter which one comes first unlike the borders. |
I had some ideas with squares too, but your suggestion seems more decent. A few corrections/suggestions, though:
I'll try to implement it now and provide some screenshots. |
Okay, here's what I got: http://puu.sh/2HAXw.png |
I think that could work. But maybe it would be more visually appealing if we used icons instead of solid blocks? Example. (Icons arbitrarily chosen from the JQuery UI set) Although they're a bit difficult to notice in my image, so the colors or sizes would need tweaking. |
Icons would be nice, but they would take up more space to be equally visible. How about placing a white letter in the blocks? "C" for child ("this post is a child" mouseover) - P for parent/pending - etc. For visibly issues, we can always make the blocks/icons wider, plenty of space. |
I don't like that solution. In my opinion it adds visual clutter for something most users don't care about. Can you just make it a userscript? |
Here's how a version with icon overlays could look like: Code and CSS available for tinkering via my userscript if anyone's interested. Tweak must be enabled first. |
uhm, how about we still maintain the borders with statuses have higher precedence (flagged, deleted, pending; arranged from highest to lowest) over relationships? relationships in turn, a child post has higher precedence over the parent. with this, there will be only one border color or none at all for a particular post. then, how about we utilize the suggestions to use solid block squares or fancy icons on mouse over? with this, the results page will not be too intimidating, only when the user points to it? as the default site behavior? and how about enable the icons/squares to appear in all posts on a results page via a userscript? |
I like the idea of keeping the borders and using mouseover. I extended that idea and now exclude the status that's already shown by the border from the list of icons. A pending child post will have the "pending" border and a "child post" icon. This keeps the visual effects down because not too many posts have two or more statuses of interest, but it still shows all information.
I figured out the following priority order for borders. Please correct me if I got it wrong. Userscript updated to try it out.
Sorry, I'm not sure what you're suggesting. Disabling the mouseover effect via a userscript to show all icons? My version uses CSS hover, so you could just add this as custom CSS to always show all icons: .post-preview span.status-icon-overlay { visibility:visible !important; } |
ah, i was suggesting that the default site behavior should adapt the suggestions above of using borders and solid squares/icons on mouse hover. personally, i find them a really nice feature for d2. the userscript should be, yes, able to display all icons on all posts on the results page. maybe it will be better in a custom css instead? the user modified userscript or css can alter the default site behavior like the squares/icons position (e.g. center, above, right, bottom, superimposed or combinations); the order of precedence of borders; disabling the hover effect; etc. |
Icons and mouseovers and blocks oh my. Miscellaneous Tweaks is just going to go the Quite a lively discussion here. |
Went with RaisingK's suggestion of using different border colors for different sides. We might want to do something else with them later, but for now this solves the issue at hand. And credits to @RaisingK for his script, which I heavily based the code on. |
I thought it might look better the other way, but don't feel too strongly about it. Any other opinions before I change it? |
(Former title: "Allow black deleted post border to take precedence over green parent border")
It already takes precedence over the child border, so this would be more consistent.
The text was updated successfully, but these errors were encountered: