-
Notifications
You must be signed in to change notification settings - Fork 305
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
One UI PR to rule them all #517
base: master
Are you sure you want to change the base?
Conversation
Gonna take a while to figure out all the other edited files.
Optional popup icon UI with optional style name click actions, and light gray default theme combined. I wanted to tweak the theme to incorporate tophf's suggestions, mainly using semi-transparency wherever possible for userstyle compatibility, and leaving a lot of the text/icon contrast alone, particularly in the manager. I also decided to convert all our colors to effing variables. If I hadn't underestimated what a PITA that was gonna be, I never would've started, but I think it's pretty complete. This involved a ton of text replace and manual editing without double checking every single edit individually, so it'll need to be tested thoroughly. I wouldn't be surprised if I missed some altogether either. To make it even more userstyle friendly, I incorporated some common Variables leave the door open for implementing a color slider for the UI, which would make the effort worthwhile. Otherwise, they'll make userstyles easier, and adding new elements simpler for us in the future by just adding the common selector. I also monkey-patched the highlighting bug. In the default "token under cursor" regular highlighting interfered with "find" highlighting. In "selection only" regular highlighting didn't work at all. I always had it disabled, so I never noticed, but neither the JS nor the accompanying CSS made any sense or worked together. AFAICT, highlighting has never worked correctly since One of the main goals of The condition is
Pretty much works in "token under cursor", but the default highlighting CSS still interfered with "find" highlighting. The condition doesn't work at all for "selection only", and the CSS makes even less sense since it relies on the
Anyway, I had no luck fixing the condition, so the monkey-patch was to fix "selection only" by leaving it excluded from the animation and fixing the CSS to not rely on the Everything works now, but we should really fix the condition so "selection only" can also have transitions which are optimized. They're a nice touch. |
Testing it briefly, I don't think I forgot any files, but I'm guessing something in @Mottie @eight04 Both of you are welcome to fix/improve whatever in this PR. |
Took a little break, but leaving it broken was bugging me. Think I resolved all the conflicts. |
Didn't even occur to me that I'd need to check the html diffs, but I did. Everything appears to be working now. |
Just a quick skim:
|
What does one have to do with the other? If you're saying you're planning on screwing up something major in this PR, then that's a bad idea because I'm not doing it a third time. If you're not gonna cause major conflicts, then what does it matter? There's no big rush.
I started working on this a couple months ago.
Again, who cares? They needed to be styled correctly, and I was restyling the UI.
I strongly disagree when it comes to the |
--main-bg: hsl(0, 0%, 90%); | ||
--gray-lightness-92: hsl(0, 0%, 92%); | ||
--gray-lightness-93: hsl(0, 0%, 93%); | ||
--gray-lightness-95: hsl(0, 0%, 95%); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need 26 levels of gray? I think a bunch of these could be combined.
Also I don't think "normal" humans can discern the differences in alpha channel between .05
. .06
, .07
and .1
. Can we combine these as well? I think every 10% is okay, but not anything less than 5%.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.06
makes a difference when stacked on top of another to achieve a combination shade. There's also a very discernible difference between .05
and .07
on elements like zebra-striping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually did combine quite a few shades of gray. You could probably eliminate at least a few more, but when you're converting the massive volume of values, you can't really go hunting for every element to check if a slightly different shade is detrimental.
If the PR is small, we can review and merge it faster. Also, it is a good idea to focus on one thing in one PR.
The preference system is refactored and |
Removing If it's just a matter of putting this PR off for a bit because it's less essential, that's NBD. As far as there being some urgency to merge a highlight fix, it's been broken for almost a year and no one has even reported it. Since that's the case, "reviewing and merging it faster" doesn't really feel that important. Like I said, it's probably because power users use themes which override the bugs in the default. You're welcome to separate and merge the monkey-patch as it is. It's just the |
I opted to hide the entire block if you choose to find styles inline. I also fixed all the other issues I mentioned above. |
I doubt it's used much, but it does serve a purpose. More importantly, it's consistent and looks nicer remaining where it belongs when you scroll back up. I'd much rather change it back the way it was. Still a bunch of cosmetic issues with icons and their surrounding elements in terms of sizes, padding, and positioning. I can hook this stuff up today or sometime soon. Not like we're rushing with this PR. |
I cleaned up those cosmetic issues, and a couple bugs from changes I forgot to incorporate when combining PRs. @Mottie Regarding the wiki icon, I didn't like the look of two circle icons right next to each other. I made a square info icon that's fairly decent. I preferred the "W", but using a "Wikipedia" icon for "wiki" seems to bug you, so I tried to come up with something else. |
I think I fixed usercss applies-to theme detection decently. It ignores the default CM theme since it's already overridden with light gray and more detailed styling. @eight04 I'm guessing you wrote it to begin with. It hasn't been updated to include add/subtract icon styling. I added the bg color to @Mottie either of you guys are welcome to tweak the condition if there's a better way to do it. Seems to work fine though. |
@Mottie regarding the thumbs-up icon for "OK", I looked at a bunch and that was actually the least shitty. It's a Github icon. You're welcome to try to find a better icon if you want. |
@narcolepticinsomniac Removing the style completely doesn't really work. The widget would try to extract colors from the editor gutter so it can make sure that the color of the text/border/background will match the editor theme. After deleting the style entirely, you can see that the background of the applies-to-widget is now brighter than the editor gutter. TBH, I don't like the new theme after trying it. Everything is grey and lack of contrast. Icons in the popup are confusing, you don't know what they do until hovering on them and looking into the tooltip. You can't tell if they are clickable since they are all grey. In the manager, since the entire page is already "shadowed" by grey, the box-shadow between two areas becomes obscure and lack of effect. Here are some screenshots: I didn't follow previous PRs. Why do we want to make the entire interface grey? |
Of course it does.
All styling for the default is styled via
Layouts are optional, simply switch back to the classic UI if you prefer it. One of the most consisitent complaints is that the UI is ugly, and when it comes to the popup, I agree. The majority of users interact with the popup more than anything else, and all the actions being unpredictable length strings inside links and buttons is a messy waste of space.
Same with pretty much any icon-heavy layout. There's a handful of new, main icons. They all seem very obvious to me, but even if they weren't, there are tooltips. If you prefer the look, how long would it take you to remember what a handful of icons do?
They're all clickable, except for the "write-style-for", which is just an indicator for the adjacent action, but it does have a useful, and more descriptive tooltip, so while not exactly an action, it does serve a purpose other than just being a text replacement.
Everything gray and lower contrast was the goal. Last time I asked the peanut gallery for opinions, 90% preferred the default theme to be light gray over bright white. We can ask again, but I suspect the results will be similar.
Really? |
Just a note Narco I make my clickable icons sort of flash on mouseover that or i give them a slick twist or lift maybe that is something you might like and maybe i could help you separate the menu from the whole ui so it is its own option? i know the new one will look better than the default but i would like to separate simply the icons from ui in favor of the buttons. Just a thought or two. Thanks |
There are two prefs for the pop UI in options. Buttons or icons, and style name click action, toggle or edit. If you select buttons and toggle, the layout is exactly as it's always been, or you can to mix and match the two, same as I told you the other day. No doubt some will prefer the classic, that's why it's still there.
They change to black, the cursor changes to a pointer, and the tooltip tells you the action. That's as obvious as any icon layout. Should we add a keyframe to make them dance around?
I would enjoy putting you to work. Unfortunately, as usual, I have no idea what you're even talking about here. =) |
00eadf6
to
7963a3a
Compare
Probably best to load fresh. Whoever tests first can tell me how broken it is. I'm sure I forgot a file somewhere, but my local copy works. =)