Willy-JL / F95Checker

GNU General Public License v3.0
123 stars 20 forks source link

Tab customization + uniform app/extension icons #112

Closed r37r05p3C7 closed 10 months ago

r37r05p3C7 commented 10 months ago

Added new fields to the Tab object: icon and color. And pickers for them in the context popup:

image

Icons are stored as names in the text form because they are sent to the extension along with color and displayed using the same version of the Material Design Webfont as used in the app. In fact, both the extension and the app load the exact same .ttf file.

I also decided to bump the MDI webfont to the latest version. I went through the source, checked for changed or removed icons according to MDI changelog, and the only one that got an update was cloud-arrow. Honestly, the new version looks a bit off, so I swapped it with folder-download.

Old: image

New: image

The webview just wouldn't let me add any new elements to the page header. So, I left it untouched, except for flattening the new JSON response.

Chrome and Firefox extensions received identical changes, they now mirror colors and icons defined in the app:

image

image

And that's it.

Willy-JL commented 10 months ago

Nice! Deffo liking the vibe of this, well done! Need to double check the code still and make sure the db conversion changes are ok, and not 100% sure on the installed icon change, but the rest look great!

Willy-JL commented 10 months ago

Icons are stored as names in the text form because they are sent to the extension along with color and displayed using the same version of the Material Design Webfont as used in the app. In fact, both the extension and the app load the exact same .ttf file.

since its the same ttf file, it doesnt make much sense to store as icon name, and then have a huge css in the webpage to convert icon name to icon character. can just send the actual icon unicode character, and the font will render it the same as it is on the app. thats how icons are stored in the app alreade, only choosing them shows a name.

The webview just wouldn't let me add any new elements to the page header. So, I left it untouched, except for flattening the new JSON response.

yeah the integrated browser is very finnecky, ill get that one sorted out after i tweak the normal extensions as mentioned above.

Chrome and Firefox extensions received identical changes, they now mirror colors and icons defined in the app:

image

image

and yes those look great, well done on the hue too.

I also decided to bump the MDI webfont to the latest version. I went through the source, checked for changed or removed icons according to MDI changelog, and the only one that got an update was cloud-arrow. Honestly, the new version looks a bit off, so I swapped it with folder-download.

Old: image

New: image

ill try to find something more suitable, not a huge fan of the folder one, but it can work if nothing else is available

r37r05p3C7 commented 10 months ago

can just send the actual icon unicode character

omg, can't believe how dumb this massive chunk of css looks in hindsight when it's literally the same characters. and there are like dozens of pointless getattr/replace scattered all over the place doint the "conversions" :clown_face:

and yes those look great, well done on the hue too.

at least i got the box-shadow right, lol, huge css muscles :muscle:

Willy-JL commented 10 months ago

now for the struggle of figuring out the integrated browser loading local fonts lol

also for future reference, i try to keep the extension version in line with the tool version its meant for to avoid confusion. last pr i merged i forgot about that.

Willy-JL commented 10 months ago

problem solved xD

no more bundled font, all done over rpc. also makes sure that in no way could the font in browser show different icons than in the desktop tool

r37r05p3C7 commented 10 months ago

oh wow, just woke up. facecrap was right, you are fast =)

also for future reference, i try to keep the extension version in line with the tool version its meant for to avoid confusion

got it

no more bundled font, all done over rpc

i completely forgot about the entire RPC server we've got running in the background, nice and elegant.

good job :+1:

r37r05p3C7 commented 10 months ago

btw, i think 78db9f4a9a241c0b81b29d7615e9b28389ce6f11 introduced a bug tabs are shown only when filters are applied or search contains characters

maybe this conditional should be: Tab.instances and not (globals.settings.filter_all_tabs and self.filtering) instead?

Willy-JL commented 10 months ago

btw, i think 78db9f4 introduced a bug tabs are shown only when filters are applied or search contains characters

maybe this conditional should be: Tab.instances and not (globals.settings.filter_all_tabs and self.filtering) instead?

You are indeed correct