Commit Graph

5372 Commits

Author SHA1 Message Date
dan
299dad85be [Beta] useContext API (#4378)
* [Beta] useContext API

* Simplify + add

* Tweaks

* Softer

* Tweaks

* Small tweaks
2022-02-24 22:00:02 +00:00
Ricky
ac9a984a5b Add diagrams to Quick Start (#4377)
* Add diagrams to Quick Start

* Switch to svg

* Switch dark mode image

* Rework file names, minor dark mode updates

* Update alt tags and descriptions
2022-02-24 11:29:38 -05:00
dan
8314493274 Fix focus rings 2022-02-23 20:10:08 +00:00
Dan Abramov
b6a181c526 Fix editable code blocks 2022-02-23 18:02:00 +00:00
Sha Mwe La
1b05b11188 Remove transform (#4375) 2022-02-23 16:08:10 +00:00
Sha Mwe La
508b427937 Improve ESLint (#4372) 2022-02-22 19:10:15 +00:00
Strek
275d03f1c0 Upgrade sandpack to fix code cutting issue in view only editor (#4371)
* Upgrade sandpack to fix code cutting issue in view only editor

* Added proper sandpack version
2022-02-22 13:45:41 +00:00
Anjorin Damilare
9bcbe7ba5f [beta] bump tailwind to v3 and update config (#4366)
* [beta] bump tailwind to v3 and update config

* fix widget wrong position

* fix content tailwind config
2022-02-21 21:40:33 +00:00
Nathan Somsa-ard
aeb17885d7 add the current LTS Node version (#4367) 2022-02-21 11:49:24 +00:00
Sha Mwe La
2310e15532 Add ARIA labels on the navigation buttons (#4363) 2022-02-19 23:00:54 +00:00
Strek
5b8a720ece Initial Commit (#4358) 2022-02-18 18:05:22 +00:00
Strek
7d55f613a6 Initial Commit (#4357) 2022-02-18 18:04:37 +00:00
Dan Abramov
3ae0eb6a9d Fix white flash when loading 2022-02-18 16:49:38 +00:00
Dan Abramov
6c855f7f98 Remember whether downloads are supported 2022-02-18 16:25:38 +00:00
Dan Abramov
ab648df861 Consolidate and preload fonts 2022-02-18 04:55:36 +00:00
Dan Abramov
f3f580a99a Don't use unload on modern browsers 2022-02-18 04:41:50 +00:00
Dan Abramov
855c26a9d8 Ignore TSC build file 2022-02-18 04:25:01 +00:00
Dan Abramov
753c4fc571 Delete dead code 2022-02-18 04:23:00 +00:00
Dan Abramov
8def74995a Try caching the font 2022-02-18 04:15:20 +00:00
dan
0883863c67 [Beta] Use a light GA client (#4355)
* [Beta] Use a light GA client

* oopsie
2022-02-18 03:56:41 +00:00
Dan Abramov
9ac33fff1a Fix TS 2022-02-18 03:02:35 +00:00
Dan Abramov
8ca0215cff Fix pageview collection for UA 2022-02-18 03:00:38 +00:00
Dan Abramov
81f772e8b1 Switch from GA4 to UA to track feedback 2022-02-18 02:30:32 +00:00
Dan Abramov
45ac43a9f1 Never use local font 2022-02-18 01:30:26 +00:00
dan
c8ec9d841a [Beta] Replace Hotjar with GA buttons (#4275)
* Replace Hotjar with GA buttons

* initial styles for GA buttons

* Add feedback popover

* style fixes + adding SVGs

* dark mode fix

* Maintain state

* Click outside

* Fix TS

* Oops

Co-authored-by: Dan Lebowitz <dan.lebo@me.com>
2022-02-18 00:28:01 +00:00
dan
a48ba9c1d9 Link to how to set up syntax in Sublime 2022-02-18 00:07:35 +00:00
Sha Mwe La
3d6081f65f [Beta] Add aria-label and title to permalinks (#4344)
* Add tab index -1

* Improve accessibility
2022-02-18 00:01:02 +00:00
Sha Mwe La
aa4bb4197b Cache a font file (#4350)
* Cache a font file

* Fix vercel.json syntax

* Improve

* Fix fonts

Co-authored-by: dan <dan.abramov@gmail.com>
2022-02-17 23:59:06 +00:00
Mayank
3d6eba79e6 [beta] fix typo in useref.md (#4352)
grammar
2022-02-17 19:36:45 +00:00
dan
93fdfb2715 [Beta] useRef API (#4345)
* useRef

* useRef API

* Move it down
2022-02-17 19:14:13 +00:00
dan
4ed4fb7415 [Beta] Change highlight styles (#4348) 2022-02-17 03:13:51 +00:00
dan
a2138f2e63 Nitpicks for code splitting (#4346) 2022-02-16 18:51:15 +00:00
Strek
2979d0c967 Splitting sandpack from main bundle (#4256)
* Initial Commit

* play with it

* oops

* easier repro

* import type

* remove `suspense: true`

* Add patch for next

* Patch package

* Add fallback

* Enable flag

* Fixes local dev env and adds better fallback for codeblock

* Adds fallback for sandpack (should work fine)

* turn off concurrentFeatures

* Revert "turn off concurrentFeatures"

This reverts commit 50158ecbd33969e707a2a91a54e822e90c2ebfde.

* Update SandpackWrapper.tsx

* Removed flags and setTimeouts

* add timeouts and promise again

* Adds bottom bezel and scroll to sandpack fallback

* tinker bottombezel and remove console

* Update CodeBlock.tsx

* Update SandpackWrapper.tsx

* removing overflows to avoid explicit scrolls

* upgrade nextjs to canary

* Rm patch

* Fix TS

* Bump Next

* No more CSS jumping

* Reverts the canary to use the latest Next.js `12.0.10`

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: Dan Abramov <dan.abramov@me.com>
2022-02-16 23:06:04 +05:30
dan
0209e1b5be [Beta] Reorder API sections (#4328)
* Reorder API pages

* Tweaks
2022-02-16 00:28:25 +00:00
Sha Mwe La
b4de7008f3 [Beta] Add ARIA labels (#4335)
* Add ARIA labels

* Remove unnecessary ARIA label

* Add Facebook and Twitter ARIA labels
2022-02-15 16:30:11 +00:00
Danilo Woznica
b10ae600dc sandpack: bring back init mode (#4337)
* sandpack: bring back init mode

* upgrade sandpack
2022-02-15 16:18:59 +00:00
Tomasz Sapeta
b677012262 Add App.js Conf 2022 to the conferences page (#4336)
Co-authored-by: Tomasz Sapeta <tsapeta@users.noreply.github.com>
2022-02-15 14:26:30 +05:30
Imanpal Singh
fa15160364 Fix - Sandpack error icon overlapping issue (#4332)
* position error icon correctly

Add padding right to line with the error to accommodate space for the error icon.
Added in a new selector because it was getting overridden by more specific selectors.
Fixes #4287

* use important instead of selectors

* fix overlapping for smaller screens

* replace width with min-width

* align error icon to center vertically

Use em instead of pixels for padding, increase line height of error icon
2022-02-14 16:50:54 +00:00
Sophie Alpert
71cc6be618 [beta] Reword "action = what happened" advice for useReducer (#4331)
* [beta] Reword "action = what happened" advice for useReducer

One learner misinterpreted the original text here as meaning instead that it's important that actions are written in past tense – this updated wording is clearer about what this is meant to convey (I think).

* typo
2022-02-13 00:54:41 +00:00
Mayank
a06d860f34 Fix broken link in render-and-commit.md (#4327)
`/reference/setState` -> `/apis/usestate#setstate`
2022-02-12 15:21:42 +00:00
Strek
0a76bf4752 Fix typo (#4326) 2022-02-12 11:16:28 +05:30
Dan Abramov
85e3fcf89c More separators 2022-02-12 03:33:40 +00:00
dan
269579937e [Beta] Mention batching in useState (#4318)
* [Beta] Mention batching in useState

* Fix up link

* Tidy it up
2022-02-12 03:32:19 +00:00
dan
4f764b26da [Beta] Change render() API page format (#4319)
* [Beta] Change render() API page format

* Tweaks
2022-02-12 02:25:24 +00:00
dan
3ccb538942 [Beta] Fix layout shift from previews (#4322)
* [Beta] Fix layout shift from previews

* Arbitrary values

* Fix borked style

* Remove custom styles and start again

* Recreate existing layout

* Try to make it work

* Fix TS

Co-authored-by: Dan Lebowitz <dan.lebo@me.com>
2022-02-12 01:32:53 +00:00
dan
fc644cd244 Revert "Sandpack error icon overlapping issue fix (#4302)" (#4325)
This reverts commit cd1717bfbd.
2022-02-12 00:25:07 +00:00
uulaal
f20da4c840 removed old "early time for hooks" note (#4321) 2022-02-11 22:18:33 +00:00
dan
b8b26e5be1 Simplify wording 2022-02-10 01:59:54 +00:00
Kid
c7d5aacd80 Fix broken MDN E4X links (#4316) 2022-02-09 12:22:28 +00:00
Xuan Huang (黄玄)
03f232346e [Beta] Use "Parameters" as titles? (#4314)
Taking examples of [MDN](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) or [Swift](https://developer.apple.com/documentation/swift/1541053-print), the name used in signatures (assuming this name will be used by type defs like in TS and [Flow](https://github.com/facebook/flow/blob/main/lib/react.js#L343)) is probably more often called as "Parameters". 

I don't have a strong opinion on this since the distinction are minor and often confusing, but it looks a bit unfamiliar to me as titles. I think use "arguments" interchangeably in other part of writing is fine otherwise it's too much of a mental burden.
2022-02-09 02:48:48 +00:00