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

80 Commits

Author SHA1 Message Date
Hector Alfaro
cbdca62a2e Remove aria-describedby from annotation controls (#41216) 2023-08-22 19:31:00 +00:00
Kevin Heis
c007698fda Add event tracking to code annotations (#41204) 2023-08-22 16:31:22 +00:00
Hector Alfaro
db1e8057f5 Make annotations more accessible (#41163) 2023-08-22 15:14:16 +00:00
Kevin Heis
b9cbe21612 Migrate tools directory (#40094) 2023-08-01 16:22:43 +00:00
Peter Bengtsson
2ec905fc77 trailingCommas:all on prettier (#38888) 2023-07-11 11:44:52 +00:00
Hector Alfaro
3c10168757 Fix annotations when there's no cookie (#38716) 2023-06-28 17:38:20 +00:00
Hector Alfaro
3a53683643 Make annotation controls a button group (#38714)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2023-06-28 17:13:36 +00:00
Peter Bengtsson
8216de8f87 Remove banner to say the translations is incomplete (#38634) 2023-06-28 11:55:00 +00:00
Hector Alfaro
d9d576e1db Allow for multiple annotations on a page (#38270) 2023-06-21 18:46:38 +00:00
Hector Alfaro
3c3bfa2a13 Add toggle to header on annotations (#37758)
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2023-06-20 14:42:09 +00:00
Kevin Heis
f7fbba9074 Set cookies consistently (#37819) 2023-06-14 18:20:59 +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
2d15c92e84 Move a few more files into events src (#36574) 2023-05-08 15:33:13 +00:00
Kevin Heis
7cb56f3fb7 Remove two unused files (#36252) 2023-04-06 21:48:03 +00:00
Kevin Heis
0c67aadebc Move events into subject folder (#35262) 2023-03-14 15:53:42 +00:00
Grace Park
c5d08a7c19 Add -l option to curl code samples on rest pages to follow redirects (#35140) 2023-02-28 17:50:12 +00:00
Grace Park
320ffe6d01 Adding x-github-api-version header to js and cli examples (#34935) 2023-02-21 21:56:50 +00:00
Robert Sese
592ca1b51f only set query params if method isn't GET or HEAD (#34288) 2023-02-02 17:09:25 +00:00
Rachael Sewell
89e507215a account for non-object example values in rest docs (#33469)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2023-01-25 00:10:29 +00:00
Kevin Heis
1c0a9ef84d Add hover event, add scroll flips (#33743) 2023-01-04 22:02:39 +00:00
Rachael Sewell
2fd7e0f451 Revert "account for non-object example values in rest docs" (#33468) 2022-12-12 20:14:36 +00:00
Rachael Sewell
e78eb192df account for non-object example values in rest docs (#33411)
Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
2022-12-12 19:22:10 +00:00
Rachael Sewell
2724fb7b2a add curl example for multipart form (#33378) 2022-12-09 19:34:22 +00:00
Grace Park
4103893460 Add x-github-api-version header to curl code examples (#33203) 2022-12-05 21:38:29 +00:00
Grace Park
a0536f8063 Add required query params to examples (#32248) 2022-11-10 21:17:34 +00:00
Kevin Heis
043e5842ec Record all links, add samesite field (#32163)
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-10-28 20:47:34 +00:00
Evan Bonsignori
d5cf8700ab Persist tab state in query params for linking (#31499) 2022-10-12 11:43:31 +00:00
Rachael Sewell
93a3e80ede Fix REST example copy-paste error (#31043) 2022-09-26 18:47:55 +00:00
Manuel Bergler
219638d7d4 Fix Management Console API code samples (#30455) 2022-09-06 15:58:04 +00:00
Grace Park
e75e6d3638 Add new line for gh cli for REST CodeSamples to work (#30364) 2022-08-30 19:53:14 +00:00
Sarah Edwards
148257a793 Make autogenerated REST examples work with JWTs (#30352) 2022-08-29 17:32:34 +00:00
Kevin Heis
303d5190db Create a translations test suite (#30000)
* Scaffold files for migration

* Move user-agent into unit suite

* Nothing to move from browser suite

* Migrate tests to translations/content

* Migrate existing translation test to meta

* No graphql tests to migrate

* Migrate lint-translation-reporter

* Migrate lint-translation-reporter

* Remove languages-schema, unused

* Restore languages-schema

* Restore languages-schema

* Migrate rendering

* Migrate routing

* Migrate most of unit

* Remove dead files, comment out tests that aren't expected to work yet

* Migrate from get-redirect

* Migrate page and pages

* Migrate linting code

* Fix lint issues

* Found a few more

* Run prettier

* Move crowdin-config test and helper

* Update crowdin-config.js

* Remove translation linting, crowdin config lint, reduce file count

* Remove test that's been skipped for a year

* Restore linting with note to remove later

* Update lint-translation-reporter.js

* Clean up rendering suite

* Update rendering.js

* Remove excessive describe blocks

* Redirect tests

* Clean up unit

* Remove test that's never called

* Don't compare early access

* Rename test suites

* Update "content" tests

* Update files.js

* Update search.js

* Update files.js

* Update files.js
2022-08-25 12:38:03 -07: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
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
ef277d6640 Always call initializeEvents with a truthy csrfToken (#29721) 2022-08-08 12:10:00 -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
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
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
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
Kevin Heis
bb3cb78dd1 Move events under api (#29298) 2022-07-26 18:00:58 +00:00
Tim Rogers
037d6328b8 Recommend an Accept header without V3 in it when documenting our REST API operations (#28477)
* Recommend an `Accept` header for REST API requests which doesn't mention V3

In the documentation for every REST API, in the "Headers"
section, we say for the `Accept` header that:

> Setting to `application/vnd.github.v3+json` is recommended.

Putting the V3 bit in doesn't actually do anything - in fact,
a high proportion of API consumers don't do it - and this
recommendation is going to be confusing once we launch our
new API versioning. This recommends that people use
`application/vnd.gitrhub+json` instead.

We could just recommend `application/json` - I'd be in favour
of that! - but I'm trying to make this change as small as
possible.

* Update cURL and GitHub CLI code examples to use an `Accept` header without V3

Co-authored-by: Sarah Edwards <skedwards88@github.com>
2022-06-29 15:50:07 +00:00
Rachael Sewell
dd6e60242b add token to curl examples (#28357) 2022-06-09 15:36:57 +00:00
Grace Park
3a88ec5f1f Add curl -h authorization header to REST API Code Samples (#28332)
* add curl -h authorization header

* move to get-rest-code-samples
2022-06-08 20:06:48 +00:00
Robert Sese
2339bef120 Don't skip code term wrapping with single anchor child (#28175)
Wrap for single anchor child
2022-06-02 16:56:55 +00:00
Peter Bengtsson
a8d45acea9 refactor getThemeProps to be available in JS (#27439)
* refactor getThemeProps to be available in JS

* wip

* mike's idea

* delete no longer used file
2022-05-18 18:47:27 +00:00
Rachael Sewell
5f4f858b94 REST two-pane layout (#26954) 2022-05-02 10:10:33 -07:00