1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Commit Graph

503 Commits

Author SHA1 Message Date
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
Grace Park
b5ea7bbcc5 Update to NavList for minitocs (#29885)
* update to NavList for minitocs

* fix minitoc tests
2022-08-11 18:40:02 -07:00
Rachael Sewell
b552180c04 remove unused properties from decorated rest schemas (#29881) 2022-08-12 00:09:41 +00:00
Grace Park
0426962aec Fix single quote escaping for curl examples (#29876)
fix single quote escaping for curl examples
2022-08-11 22:26: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
Peter Bengtsson
cce0416b0d unique react key in playground editor buttons (#29836)
* unique React key in playground editor buttons

* second place
2022-08-11 15:56:58 +00:00
Peter Bengtsson
e23f968e6e find article by path only in PlaygroundContextProvider (#29838) 2022-08-11 15:45:28 +00:00
Peter Bengtsson
f843f42945 fix anchors on /graphql/reference/objects (#29815) 2022-08-10 17:11:53 -04:00
Rachael Sewell
7061516b37 allow videos to be versioned on landing pages (#29781) 2022-08-10 20:06:33 +00:00
Peter Bengtsson
5084160024 correct language link in header notification (#29799) 2022-08-10 15:52:24 +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
f966792fb5 refactor ClientSideRedirectExceptions (#29737) 2022-08-08 20:42:59 -04: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
ef277d6640 Always call initializeEvents with a truthy csrfToken (#29721) 2022-08-08 12:10:00 -04: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
Peter Bengtsson
f8f20605f4 search api with elasticsearch (#29053)
* indexing records into Elasticsearch

* @elastic/elasticsearch@8.2.0

* mv

* fix the code

* pipe

* lfs

* use sha

* change how index names work

* search api with Elasticsearch

* works

* refactor client

* better snowballing

* remove dbg

* wip

* highlights and fuzzy search

* improvements and upgrade

* also upgrade

* wip

* index more explicitly

* better validation

* change max size

* popularity by ordinal ranking instead

* playing

* fix package-lock

* rearranging

* catchMiddlewareError

* fix indexing

* match_phrase_prefix on wrapped search

* refactorings

* escape html in content

* wip

* search by URL

* update lock file

* v1 api

* inroads on jest testing the search

* valid yaml hopefully

* index fixtures into local elasticsearch

* specific versions to index only

* small fixes

* feedbacked

* fix tests

* use the npm script
2022-08-05 19:40:38 +00: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
Grace Park
cf8150fc9a Fix margin issue and use ActionList.LinkItem (#29639)
fix margin issue and use ActionList.LinkItem'
2022-08-05 00:23:36 +00:00
Rachael Sewell
dea3da2427 Add lazy syntax highlighting hook (#29610) 2022-08-04 21:23:22 +00:00
Kevin Heis
823135417e Fix the gray chin (#29625) 2022-08-04 10:23:50 -07:00
Rachael Sewell
aa8890ade6 add LinkIconHeading component (#29258) 2022-08-04 00:00:34 +00:00
Rachael Sewell
3cbd7103da Remove top-level categories on graphql queries page (#29592) 2022-08-03 20:01:38 +00:00
Rachael Sewell
467459af7c Reactify graphql pages (#28547) 2022-08-03 10:51:21 -07:00
Evan Bonsignori
552269d949 Merge branch 'main' into ebonsignori/1918/wrong-scrolling-target 2022-08-02 17:39:21 -07:00
Kevin Heis
f8d2395960 Remove theme from HTML (#29560)
* Remove theme from HTML

* update for linting error

* Fix for overriding default color modes

Co-authored-by: Grace Park <lugraciecy@gmail.com>
Co-authored-by: Grace Park <gracepark@github.com>
2022-08-02 17:06:54 -07:00
Evan Bonsignori
cab266e803 Merge branch 'main' into ebonsignori/1918/wrong-scrolling-target 2022-07-29 18:10:41 -07:00
Evan Bonsignori
ec76c796bb fix: nav scroll on mobile 2022-07-29 16:06:15 -07:00
Robert Sese
4a039244b3 Handle microsoft translation frontmatter properties (#28994)
* Add translation frontmatter to the schema

* Drop frontmatter in reusables.

Co-authored-by: Sarah Schneider <sarahs@github.com>

* Delete 'ms' property from data/ui.yml

Co-authored-by: Hector Alfaro <hectorsector@github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
2022-07-29 19:40:11 +00:00
Kevin Heis
6dcfab6338 Move waitForSession into get-session so its with family (and we are… (#29450)
Move `waitForSession` into get-session so its with family (and we are less likely to forget about it)
2022-07-29 16:24:29 +00:00
Kevin Heis
ccb9cd28e3 Fix lang dropdown (#29444)
* Let  be the caller, so events doesnt 403 on the first call

* Declare function

* Call all s so that the lang banner shows up consistently

* Update get-session.ts
2022-07-28 20:04:29 +00:00
Kevin Heis
9d0cb690a7 Let be the caller, so events doesnt 403 on the first call (#29441)
* Let  be the caller, so events doesnt 403 on the first call

* Declare function
2022-07-28 19:51:32 +00:00
Kevin Heis
e46b4d155f Call /api/session less (#29440) 2022-07-28 19:18:41 +00:00
Kevin Heis
0886faddac Move language context to browser/session (#29433) 2022-07-28 18:50:46 +00:00
Evan Bonsignori
034fc18348 feat: contribution links to .md (#29411) 2022-07-28 17:16:27 +00:00
Evan Bonsignori
febc27cb8f fix: dark mode miniToc style overrides (#29364) 2022-07-27 22:18:39 +00:00
Kevin Heis
13093f421d Change sign up button to browser-side only (#29400)
* Change sign up button to browser-side only

* Remove console.log

* Try removing components/context/DotComAuthenticatedContext.tsx, I don't think anything else is using it

* Revert "Try removing components/context/DotComAuthenticatedContext.tsx, I don't think anything else is using it"

This reverts commit 64d72c5dcb2efc67273a84fed371ff2ecc6c6f43.
2022-07-27 13:37:37 -07:00
Kevin Heis
f79e1d2cb7 Fetch CSRF token over XHR (browser-side) (#29337)
* Client side csrf token grab

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Remove test refs to meta tag

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Update get-session.ts

* Fix some type issues

* Simplify api

* Update components/lib/get-session.ts

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-07-27 16:18:07 +00:00
Rachael Sewell
e8acff555c refactor the enabled for apps page component (#29253) 2022-07-26 18:14:50 +00:00
Rachael Sewell
425e052816 remove nested markdown component (#29250) 2022-07-26 18:08:05 +00:00
Kevin Heis
bb3cb78dd1 Move events under api (#29298) 2022-07-26 18:00:58 +00:00
Peter Bengtsson
b1226676e7 Picker sends just the selected value (#29191) 2022-07-19 18:06:55 -04:00
Peter Bengtsson
8d1f41633a prevent whitespace-only searches (#29075) 2022-07-15 19:10:10 +00:00
Peter Bengtsson
08ffe45da7 add debounced search query string without anchor (#29073)
add debounched search query string without anchor
2022-07-15 18:41:14 +00:00
Peter Bengtsson
a37f023f40 search body for setting-up-your-project-for-codespaces (#29038) 2022-07-14 16:40:45 +00:00
Peter Bengtsson
37d3bded04 simplify Table of Contents (#28833)
* simplify table-of-contents

* key

* fix rendering tests

* Not so much top margin

* Map topic ToC links are spans

* use p tag

* Back to span for the article title

* Update comment to match markup

* remove hack

* use h2 instead

* fix tests

* fix use of key

* use regular className instead

Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
2022-07-14 14:28:41 +00:00
Rachael Sewell
26e4dbc4bf refactor rest context provider to be generic (#29021) 2022-07-14 14:09:38 +00:00