overture
wa-automate-nodejs
overture | wa-automate-nodejs | |
---|---|---|
3 | 5 | |
708 | 3,020 | |
0.3% | 0.4% | |
7.9 | 8.7 | |
24 days ago | 11 days ago | |
JavaScript | TypeScript | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
overture
-
CSS lengths in Gecko are limited to 17,895,697 pixels (2010)
Fastmail shows lists of messages using a progressively-loaded list, where each item is of a consistent height (88px for me, but it can be a few other values too, depending on your configurationâI think 51px is the default). This means that the scrollbar is real and accurate, and you can seek to any point in your mailbox easily (provided your platform allows interacting with the scrollbar, which largely means âon desktop platformsâ). But this does cause problems for very large mailboxes, because browsers only support finite lengths.
A few years back, while I worked at Fastmail, we had a ticket come in from an IE user that they could suddenly only access the first few messages in their mailbox. Trouble was theyâd gone over IEâs limit, and IE just ignored the entire height declaration in that case, and so you ended up with only the initially-rendered list items available.
The limits I found:
⢠Firefox: ignores declarations that resolve to a value higher than 17,895,697 pixels (which is a bit more than 2²â´).
⢠IE: ignores declarations that resolve to a value equal to or higher than 10,737,418.23 pixels (2Âłâ° â 1 hundredth pixels).
⢠WebKit: clamps values somewhere around 2²⾠(~33,554,432) pixels; clamping means you donât need to worry about it so much, since that was the best workaround in other browsers anyway.
And so we ended up with the workaround code at https://github.com/fastmail/overture/blob/41cdf36f3e7c8f0dd1... (the Firefox check was of much older vintage, I just added the IE case). (Nowadays, the IE part is gone again because IE is gone, hooray!)
So yeah, it actually only took about 200,000 messages in the list to hit this limit and fall over, or subsequently just make the bottom of the mailbox inaccessible. 200,000 messages in one mailbox is uncommon, but not at all unrealistic, especially in an âAll mailâ sort of mailbox.
-
Defensive CSS
One uncommon place where clipping is justified at the design level: lazy-loading but finite lists. Iâll use Fastmailâs webmail (on which I worked a few years back) as an example. I could load a list of a hundred thousand emails, and each message in the list is 88px tall (containing four lines of textâapproximately, sender and date, subject, and two lines of preview, with truncation on each), so the list container is made to be 8,800,000 pixels highš, and I can use its scrollbar to immediately jump to any place, and it will figure out which messages to fetch and render based on the scroll position. If the subject line were wrapped, which would be nice at times, youâd lose this ability: youâd have to guess the approximate height of each element, and your scroll positions will be imprecise and youâll have to make messy adjustments from time to time. Overall it generally wonât be too bad so long as thereâs not too much variation in them, but itâs definitely still inferior.
š Browser do have limits on how large you can make containers, and handle excess in different ways. IE had the lowest threshold of failure at around ten million pixels, beyond which point it would ignore values; the workaround I implemented in https://github.com/fastmail/overture/commit/8d01c74d8c5d4ae0... came as a direct result of a customer reporting that scrolling was broken in IE in their mailbox with a couple of hundred thousand emails. Firefox breaks a little after 2²ⴠpixels, also ignoring values, so itâs still covered in https://github.com/fastmail/overture/blob/0c9828a5b77ad14383... (note the IE stuff is gone because IE is dead! :-) ). Chrome accepts larger values, but clamps them to about 2²⾠pixels.
-
Server-Sent Events: the alternative to WebSockets you should be using
It is, however, interesting to note that Fastmailâs webmail doesnât use EventSource, but instead implements it atop fetch or XMLHttpRequest. An implementation atop XMLHttpRequest was required in the past because of IE, but it still deliberately doesnât use EventSource; my foggy recollection from a few years ago is that it had to do with control over timeout/disconnect/reconnect, and handling Last-Event-ID, plus maybe skipping browser bugs in some older (now positively ancient and definitely unsupported) browsers. The source for that stuff is the three *EventSource.js files in https://github.com/fastmail/overture/tree/master/source/io.
wa-automate-nodejs
- H+DNH License 1.1
- Bot de Menu Whatsapp
-
Server-Sent Events: the alternative to WebSockets you should be using
Love your hybrid model via gumroad! I do something similar for my own open-source project
https://github.com/open-wa/wa-automate-nodejs
There should be some sort of support group for those of us trying to monetize (sans donations) our open source projects!
-
How can I create a bot to respond to the most asked questions?
if you can program in Node.js, or have an basic knowledge of javascript or are motivated to learn Node.js, then I would recommend looking at https://github.com/open-wa/wa-automate-nodejs
-
Open source projects should run office hours
You can use a platform like otechie. There people are required to put in their card details before starting a conversation. This is what I do with open-wa (https://github.com/open-wa/wa-automate-nodejs#support)
Because I sell license keys to unlock features, it allows me to provide generalized support and quick bug fixes via the discord. If people need help with integration in their specific code base then that's when I ask them to go through the "consulting route" - if it's quick they use otechie. If it's more involved (1+ days) then we work out a contract arrangement.
I hardly get any clients through these means but it does put a clear value on my time which results in the community appreciating the time and effort into the project and the real time support (via discord).
What are some alternatives?
FiraCode - Free monospaced font with programming ligatures
whatsapp-web.js - A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
dom-examples - Code examples that accompany various MDN DOM and Web API documentation pages
whatsapp-node-api - A Simple NodeJS API Wrapper for WhatsApp
hasses
venom - Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
markwhen - Make a cascading timeline from markdown-like text. Supports simple American/European date styles, ISO8601, images, links, locations, and more.
whatsapp-framework - âď¸Whatsapp python api
rsocket-java - Java implementation of RSocket
jam
stable-socket - A web socket that reconnects.