UI module for bootstrapped extensions

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

UI module for bootstrapped extensions

Unread post by vannilla » 2018-11-03, 18:07

After dealing with UI on a bootstrapped extension (to which I thank JustOff for the resources), I thought that it doesn't really makes sense for developers to look around the web in the hope of finding some documentation or an example, and neither does when developers have to duplicate whatever code they managed to write in each and every extension they write.
Thus, I wrote a javascript module, based on JustOff's extension from which I learnt how to deal with UI (https://github.com/JustOff/greedy-cache), to deal with UI without headaches.
My goal is to get it into the browser's core, so developers can simply do a Components.utils.import() without worrying about making sure they have the module inside the XPI, but if that's not possible I'd like to get some advertising so people will find it.
Attached is a zip with the module (a single jsm file) and a very simple documentation written in HTML.
Please review, comment, etc it. Thanks.
Attachments
applyui.zip
(3.22 KiB) Downloaded 23 times

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: UI module for bootstrapped extensions

Unread post by Moonchild » 2018-11-03, 19:16

We won't be integrating that into the browser core. That's basically asking to do custom Jetpack.
What you'd want to do is offer your module up to extension developers directly. There are plenty of channels available to do so.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

yami_

Re: UI module for bootstrapped extensions

Unread post by yami_ » 2018-11-03, 20:52

Maybe you could post it on the wiki?

JustOff

Re: UI module for bootstrapped extensions

Unread post by JustOff » 2018-11-03, 22:20

Sorry, but I do not like the proposed level of abstraction. I believe that developers should handle such tasks directly or using their own libraries, and not rely on the additional high-level API, because it will inevitably be incomplete or not optimal, like the Jetpack mentioned above.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: UI module for bootstrapped extensions

Unread post by vannilla » 2018-11-04, 00:41

Of course wether or not it goes to core is up to the core developers, so I won't push this matter at all.

From what I could gather on Jetpack, it's more than just a high-level abstraction as it offers a whole development environment.
I just give a very thin layer (it's just a listener) while leaving to developers the actual UI and interaction, so I'm not sure how Jetpack-y this is.
Also since I never used Jetpack. It's hard making a comparison like that.
If possible, I'd like some insights.

I don't really know any channel where people might be interested in what essentially is something for Pale Moon/UXP, so I don't know where to go.
I don't really visit many websites myself, and the only place I know where browser extensions are discussed is this forum.

I'm not sure if I can edit the wiki. If I can actually do it, I'll write a page.

Locked