rsnext/packages/next/client
Steven 59a01ec709
Fix next/future/image alt text (#39366)
In many browsers (other than Chrome), the `alt` text is visible while the image is loading. This causes a sense layout shift since you'll see a flash of text and then the image (although lighthouse measures 0 CLS, likely because Chrome doesn't have this problem). This PR updates `next/future/image` to hide the alt text, unless there is an error while loading the image in which case the `alt` text because relevant as the fallback.

Example:

<img width="115" alt="image" src="https://user-images.githubusercontent.com/229881/183128008-0660c50c-18aa-4e64-872e-ada9a652130f.png">

Unfortunately, Safari also shows a border while lazy loading images and it cannot be styled.

See upstream issue here: https://bugs.webkit.org/show_bug.cgi?id=243601
2022-08-06 03:53:13 +00:00
..
components Flush styles effects (#39268) 2022-08-03 16:21:20 +00:00
dev fix(edge): error handling for edge route and middleware is inconsistent (#38401) 2022-07-21 14:53:23 +00:00
future Fix next/future/image alt text (#39366) 2022-08-06 03:53:13 +00:00
portal Use SWC to compile Next.js core server files (#27167) 2021-07-14 18:12:04 +00:00
add-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
add-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
app-index.tsx Handle assetPrefix in app (#39236) 2022-08-01 22:34:23 +00:00
app-next-dev.js Leverage mini css plugin hmr for app dir (#38830) 2022-07-21 14:38:04 +02:00
app-next.js Handle on-demand-entries and error overlay for server components (#38480) 2022-07-10 19:18:48 +02:00
detect-domain-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
get-domain-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
has-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
head-manager.ts Migrate head side effects to hooks (#37526) 2022-06-08 11:26:57 +00:00
image.tsx Improve next/image error message when src prop is missing (#38847) 2022-07-20 21:26:38 +00:00
index.tsx Remove the next/streaming endpoint and experimental refresh api (#38837) 2022-07-20 22:41:48 +00:00
link.tsx Add handling for prefetching onTouchStart and initial mobile testing (#38805) 2022-07-25 19:04:03 +00:00
next-dev.js Add hard navigation guard and fix middleware rewrite cases (#37815) 2022-06-20 11:31:19 +00:00
next.js Split up & tweak next/client initialization (#33838) 2022-03-07 17:09:55 +00:00
normalize-locale-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
normalize-trailing-slash.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
page-loader.ts Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
performance-relayer.ts add method to measure Interaction to Next Paint (INP) (#36490) 2022-06-07 18:28:58 +00:00
remove-base-path.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
remove-locale.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
request-idle-callback.ts upgrade to typescript 4.4.3 (#29112) 2021-09-16 18:06:57 +02:00
route-announcer.tsx Hoist styles for Route Announcer 📢 (#39331) 2022-08-05 09:42:55 +00:00
route-loader.ts Fix: only contain middleware in dev middleware manifest (#39217) 2022-08-01 13:23:24 +00:00
router.ts chore: TS improvments (#38834) 2022-07-20 16:48:45 +00:00
script.tsx [Script] Adds onReady prop to next/script (#38849) 2022-07-28 20:42:52 +00:00
trusted-types.ts Route Loader Trusted Types Violation Fix (#34730) 2022-05-03 23:22:08 +00:00
use-intersection.tsx Fix <Image/>'s lazyRoot and other optimizations (#37447) 2022-06-21 14:01:17 +00:00
with-router.tsx Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00