It's a shame that most of the comments here are just people criticizing web dev frameworks and browsers.
In fact, in games it also happens with the transforms of objects and has been the cause of a number of performance issues during development of AAA games I've been part of.
Last I checked the form additions from HTML5 were still pretty spotty in support, several don't really have a real world use case, and nobody wants to make any more really.
CSS can fix that once good native controls are implemented.
I miss the days when clickable things looked clickable.
We're trying, and we need help: https://open-ui.org/
Come say Hi on Discord, anyone who has written a JS control has input that the project needs.
You can debug one of the most complex softwares in the world (a browser) so effectively you can understand what you did wrong and fix it.
On mobile, as a rule, the second a design transcends things like tables, buttons, and forms is when the “lower level” native APIs start getting broken out.
Wrapped in nice little JS/TS APIs so nobody freaks out, of course.
Having developed custom elements in both web and native, I felt that web was easier and more predictable than native. (For example adding clipping to images on iOS throws away most possible optimisations resulting in abysmal FPS) Of course the “best possible” UI is also slower and worse than what could be done in native.
(Also, on mobile I firmly believe that native is the right way to go with the current tech)
webdev is incredibly flexible by the very nature of "build it yourself", and that's a good thing.
Having performance impact from badly optimized implementation is a testament to this flexibility - what you are saying is akin to "C is bad because i could fk up memory"
It is insane how complicated this is. Then you need to consider the differences between browsers. Ultimately you have to start using a library. And integrate that library with the framework and then hope that the framework won't have a major technical overhaul like Angular or Vue had.
Most of the time you just sit there thinking what will be the best approach and start to get more demotivated the more you dig deeper into it.
It is hard.
CKEditor would have solved most of my issues, but their licensing is absolutely crazy. I'd have to contact them to get an offer to use it for normal internet usage, but if I don't know if it will work, and if the site will be a success, then it simply does not make sense to contact them. 37 USD for 25 users? Or getting a custom contract where I don't know how they will change it in the future? I don't understand what assumptions they have about the usage of their editor, but just embedding it into a blog or something similar, where you don't really know how many users you will have, definitely isn't one of them.
So if I invest my time into learning this upscaling/downscaling issue, which can get complicated with a Vue component, all this in the context of prototyping the entire app, where the primary functionality gained by CKEditor the ability to enable drag and drop (move) of components as if they were pictures, it seems like overkill, since directly manipulating the DOM to move elements appears to be a a much more simple task.
I've made a test wit ondrag, ondrop and what JavasScript has to offer and it mostly works, but there are some small issues which I just can't resolve and don't know if I can resolve them if I invest more time in that direction.
So currently I'm checking out drag and drop libraries, which mostly seem to fit the purpose, but also have issues.
This is what I was getting at with my initial comment, that it's so hard to make these decisions if the outcome of the paths is so unclear. It's all a struggle between decisions and their tests which need to be made.
Assuming CKEditor would solve the issues for me, then the initial cost would still be to high. That would be different with a stable stream of income, but new services usually don't have that.
Free for up to 5 active users per billing period? This would be take 5 users to just check out the service and then that's it for the rest of the month. 37 USD for 25 active users per billing period? Simply not doable for me in the context of a startup.
> What is the minimum length of subscription-based software licenses? 12 months.
That's 444 USD for 288 potential users which wouldn't get charged more than 2 or 3 USD per month.
Run your virtualized browser within any browser.
- browsers have had native text tooltips for at least 20 years
- there are active proposals intended to address richer tooltips and similar use cases
- adding new controls to the web is a complex matter because there are a lot of stakeholders to consider, and a lot of consensus to build among implementers/standards authors
- complaints about missing UI features on the web often overlap with complaints about standards bloat and browser bloat
- this article is rich in technical information that’s applicable more broadly than the tooltip use case, and maybe every single article about anything web on HN doesn’t need to be drowned in generic myopic complaints about the web
HTML was not designed to be dynamic. There are too many redundant feature of HTML/CSS/JS, and honestly I would make everything obsolete and design a new document format with a open binary format.
We're now building applications. Applications have a totally different layout model. Only recently we're able to use flexbox. But it's insane. Just build the layout / application in something that really works (any of platform UI toolkits / markups), and use HTML for document flow.
They get a bad rep, but it's perfectly possible to create something secure, stable, maintainable and performant
It won't be a problem if the tooltip has delayed appearance by 80ms, but it holds the process. So the site will have a 80ms stutter everytime a tooltip appear.
<style>
main:only-child * { /* ... */ }
</style>
<body>
<main>lots of stuff </main>
</body>
When second node is appended to <body> our CSS selector no longer matches so the rule stops being applied and content of the <main> is no longer styled.When there is (next) sibling wrapper present, anything what happens inside it cannot affect the <main> in our example: in CSS there simply is currently no way to target element according it's next sibling inner structure. (There is one for previous sibling: `prev:empty + next {}`: when prev stops being empty, rule stops to match.)
Because you don’t want tooltips to constantly flicker up when moving your mouse around. This should be a user preference setting, like e.g. double-click speed. (It is on Windows for native tooltips, via the registry.)
Fortunately tooltips are pretty easy to make these days. You don't need Javascript at all to make a nice tooltip. But again, it's a tooltip - it's been done so many times before that it'd be nice to have a native browser version.
Tooltips usually are on links. For example here on HN, hover over "11 minutes ago" in the comment header and it shows the time. Could this be made available to mobile users? Seems tricky. My first thought would be to show it when the user taps and holds. But that also triggers the browsers default context menu for links. So it would make a murky experience.
Consider this style rule set which does just what it looks like:
head,
title,
style,
script {
display: block;
} What happened here? The tooltip was attached to the tooltip container and not to the body.
This invalidated a much smaller subtree, which was the tooltip container. The tooltip container
is not visible in the page, so modifying it doesn’t invalidate the complete page render tree.
If the tooltip container would have been visible in the page, then the complete render tree
would be invalidated but in this case only an independent subtree was invalidated.
So the tooltip container needs to be hidden with e.g. `display: none`?The container is an empty div which is not visible, and even after adding children which are not directly visible `inside` this div keeps this container div invisible.
You can check out some examples in https://github.com/mui-org/material-ui/issues/27879
The article is so well-researched otherwise that I'm sure the OP knows the answer to this, but it frustratingly didn't make it into the article itself!
IIRC there were many tutorials in the early days of React that mentioned this.
There is one reason I can see for using canvas based rendering generally[1] and that is if one really really wants to avoid someone from copy-pasting or indexing the page easily[2].
[1]: valid use cases for using canvas exists.
[2]: as someone who has digitized a couple of documents I'd say the effort is just above copy paste (with my tools it is copy, paste, OCR to clipbord, paste, verify)
Also OCR is a solved problem if we ban any form of display/script font types.
Hint: It’s J A N K Y
That step seems unrelated
Look up “composting”.
I was just joking, the article is excellent.
Glad all that knowledge is useful in different contexts though.
Did anybody get Popper to work as an ES6 module? I tried for a while and gave up.
Some websites don't even have text accompanying their unintuitive but kewl looking icons.
The future is now, old timers!
Some other major electron apps are pretty OK.