TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Triptych Proposals

250 点作者 felipemesquita5 个月前

13 条评论

alexpetros5 个月前
Co-author here! I&#x27;ll let the proposal mostly speak for itself but one recurring question it doesn&#x27;t answer is: &quot;how likely is any of this to happen?&quot;<p>My answer is: I&#x27;m pretty optimistic! The people on WHATWG have been responsive and offered great feedback. These things take a long time but we&#x27;re making steady progress so far, and the webpage linked here will have all the status updates. So, stay tuned.
评论 #42625217 未加载
评论 #42619096 未加载
评论 #42623853 未加载
divbzero5 个月前
When I was reading “The future of htmx” blog post which is also being discussed on HN [1], the “htmx is the new jQuery” idea jumped out at me. Given that jQuery has been gradually replaced by native JavaScript [2], I wondered what web development could look like if htmx is gradually replaced by native HTML.<p>Triptych could be it, and it’s particularly interesting that it’s being championed by the htmx developers.<p>[1]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42613221">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=42613221</a><p>[2]: <a href="https:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;</a>
评论 #42625695 未加载
recursivedoubts5 个月前
this is a set of proposals by Alex Petros, in the htmx team, to move some of the ideas of htmx into the HTML spec. He has begun work on the first proposal, allowing HTML to access PUT, DELETE, etc.<p><a href="https:&#x2F;&#x2F;alexanderpetros.com&#x2F;triptych&#x2F;form-http-methods" rel="nofollow">https:&#x2F;&#x2F;alexanderpetros.com&#x2F;triptych&#x2F;form-http-methods</a><p>This is going to be a long term effort, but Alex has the stubbornness to see it through.
评论 #42623279 未加载
emmanueloga_5 个月前
In the meanwhile, I found that enabling page transitions is a progressive enhancement tweak that can go a long way in making HTML replacement unnecessary in a lot of cases.<p>1) Add this to your css:<p><pre><code> @view-transition { navigation: auto; } </code></pre> 2) Profit.<p>Well, not so fast haha. There are a few details that you should know [1].<p>* Firefox has not implemented this yet but it seems likey they are working on it.<p>* All your static assets need to be properly cached to make the best use of the browser cache.<p>Also, prefetching <i>some</i> links on hover, like those on a navbar, is helpful.<p>Add a css class &quot;prefetch&quot; to the links you want to prefetch, then use something like this:<p><pre><code> document.addEventListener(&quot;mouseover&quot;, ({target}) =&gt; { if (target.tagName !== &quot;A&quot; || !target.classList.contains(&quot;prefetch&quot;)) return; target.classList.remove(&quot;prefetch&quot;); const linkElement = document.createElement(&quot;link&quot;); linkElement.rel = &quot;prefetch&quot;; linkElement.href = target.getAttribute(&quot;href&quot;); document.head.appendChild(linkElement); }) </code></pre> There&#x27;s more work on prefetching&#x2F;prerendering going on but it is a lil green (experimental) at the moment [2].<p>--<p>1: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@view-transition" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;@view-trans...</a><p>2: <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Speculation_Rules_API#specifications" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;API&#x2F;Speculation...</a>
评论 #42619460 未加载
Devasta5 个月前
Its genuinely incredible that we are more than 20 years since the takeover of HTML from the W3C and there isn&#x27;t anything in the browser approaching even one tenth of the capability of XForms.<p>I wish the people behind this initiative luck and hope they succeed but I don&#x27;t think it&#x27;ll go anywhere; the browser devs gave up on HTML years ago, JavaScript is the primary language of the web.
tinthedev5 个月前
It looks wonderful, but the adoption will be a thoroughly uphill battle. Be it from browsers, be it from designs and implementations on the web.<p>I&#x27;ll be first in line to try it out if it ever materializes, though!
ttymck5 个月前
Looks really pragmatic and I&#x27;d be glad to see this succeed.<p>Is anyone able to credibly comment on the likelihood that these make it into the standard, and what the timeline might look like?
评论 #42616292 未加载
KronisLV5 个月前
Good luck!<p>The partial page replacement in particular sounds like it might be really interesting and useful to have as a feature of HTML, though ofc more details will emerge with time.<p>Unless it ended up like PrimeFaces&#x2F;JSF where more often than not you have to finagle some reference to a particular table row in a larger component tree, inside of an update attribute for some AJAX action and still spend an hour or two debugging why nothing works.
Dan425 个月前
No, please, just no.<p>The idea of using PUT, DELETE, or PATCH here is entirely misguided. Maybe it was a good idea, but history has gone in a different direction so now it&#x27;s irrelevant. About 20 years ago, Firefox attempted to add PUT and DELETE support to the &lt;form&gt; element, only to roll it back. Why? Because the semantics of PUT and DELETE are not consistently implemented across all layers of the HTTP infrastructure—proxies, caches, and intermediary systems. This inconsistency led to unpredictable failures, varying by website, network, and the specific proxy or caching software in use.<p>The <i>reality</i> we live in, shaped by decades of organic evolution, is that only GET and POST are universally supported across all layers of internet infrastructure.<p>Take a cue from the WHATWG HTML5 approach: create your RFC based on what is already the de facto standard: GET is for reading, and POST is for writing. The entire internet infrastructure operates on these semantics, with little to no consideration for other HTTP verbs. Trying to push a theoretically &quot;correct&quot; standard ignores this reality and, as people jump into the hype train, will consume significant time and resources across the industry without delivering proportional value. It&#x27;s going to be XHTML all over again, it&#x27;s going to be IPv6 all over again.<p>Please let&#x27;s just use what already works. GET for reading, POST for writing. That’s all we need to define transport behavior. Any further differentiation—like what <i>kind</i> of read or write—is application-specific and should be decided by the endpoints themselves.<p>Even the &lt;form&gt; element’s &quot;action&quot; attribute is built for this simplicity. For example, if your resource is &#x2F;tea&#x2F;genmaicha&#x2F;, you could use &lt;form method=&quot;post&quot; action=&quot;brew&quot;&gt;. Voilà, relative URLs in action! This approach is powerful, practical, and aligned with the infrastructure we already rely on.<p>Let’s not overcomplicate things for the sake of theoretical perfection. KISS.
评论 #42631343 未加载
mg5 个月前
What is the upside of<p><pre><code> &lt;button action=&quot;&#x2F;users&#x2F;354&quot; method=&quot;DELETE&quot;&gt;&lt;&#x2F;button&gt; </code></pre> over<p><pre><code> &lt;button action=&quot;&#x2F;users&#x2F;delete?id=354&quot;&gt;&lt;&#x2F;button&gt; ?</code></pre>
评论 #42616504 未加载
评论 #42620044 未加载
评论 #42616791 未加载
评论 #42623346 未加载
评论 #42616301 未加载
评论 #42616272 未加载
andrewflnr5 个月前
&gt; giving buttons to ability<p>Might want to fix that. :)
评论 #42617601 未加载
netcraft5 个月前
I love these. Its the things we&#x27;ve been doing (or attempting to do) with our web pages for decades. I&#x27;ve written tons of jquery to do these exact things, lots of react code as well.<p>I think its an uphill battle, but I am hopeful.
motoboi5 个月前
JSON rest api are just hypermedia rest api but with the data compressed. The compression format is json and the dictionary are the hypermedia relations previously passed in the client.<p>It’s 2025, the client don’t need to be generic and able to surf and discover the internet like it’s 2005.<p>The database is consumed via APIS distributed in two parts: first the client (a lib), second the data: json.
评论 #42616324 未加载
评论 #42616807 未加载
评论 #42617301 未加载