AI 资讯
Setting Up a Controlled Component
Prologue A while ago, I decided to develop a fully accessible main navigation component in React and write a series of articles documenting the steps it took to create a non-trivial accessible component. In my last development article , I finally completed the requirements for delivering an uncontrolled navigation component with a horizontal layout; with full keyboard functionality, along with adding the niceties of closing sublists when lists are closed and making sure any open sublist on the top row closes when focus shifts away from it. Rather than write an entirely new component for a mobile version, I'm going to modify the existing code. This first article outlines the steps necessary to set up and work with a controlled component. -— Note : This article is one of a series demonstrating building a React navigational component from scratch while considering accessibility through the process. The articles are accompanied by a GitHub repository with releases tied to one or more articles; each builds on the previous one until a fully implemented navigation component is complete. Each release and its associated tag contain fully runnable code for the article. The code discussed in this article is available in the release. and may be downloaded at release 1.0.0 . Links in the article will take you to the proper file in the tagged GitHub Repository. Because the code for this release is scattered across components, line numbers are added to make it easier to locate in the linked GitHub file. Line numbers are also provided for those who would like to follow along with a downloaded copy. While code examples are written in JavaScript for brevity, all actual code is written in Typescript and targets React 19.x, all while using vanilla CSS. Examples use Next.js v16.x, which is not required to run the navigation component. You can view the requirements for the Controlled Components Release along with previous requirements. Content Links Introduction Acceptance Criteria Contr
AI 资讯
Add email signatures with the Nylas Signatures API
Here's a thing that surprises people the first time: an email sent through the API does not carry the signature the user set up in Gmail or Outlook. Provider signatures live in the provider's compose UI, and a programmatic send bypasses that entirely, so a message your app sends goes out with no signature at all unless you add one. The Nylas Signatures API is how you add it: store an HTML signature once, then attach it to a send by ID, and the signature gets appended to the message for you. This post covers signatures from two angles: the HTTP API your backend calls, and the nylas CLI for creating and testing one from the terminal. I work on the CLI, so the terminal commands below are the ones I reach for when I'm setting a signature up. Nylas signatures are separate from provider signatures The first thing to get straight is that these are not the user's existing signature. Nylas doesn't sync the signature configured in Gmail, Outlook, or any other provider, and that provider signature is never applied to mail sent through the API. If a message your app sends needs a sign-off, you create that signature with this API and attach it explicitly; there's no inheriting it from the connected account. That separation is deliberate, because a programmatic send is a different context from a person typing in their webmail. It does mean the responsibility is yours: a user who connects their mailbox expecting their familiar signature to appear on app-sent mail won't get it automatically. Stored signatures are grant-scoped, living at /v3/grants/{grant_id}/signatures , so each connected account has its own set, and they're HTML, so a branded sign-off with a logo and links works the same as a plain one. Create a signature Creating a signature is a POST /v3/grants/{grant_id}/signatures with a name and an HTML body . The name is for you, a label to find it by later; the body is the markup that gets appended to outbound mail. The response returns the signature with its ID, which is w
开源项目
You didn't vibe code it, you stole it from open source&enterprise-licensed code
开发者
Regular expressions that work "everywhere"
开发者
OpenStreetMap running on an ESP32 with TypeScript and Canvas [video]
AI 资讯
Ford had to hire back former engineers to fix mistakes made by its automated systems
To celebrate its new status as No. 1 in JD Power's initial quality ranking among mainstream automakers, Ford is opening up about the challenges it has faced in recent years, especially around its reliance on automated systems in production and design. It turns out that those automated systems were not as robust as previously assumed, […]
科技前沿
Two Massive Earthquakes Struck Venezuela. Thousands Are Feared Dead
The country's interim leader declared a state of emergency on Wednesday following shocks measuring 7.5 magnitude after two quakes hit in less than a minute.
科技前沿
Get Up to 36% Off With the Best Prime Day Kindle Deals (2026): Paperwhite, Colorsoft, Kids
There’s no better time to get a Kindle than during Amazon's own sale event.
AI 资讯
What I’m Actually Learning as a 19-Year-Old SWE Student (And Why)
Introduction I'm Ahmer. I'm 19, I'm doing a 4-year Software Engineering degree at a fairly...
科技前沿
Best Bluetooth Speakers (2026): JBL, Sonos, Bose, and More
Discover the best Bluetooth speakers of all shapes and sizes, from waterproof clip-ons to a massive boom box.
AI 资讯
Show HN: Turn native language audio into flashcards and shadowing practice
Here is a tool I built initially for myself to help with my German and Greek language studies. It started as a hack for creating Anki cards from native language audio. It extracts the words, finds their base forms (lemmas) and groups the examples by the lemma. At some point I realised that I have a transcription with word level timestamps that opens a lot of other opportunities. So I added a mode to click the first and last word in the transcript and it starts looping with the right gap and repe
AI 资讯
Interesting Paper Exploring Prompt Injection
This is a fascinating explotation of how LLMs fall for prompt injection attacks. It turns out that they learn to recognize the style of text in different role/instruction blocks, and not just the tags. Their conclusion: Role tags were a formatting trick that became the security architecture and the cognitive scaffolding of modern LLMs. We’ve shown that this architecture doesn’t survive into the model’s actual representations, and that such role confusion is linked to prompt injection. Unless LLMs achieve genuine role perception, we think injection defense will remain a perpetual whack-a-mole game. And the continuous nature of role boundaries opens the threat of injections designed to subtly shift LLM states through seemingly innocuous text, legally and at scale...
科技前沿
The 23 Best Amazon Prime Day Deals Under $30 We've Found (2026)
Everything is expensive. Treat yourself to one of these WIRED-tested and -approved Prime Day picks under $30.
开发者
Building a European Cloud Orchestration Platform within an Enterprise
Modern cloud deployments involve many tools with different lifecycles, creating a heavy burden on engineers. The Kubernetes ecosystem offers a unified Control Plane approach. Sharing best practices through tech talks and inner-source collaboration can create an engaged community and drive adoption. By Ben Linders
AI 资讯
World Cup Teams Are in a Race for AI Dominance
This year, FIFA is providing an AI agent that any team can use. Is it enough to level the playing field or will future winners be determined by which team can afford the best tools?
产品设计
The A.I.-Design Aesthetic That's Taking over the Internet
开源项目
Winner Announcement Delayed for the Github "Finish-Up-A-Thon" Challenge
Hey all, we have a quick update for everyone who participated in the Github "Finish-Up-A-Thon"...
科技前沿
This Buy-It-For-Life Coffee Maker Just Won Prime Day
The Moccamaster Prime Day deal is the best price I've seen this year, on a coffee maker that will probably outlive you.
AI 资讯
Is this solar e-bike a good idea or sophisticated e-waste?
I like the idea of a solar-powered electric bike, but I don't think anyone should buy the new Phosgo Go5 - not yet, anyway. This "world's first AI solar e-bike" promises to "eliminate range anxiety," and is sold by a new brand out of China hoping to make a big splash by selling direct-to-consumer through […]
AI 资讯
After More Than a Decade of Waiting, ‘GTA VI’ Is Finally Around the Corner
We’re finally getting Grand Theft Auto VI, poised to be one of the largest gaming releases in history.