Skip to content

Tab customization + uniform app/extension icons#112

Merged
WillyJL merged 27 commits intoWillyJL:mainfrom
r37r05p3C7:bridging-icons
Jan 29, 2024
Merged

Tab customization + uniform app/extension icons#112
WillyJL merged 27 commits intoWillyJL:mainfrom
r37r05p3C7:bridging-icons

Conversation

@r37r05p3C7
Copy link
Copy Markdown
Contributor

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.

@WillyJL
Copy link
Copy Markdown
Owner

WillyJL commented Jan 28, 2024

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!

@WillyJL
Copy link
Copy Markdown
Owner

WillyJL commented Jan 28, 2024

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
Copy link
Copy Markdown
Contributor Author

r37r05p3C7 commented Jan 29, 2024

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" 🤡

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

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

@WillyJL
Copy link
Copy Markdown
Owner

WillyJL commented Jan 29, 2024

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.

@WillyJL
Copy link
Copy Markdown
Owner

WillyJL commented Jan 29, 2024

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

@WillyJL WillyJL merged commit 1d1ea76 into WillyJL:main Jan 29, 2024
@r37r05p3C7 r37r05p3C7 deleted the bridging-icons branch January 29, 2024 14:35
@r37r05p3C7
Copy link
Copy Markdown
Contributor Author

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 👍

@r37r05p3C7
Copy link
Copy Markdown
Contributor Author

r37r05p3C7 commented Jan 29, 2024

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?

@WillyJL
Copy link
Copy Markdown
Owner

WillyJL commented Jan 29, 2024

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

@WillyJL WillyJL mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants