xel icon indicating copy to clipboard operation
xel copied to clipboard

[Feature request] Tauri support

Open KaKi87 opened this issue 2 years ago • 10 comments

Hello,

Tauri is an Electron alternative that uses different engines depending on operating system :

Since it is lighter weight and less memory-consuming, it would be nice for Xel to support it.

Thanks !

KaKi87 avatar Jul 31 '22 09:07 KaKi87

@KaKi87 I think this is impossible for now by just reading the FAQ on documentation site, where are listed all platforms supported: WebKit isn't for now and you can currently use only with Windows (I don't know if WebKitGTK is supported, but I don't think since it's built on top of WebKit).

Anyway, maybe the Xel developer decide to bring it also on WebKit...

Bellisario avatar Jul 31 '22 09:07 Bellisario

I would like to support WebKit at some point in future, currently there is at least one important API (Constructable Stylesheets) missing.

jarek-foksa avatar Aug 01 '22 18:08 jarek-foksa

That's only needed for the meta tags, right ?

KaKi87 avatar Aug 02 '22 10:08 KaKi87

Constructable Stylesheets and adoptedStyleSheets APIs are needed for dynamic theme switching, no matter whether you use meta tags or JS API.

jarek-foksa avatar Aug 02 '22 10:08 jarek-foksa

I didn't know there was a JS API, where did I miss it ?

But yes, I guessed that meta tags would be watched by JS to dynamically switch themes.

So, if dynamic switching is the only feature that require those APIs, everything else can still work using CSS imports, right ?

KaKi87 avatar Aug 02 '22 11:08 KaKi87

Actually, dynamic theme switching could be implemented without these APIs (as it was done in earlier versions of Xel), but it would be much slower.

jarek-foksa avatar Aug 02 '22 13:08 jarek-foksa

The JS API for theme switching is not currently documented, you can use it like this:

import Xel from "/node_modules/xel/xel.js";
Xel.theme = "/themes/adwaita.css";

jarek-foksa avatar Aug 02 '22 13:08 jarek-foksa

What about allowing usage of Xel even when dynamic switching is unavailable ? Especially when using a JS framework, we don't necessarily need Xel to handle that. Most multi-theme CSS framework don't and it's fine.

KaKi87 avatar Aug 02 '22 13:08 KaKi87

It would still require many adjustments. I would rather prefer to wait for Apple to implement the missing APIs or write a polyfill for them.

jarek-foksa avatar Aug 02 '22 15:08 jarek-foksa

Alright, then I'll be waiting for either to happen, to release my Tauri app on Linux.

KaKi87 avatar Aug 02 '22 16:08 KaKi87