1
0
mirror of synced 2025-12-22 11:26:57 -05:00
Commit Graph

41 Commits

Author SHA1 Message Date
Kevin Heis
3f94bb2dcf Create versions and archives src folders (#42802) 2023-09-19 16:40:43 +00:00
Kevin Heis
078ab8ae6a Create src color-schemes directory (#42127) 2023-09-07 17:34:28 +00:00
Kevin Heis
9bf3fc185a Create languages src directory (#41661) 2023-08-30 17:24:59 +00:00
Peter Bengtsson
0251a4f1ce Ability to close your language banner (#39223) 2023-07-25 19:25:27 +00:00
Kevin Heis
f798da7b7a A11y simpler release notes sidebar (#39392)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-07-24 14:45:20 +00:00
Peter Bengtsson
2ec905fc77 trailingCommas:all on prettier (#38888) 2023-07-11 11:44:52 +00:00
Kevin Heis
f7fbba9074 Set cookies consistently (#37819) 2023-06-14 18:20:59 +00:00
Cole Bemis
bace21beb4 Fix theme mismatch (#25628)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2023-05-30 13:13:55 +00:00
Kevin Heis
ab91bc6b43 Move more REST files into src (#37026)
Co-authored-by: Rachael Sewell <rachmari@github.com>
2023-05-11 17:17:57 +00:00
Kevin Heis
71759371a2 Move more files into the search src directory (#36575) 2023-05-08 17:54:06 +00:00
Kevin Heis
7cb56f3fb7 Remove two unused files (#36252) 2023-04-06 21:48:03 +00:00
Peter Bengtsson
8ab5c45eb8 format large numbers per locale (#34579) 2023-02-08 21:34:41 +00:00
Kevin Heis
6b1ac124d8 Update "preferredlang" to "user_language" (#33045) 2022-11-30 17:51:51 +00:00
Peter Bengtsson
e7280bb896 silence unit test warning from useTheme (#30286) 2022-08-26 15:44:24 +00:00
Peter Bengtsson
8765c628ff dedicated search results page (redux) (#29902)
* dedicated search results page (redux)

* Update SearchResults.tsx

* adding pagination

* fix pagination

* say something on NoQuery

* better Flash

* tidying link

* small fixes for results

* debug info

* l18n the meta info

* inDebugMode

* basic jest rendering of the skeleton page

* basic jest rendering test

* fix content tests

* better document title

* fix tests

* quote query in page title

* use home page sidebar

* something when nothing is found

* parseInt no longer needs the 10

* fix linting tests

* fix test

* prettier

* Update pages/search.tsx

Co-authored-by: Rachael Sewell <rachmari@github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-08-19 13:36:55 +00:00
Kevin Heis
688a274f1f Remove CSRF check (#29910)
* Use color_mode for gating "sign up" button

* Remove csrf check

* Add `res.removeHeader('set-cookie')` to cache-control

* Update static-assets.js

* Remove package

* Remove tough-cookie

* Update cache-control.js

* Update cache-control.js

* Update cache-control.js
2022-08-15 19:28:42 +00:00
Kevin Heis
242c4c1f72 Also check preferred_color_mode for hasAccount state (#29958)
Update useHasAccount.ts
2022-08-15 17:54:09 +00:00
Peter Bengtsson
700a33df69 use the languages definitely known in context (#29920) 2022-08-12 20:36:22 +00:00
Kevin Heis
ca61b3465a Use color_mode for gating "sign up" button (#29901)
* Use color_mode for gating "sign up" button

* Update useHasAccount.ts

* Update useHasAccount.ts

* Update useHasAccount.ts
2022-08-12 18:18:58 +00:00
Peter Bengtsson
1897eb1c94 remove 'This aritlce is also available ...' when changing back to Eng… (#29868)
remove 'This aritlce is also available ...' when changing back to English
2022-08-11 21:21:44 +00:00
Kevin Heis
101e7155c8 userLanguage in browser instead of XHR (#29782)
* userLanguage in browser instead of XHR

* refactors on pr 29782 (#29798)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-10 15:28:21 +00:00
Kevin Heis
04f38e4779 Parse color_mode cookie in browser (#29738)
* Parse color_mode cookie in browser

* Update useTheme.ts

* Update use-theme.js

* Update use-theme.js

* Add support for dark_high_contrast

Per https://primer.style/css/support/theming

I also checked all the color mode options, this is the only additional working with Primer 20 so far

* Remove gray bg

* Remove  type

* Use defaults instead of types for fn args

* Thicker types
2022-08-09 16:48:18 +00:00
Peter Bengtsson
aa727c4f70 refactor clientsidehighlight (#29713)
* refactor ClientSideHighlight

* names

* names again
2022-08-08 20:17:58 +00:00
Peter Bengtsson
bf020344c2 let session defaults be defined where they are used (#29724) 2022-08-08 17:17:11 +00:00
Peter Bengtsson
623a040851 use defaultfallback data for apisession (#29719)
* don't get available languages from session

* update useSession

* one more fix

* use default session till XHR comes in

* warn on error
2022-08-08 15:47:55 +00:00
Peter Bengtsson
a1e3866fa5 don't get available languages from session (#29715)
* don't get available languages from session

* update useSession

* one more fix
2022-08-08 11:13:27 -04:00
Kevin Heis
56aa9ea094 Move use session to its own hook file (#29641)
* Move use session to its own hook file

* Trying useSWR

* Try one hour html cache

* blah blah lint

* Update to include loading state

* Update components/hooks/useSession.ts

Co-authored-by: Peter Bengtsson <peterbe@github.com>

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-05 14:47:10 +00:00
Rachael Sewell
dea3da2427 Add lazy syntax highlighting hook (#29610) 2022-08-04 21:23:22 +00:00
Mike Surowiec
f3fc80cf05 Upgrade primer/components -> primer/react (#25591)
* upgrade primer/components -> primer/react

* fix jest failure
2022-02-24 00:30:14 +00:00
Grace Park
f19223503a Update Search Version Button to Dropdown (#23465)
* adding to view

* updating the portal location

* add new line

* updating font styling to class

* Update components/Search.tsx

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* Update components/Search.module.scss

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>

* update ItemInput

* using router.replace and import updates

* Update components/Search.tsx

Co-authored-by: Peter Bengtsson <peterbe@github.com>

* run prettier

* Update components/Search.tsx

Co-authored-by: Peter Bengtsson <peterbe@github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2021-12-09 17:56:24 +00:00
Kevin Heis
86b5a52b3e Query string abuse causing 5xxs (#23501) 2021-12-08 21:05:32 +00:00
Peter Bengtsson
eb4a4741ad refactory getting 'query' with a hook (#22879) 2021-11-17 15:02:50 +00:00
Mike Surowiec
06d8f81401 Two-pane Experiment (#21092)
* pull changes from docs-playground

* cleanup, add callout banner

* cleanup linting and test fixes

* add discussion link

Co-authored-by: James M. Greene <JamesMGreene@github.com>
2021-08-26 14:19:40 -04:00
Mike Surowiec
85b48a3795 Rename hooks/lib files to .ts (#20488)
* rename hooks to .ts

* rename lib files to ts
2021-07-26 14:37:21 +00:00
Mike Surowiec
a88e99c83a Reactify: release notes (#19799)
* reactify release-notes pages

* update GHAE/ES react release notes to not rely on javascripts/release-notes.js
2021-06-09 20:44:32 +00:00
Mike Surowiec
4fa725c404 Reactify: ProductReleases component on landing page (#19808) 2021-06-09 20:39:21 +00:00
Rachael Sewell
cf965e0892 Convert to new site tree (#19450) 2021-05-20 11:35:02 -07:00
Mike Surowiec
e8b7d3b9fc Product landing page react (pt 4) (#19336)
* start SidebarNav, enable dark mode

* wip: sidebarnav, fix primer components theme rendering

* feat: ProductSiteTree, useFeatureFlag

* feat: add new product site tree (untested)

* wire up HomepageVersionPicker, run lint

* fix: remove re-render logic, fix homepage version picker to be natural width

* fix: support css + primer/components color modes

* fix: rename categoryId -> productId

* feat: ProductSiteTree and AllArticlesProduct

* fix: cleanup warnings

* fix: use next links on ProductSiteTreeNew

* fix: use next Link on AllArticlesProduct

* fix: add tooltip to ScrollButton, remove stylesheet dependency

* feat: ProductArticlesList component

* fix: convert color_mode value from cookie when necessary

* remove comments

* replace liquid with jsx

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-05-19 02:49:51 +00:00
Mike Surowiec
03523a1822 feat: update useTranslation to be more advanced 2021-05-07 11:42:45 -07:00
Mike Surowiec
0ce7b00471 fix: linting 2021-05-05 16:20:53 -07:00
Mike Surowiec
f3a029b6dd feat: add SupportSection 2021-05-05 15:58:21 -07:00