Hacker Newsnew | past | comments | ask | show | jobs | submit | janpot's commentslogin

Cool idea. The GitHub link in the top-right corner appears to be broken


Thanks - planning to open source it (at which point the link will work :) until then should probably hide that I guess…


was quite impressed after building my label maker application [1] and stylex playground [2]. Had some real world needs and both were built in bolt with 99% of edits made through prompts. My tips would mostly center around:

- don't try to fix mistakes, revert and try with an updated prompt. the context seems to get polluted otherwise.

- don't treat it as a black box, inspect the generated code and prompt to write specific abstractions. don't just tell it what to build, but also how. this is where experienced programmers will get way more mileage.

[1] https://courageous-toffee-e5dd6f.netlify.app/

[2] https://venerable-melomakarona-255f96.netlify.app/


"640K ought to be enough for anybody"


I wish they took the use-case of resizable panels into account. Even if the implementation is fully user-land, a styleable separator that can also receive events would be so useful.


It's absolutely crazy that the only way to get a native splitter in HTML is to use iframes.


Front end web isn’t my specialty, but I really don’t know why framesets were deprecated. Having resizable panes as a primitive is crazy useful and applicable to several use cases (documentation with a nested tree sidebar comes to mind, for example).

Yeah they were ugly and looked like they came straight out of the Netscape 2.0 era (because they did) but that’s nothing CSS couldn’t have fixed.


Frames and tables were awesome, useful, and simple to learn. While they had their problems, really they just became unfashionable and the result has been a million efforts to replicate what we already had.


This.

At one point people decided that tables are lame.

Iframes on the other hand posed a security issue (cross site scripting) - you have two pages living inside the same window, with possible access and trivial attack vectors like creating a page with one iframe being invisible (1x1px for instance).

But that's just an exception, frontend is really a fashion driven developement and there's often no rhyme or reason to why the mob decides to chose one way over another.


In the "bad old days", tables were abused to build page layouts. There were all sorts of problems with this due to weird rendering rules within table cells and the table itself. Some people piled onto the "omg tables are so bad" fever without properly acknowledging that they are still the best way to display tabular data - their original purpose.


a few days ago, I saw a very old web application that had a f** table inside of a button to center a <IMG> with an icon, with a text.


I can't cite any sources, but I want to say it was a combination of security, state management, and responsive layout that were all a huge headache.


Sounds plausible, but most of those concerns have probably been addressed at this point between the leaps and bounds CSS has made with regards to layout, plus the security work that’s gone into iframes?


what is "native splitter" why do I even want it?


A splitter is the widget that shows two (or more) panes with a divider that you can drag. Commonly used for side bar navigation, see this example: https://codepen.io/Zodiase/pen/qmjyKL

A native splitter is one that is drawn by the browser itself, or even the OS. The only way to get that on the web is with iframes. Otherwise you have to resort to Javascript and manually handling mouse move events as in the example above.

Why do you want that? Same reasons we have `<input>` instead of having every website reimplement text boxes, sliders, checkboxes, etc. with canvas and mouse events.

Sorry I couldn't find an example of an actual iframes website because obviously nobody uses iframes any more.


I believe you mean <frameset>/<frame> rather than <iframe>s, though you used to be able to do frames inside iframes. I’m surprised mobile Safari supports them. Example: https://www.quackit.com/html/templates/frames/frames_example...


Wild! Every browser seems to support <frame> yet it's deprecated: https://caniuse.com/?search=frame


Ah yes you're right! Similar to iframes anyway.

Your example has `noresize` set, but I found one that doesn't: https://www.yourhtmlsource.com/examples/frameset1.html


It's not resizeable on mobile.


Yeah I mean, it was obsolete before the first iPhone so that's not surprising.


It places related content or features of a program alongside or above one another in the same program window so you get all of what you need all right there on the one window. The separate spaces are often resizable, too, so you can fit the content that's important to you however you as the end-user want it. Thus why as another commenter here (izzieto) notes, it's used in almost any application you can think of.


Open any application and you'll see native splitters and their related use cases


Oh this? This isn't a splitter, this is a dialog box.


I don't think that's true. The `resize` rule in CSS can do this.


my dad keeps his calendar in an excel file with almost the exact same format except he omits dates with no entries. Every week he prints a new version of this on a single A4 which he folds and keeps in his wallet. new events are hand written at the bottom and get included in the excel weekly. he's been doing this for as long as I can remember.


I love having the system-of-record being something powerful on a laptop, alongside having some paper artifact with just a small constrained view, which you update with a pencil and then reconcile with the SoR later.

This is what I do for todos and reminders, with a few index cards binder-clipped together with a tiny pen. I use [0]; its size is right but it’s just a ballpoint refill that isn’t particularly great. Using it makes me miss my typical fine-tip gel pens. Anybody else use this kind of system and have a tiny pen to recommend?

[0] https://www.amazon.com/dp/B0776LK634


The Pilot Petit works well and has been reliable.


step one is to stop pretending the market is a democracy


Step two is to stop pretending the market isn't a kakistocracy.


odd, I submitted this a few days ago and it didn't get picked up, not sure why now says "5 hours ago"


That means the mods fiddled with the timestamps,

https://news.ycombinator.com/item?id=26998309


> But these are communications platforms.

They are mostly advertisement platforms coupled to recommendation engines. The "communication platform" is just side business at this point. And it's being used to wave around as "free speech" when anyone dares to question the detrimental effect of the big mass mind control machine it actually is.


Any corporately run platform needs to be financed. In this case it seems the advertising model works best. Many platforms have tried subscription options but people prefer to not pay and become the product.


It's not illogical, but it's not adapted to half the applications it's being used on. That's what's illogical about it. "Document flow", "writing mode", the language used in this post indicates what CSS is meant for, formatting documents on screens. Yet half of us try to beat it into submission building highly interactive applications.


I think this was true for a long time, but now that we have flex, grid, nesting and a wide range of relative units to name a few modern features... the syntax for some of these can be a bit obtuse, but I don't really feel like the language is missing anything I need to lay out an application that adapts to any screen it's presented on.


Even with flex we still don't have a good way to center a list of div's. In fact the intuitive way, `justify-content: center;`, has a hidden foot gun that to this day breaks countless sites on mobile: content overflowing to the left of the parent container is entirely lost, whereas content overflowing to the right is scroll-accessible. And there's no easy fix for this! (Please Cunningham's Law, please...)

I cannot fathom how data-loss by default could ever be considered a logical answer to "hey guys we need need to start from the ground up to come up with a system for arranging elements because the old way was so busted".


Mm yeah you can definitely do it now, but consider the trivial task of putting two independently scrollable pages side by side.

It's actually very fiddly in CSS, whereas with something like Qt or Flutter or whatever it's completely trivial - just add a splitter and then two scrollable views. (And good luck if you want an actual movable splitter with CSS.)

Flexbox makes app-like layout possible, but still not easy.


Agreed. Yet still the CSS spec holds to "a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents."


What about constraints based layout, so it’s not needed to have all these divs nested inside each other?


> what CSS is meant for, formatting documents on screens. Yet half of us try to beat it into submission building highly interactive applications.

I guess everything would be simpler if CSS defined "document" to exclude interactive interface ;)


Feels like there could be a place for a Promise.settled method that mimics Promise.allSettled, but for a single value.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: