Commit Graph

37 Commits

Author SHA1 Message Date
dan
e6b843bb84 [Beta] Change useState structure, add examples (#4276)
* [Beta] Change useState structure, add examples

* Simpler language

* Nix when not to use it
2022-02-03 00:29:33 +00:00
Danilo Woznica
626f957364 fix(sandpack): improve memory usage (#4126)
* fix(sandpack): init mode

* init mode tweaks

* sandpack preview: keep loading state while preview is still working

* prettify it

* fix: renew client listener on remount
2022-02-02 11:44:26 +00:00
Dan Abramov
c8ad67d379 Fix deps 2022-02-01 13:53:34 +00:00
dan
abca1f4495 Use MDXContext directly (#4267)
* Use MDXContext directly

* yolo
2022-02-01 13:19:17 +00:00
dan
58d6f3f9fc Prevent nav context re-renders (#4266) 2022-02-01 12:51:14 +00:00
dan
1c355ab630 [Beta] Change "You will learn" for chapters (#4239) 2022-01-28 18:55:27 +00:00
Dan Abramov
2b2ac5c3bf Fix download label 2022-01-28 00:42:59 +00:00
Ben Rogers-McKee
53d279e370 fix: challenges navigation (#4123)
* fix: challenges navigation

* fix: challenges navigation alternate solution

* fix: challenges navigation assert non null on find

* refactor: unnecessary default value
2022-01-27 21:06:51 +00:00
Mark R. Florkowski
ec65cc000c Add "click to copy" to TerminalBlock (#4025)
* add click to copy to TerminalBlock

* rebase + changes

* fix 'Not all code paths return a value.'

* fix svg jsx

* fix lint errors
2022-01-27 21:06:39 +00:00
Danilo Woznica
d80ef566a3 Sandpack: upgrade dependencies and adds ReactDevtools (#4161)
* upgrade sandpack dependencies

* update csb button

* remove unnecessary ref

* add react dev tools

* remove duplicated/unnecessary element

* fix: codemirror gutter

* fix codemirror gutter

* make devtools optional

* bump sandpack version

* fix: add website theme to the react devtools

* fix: react devtools ui tweaks

* devtools: custom theme

* refactor: reset sandbox

* fix sandpack

* fix: devtools style

* fix: tweaks on mobile version

* fix: soft refresh when module is loaded

* bump sandpack version

* update color

* remove demo

* remove inspect button

* bring back key logic

* refactor: icon align

* update sandpack

* logic to keep the content synced
2022-01-24 16:28:52 +00:00
CatsAndDogs123
86eb509781 [fix]: add-listner is deprecated, switched those to add-event-listner (#4093) 2021-12-03 17:30:05 +05:30
Strek
01afd01325 [Beta]Move all possible style to tailwind classes (#4054)
* Move all possible style to tailwind classes

* Update Sidebar.tsx

* fix-collapsable-color

* dry run and commit

* Update SidebarLink.tsx

* Fixes review comments for aria tags

* Remove extended tailwind configs

* Update tailwind.config.js

* Update Sidebar.tsx
2021-11-29 23:17:46 +05:30
Strek
17ad2cbc71 Fixes unwanted scrolls in mobile (#4114)
* added word break

* Update PageHeading.tsx
2021-11-18 21:17:15 +00:00
Strek
49a552c1c1 Fix prettier CI and add it to pre commit (#4100)
* Add prettier before commit and during CI

* Add workflow

* Reverse merge main to branch

* dry run prettier

* dry run prettier

* [warn] jsxBracketSameLine is deprecated so replaced it to bracketSameLine

* Revert "[warn] jsxBracketSameLine is deprecated so replaced it to bracketSameLine"

This reverts commit 43dbe9ed3f.

* Revert "dry run prettier"

This reverts commit b62948042c.

* Revert "dry run prettier"

This reverts commit 382f9a4691.

* Revert "Reverse merge main to branch"

This reverts commit 43667eaf29.

* [warn] jsxBracketSameLine is deprecated so replaced it to bracketSameLine
2021-11-15 18:23:25 +00:00
Strek
ea086bd312 Fixing Eslint configuration (#4087)
* fix-collapsable-color

* Made Eslint work and added next's eslint config

* Add lint:fix to pre commit rule

* Reverts older anchor links

* Fixed review comments

* Replace with spaces like before

* Update DocsFooter.tsx

* Update arrow function

* Update CodeBlock.tsx

* Update MDXComponents.tsx

* Update SidebarLink.tsx
2021-11-15 15:33:15 +00:00
Alexey Pyltsyn
719aa3c377 Allow page zooming/scaling (#4082)
* Allow page zooming/scaling

* Fix for iOS
2021-11-11 16:50:49 +00:00
harish-sethuraman
8333b6d127 Fixes wrong breadcrumb for 404 page (#4074)
* Fixes wrong breadcrumb for 404 page

* Change Home as default layout

* Add layout Learn to the pages inside learn
2021-11-10 18:10:20 +00:00
Dan Lebowitz
29fbe65acb fix safari bug 2021-11-10 17:50:07 +00:00
Dan Lebowitz
23c09e0072 polish dark mode illustrations 2021-11-09 23:07:39 +00:00
Dan Abramov
075b786344 Restore scroll after 'show less' (#4056)
* Restore scroll after 'show less'

* Get the whole sandbox into view
2021-11-06 14:44:15 +00:00
Alexey Pyltsyn
22f4595dac Fix scroll to last scroll position after close modal search (#4057) 2021-11-06 14:30:12 +00:00
Dan Lebowitz
e915345e61 add additional bottom padding to mobile sidebar 2021-11-06 12:42:40 +00:00
Dan Abramov
9affdc9a5a Only show sidebar scrollbars when needed (#4052)
* Adjust sidebar scrollbars

* thinner
2021-11-06 01:12:57 +00:00
Alexey Pyltsyn
c6a26627f2 Remove empty id attribute for h1 element (#4051) 2021-11-05 22:00:29 +00:00
Alexey Pyltsyn
b7e5753895 Remove invalid crossorigin attribute (#4050) 2021-11-05 21:57:14 +00:00
harish-sethuraman
91e42cb59a Added condition to hide challenges tab navigation when there is only one challenge (#4044) 2021-11-05 18:13:15 +00:00
harish-sethuraman
bb2ade74e6 Add linefeed in the mdx and handle it (#4039)
* Add linefeed in the mdx and handle it

* Add preserve whitespace
2021-11-05 05:34:46 +00:00
Dan Abramov
d51f70658f [Beta] Dark more tweaks (#4019)
* Make sandbox themeable

* Fix gutters

* Fix FOUCs

Co-authored-by: Dan Lebowitz <dan.lebo@me.com>
2021-11-04 22:56:40 +00:00
harish-sethuraman
5ba0ad88b8 Take system's theme for the beta site (#4022)
* Take system's theme for the site

* Add IIFE for dark mode in document load and preserve in localStorage

* Add types

* Fix SSR and respect override

Co-authored-by: Dan Abramov <dan.abramov@me.com>
2021-11-04 19:14:50 +00:00
Alexey Pyltsyn
a803dbfe19 Fix horizontal scrollbar on desktop (#4038) 2021-11-04 16:23:54 +00:00
Shriram Balaji
191fff7902 fix: consoleBlock text & bg in dark mode (#3983) 2021-10-28 21:33:41 +01:00
Shriram Balaji
d0d50fe16f fix: googleTranslate breaking terminal blocks (#3993)
* fix: googleTranslate breaking terminal blocks

* chore: prettier magic
2021-10-28 21:33:41 +01:00
Shriram Balaji
e056875e50 fix: googleTranslate breaks sandboxes (#3984) 2021-10-28 21:33:41 +01:00
François Chalifour
faeaf22fd1 Fix preconnect link to target search cluster (#3980)
The `appId` was retrieved from props but the `<Search>` component is never instantiated with props. So the preconnect link targeted an unknown search cluster:

```html
<link rel="preconnect" href="https://undefined-dsn.algolia.net" crossorigin="true">
```

This fixes the preconnect link by getting the `appId` from the website config.
2021-10-28 21:33:41 +01:00
R Nabors
e75356d0f3 fixing social sharing URL and description (#3974) 2021-10-28 21:33:41 +01:00
Dan Abramov
9722d514d6 Update src/components/Seo.tsx
Co-authored-by: Lee Robinson <me@leerob.io>
2021-10-28 21:33:41 +01:00
Rachel Nabors
981db3397e Initial check-in of new React docs and website
Co-authored-by: Dan Abramov <dan.abramov@me.com>
Co-authored-by: Sylwia Vargas <sylwia.vargas@gmail.com>
Co-authored-by: Dan Lebowitz <dan.lebo@me.com>
Co-authored-by: Razvan Gradinar <grazvan@fb.com>
Co-authored-by: Jared Palmer <jared@palmer.net>
Co-authored-by: Dane Grant <danecando@gmail.com>
Co-authored-by: Dustin Goodman <dustin.s.goodman@gmail.com>
Co-authored-by: Rick Hanlon <rickhanlonii@gmail.com>
Co-authored-by: Maggie Appleton <maggie.fm.appleton@gmail.com>
Co-authored-by: Alex Moldovan <alex.n.moldovan@gmail.com>
Co-authored-by: Ives van Hoorne <ives.v.h@gmail.com>
Co-authored-by: Brian Vaughn <bvaughn@fb.com>
Co-authored-by: Dmitri Pavlutin <dpavlutin@gmail.com>
2021-10-28 21:33:41 +01:00