2 ms·
I've inherited a pretty bad codebase written in PHP and JS, mostly Dojo. Its UX is based around a lot of dialog windows. Some dialog windows' contents are too b
by Cthulhu_ 5y ago
I've inherited a pretty bad codebase written in PHP and JS, mostly Dojo. Its UX is based around a lot of dialog windows. Some dialog windows' contents are too big, so that a scroll bar would appear. One issue they had before I came in was that in those cases, the save and close buttons in a bar at the bottom of the dialog would also end up at the bottom, so they had to scroll all the way down.
This issue had been open for years. IDK if the previous developer had a look at it, but the interim guy - some PHP consultant - spent a few days trying to fix it.
I added `position:sticky` to it and fixed it in minutes, everywhere. Not to boast or anything, but that's all it took. Okay fine I am boasting that my google-fu was slightly better than the other guys.
Didn't know about the `loading=lazy` attribute on images yet, mentally I was still thinking of plugins and JS libraries that take care of it for you.
- specialist 5y agoPretty cool. Nothing beats reading the docs, being curious. Weird notion: Is there a FindBugs for HTML, CSS, JavaScript? Such a tool might have to analyze the live DOM, with the actual behavior, to infer what's actually happening, to better suggest refactorings. https://en.wikipedia.org/wiki/FindBugs https://en.wikipedia.org/wiki/FindBugs