1
0
mirror of synced 2025-12-30 03:01:36 -05:00
Commit Graph

901 Commits

Author SHA1 Message Date
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
Hector Alfaro
54d996f186 Localization: Clean up Microsoft workflow (#29675)
* remove comments that no longer apply

* remove unused matrix variables

* remove CrowdIn-specific step of resetting broken files

* udpate link to Microsoft-specific log

* bring back reset script still in use

* add acceptable ja translation of TOS to rendering test

* add ability to remove files that have been translated but don't exist (wip)

* document what `languageFiles()` returns

* fix path issues for removed translations

* cleaner script execution

* add removed files to CSV report

* add workflow link to PR body for better troubleshooting

* catch missing regex for reporting file removals

* fix capturing groups in regex for csv reporting

* fix link to CSV file for PR

* fix formatting for PR

* pass in branch name from workflow

* put back helper scripts, make msft-specific copies
2022-08-15 17:17:25 +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
hubwriter
2d41221554 Update repository-references.js
Add `gh-net` and alpha sort
2022-08-11 13:54:53 +01: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
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
Evan Bonsignori
324beed950 Merge branch 'main' into ebonsignori/1506/secure-files-tests 2022-08-03 15:08:43 -07:00
Kevin Heis
bb1f30a39b Update HTML cache control to 10 minutes (#29586)
* Update HTML cache control to 10 minutes

* A little clean up

* Remove quick-lru
2022-08-03 20:39:54 +00:00
Evan Bonsignori
88df2f01f5 add secure-files test 2022-08-03 13:03:15 -07: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
Kevin Heis
bee3b5c9f3 Enable up to one minute of HTML caching (#29572)
* Enable up to one minute of HTML caching

* Skip a test that isn't the level of cache control we now want
2022-08-03 16:26:53 +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
a16aeac936 Prepare render-page for re-enabling HTML caching (#29473)
* Prepare render-page for re-enabling HTML caching

* Prepare render-page for re-enabling HTML caching

* Prepare render-page for re-enabling HTML caching

* Update healthz.js

* Pre calculate cache control directives

* Update render-page.js
2022-07-29 19:49:36 +00:00
Kevin Heis
64ac0f3a7b Fix browser tests 2022-07-28 12:35:09 -07:00
Kevin Heis
e46b4d155f Call /api/session less (#29440) 2022-07-28 19:18:41 +00:00
Octomerger Bot
ff2f9a0b14 Merge branch 'main' into repo-sync 2022-07-28 15:00:31 -04:00
Kevin Heis
0886faddac Move language context to browser/session (#29433) 2022-07-28 18:50:46 +00:00
Nick McCurdy
f028bd7a21 Merge branch 'main' into fix-links-to-feedback-discussions 2022-07-27 17:57:13 -04:00
Nick McCurdy
d6a886b6d0 Rename github-community to community 2022-07-27 17:36:23 -04:00
Courtney Wilson
3d00c55071 Merge branch 'main' into SmolParascythe-update-test-README 2022-07-27 12:44:33 -05: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
Courtney Wilson
cb4d43be47 Merge branch 'main' into SmolParascythe-update-test-README 2022-07-26 19:31:10 -05:00
Courtney Wilson
be95e8e56d Merge branch 'main' into fix-links-to-feedback-discussions 2022-07-26 15:56:10 -04:00
Kevin Heis
bb3cb78dd1 Move events under api (#29298) 2022-07-26 18:00:58 +00:00
Kevin Heis
2182ff28f3 Next12 now supports ESM (#29295)
* Next12 now supports ESM

* No more michael jackson script extensions

* Fix test running

* Update jest-puppeteer.config.cjs

* Update package.json
2022-07-26 17:53:23 +00:00
Matt Pollard
dc2ba532b4 GitHub Enterprise Server 3.6 release candidate (#28905) 2022-07-26 18:56:17 +02:00
Sophie
dc67e1cc38 Update README.md 2022-07-26 10:23:38 +02:00
Grace Park
798dd62609 Update page-data to parseAndRender childPage titles (#29265)
* start

* updating page-data

* fix test'

* remove unnecessary file check

* remove line

* line

* remove file check

* fix title -> shortTitle

Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
2022-07-22 11:32:30 -07:00
Kevin Heis
564e3a5e2a Move CSRF response back to XHR (Node.js prep) (#29179)
* Move CSRF response back to XHR

* Update events.js

* Pass through cookieJar

* Enable session route test

* Skip next x csrf test

* Add other fields to endpoint for future issues

* Remove client side parts

* Revert test skip

* Use nested router pattern

* ugh forgot a file

* Update naming

* Update tests/rendering/session.js

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

* Updating to use cache control

* Use req.langauge and req.userLanguage

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-07-22 18:17:22 +00:00
Sarah Schneider
74d8080dea Merge branch 'versioned-redirects' of github.com:github/docs-internal into versioned-redirects 2022-07-22 12:12:43 -04:00
Sarah Schneider
7dc8d11fed reorder imports to be more standard 2022-07-22 12:12:33 -04:00
Sarah Schneider
73cd3db0d1 Update tests/rendering/server.js
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-07-22 12:09:33 -04:00
Sarah Schneider
79a8d03afc update test to reflect the latest rewrite-links functionality 2022-07-22 10:38:21 -04:00
Sarah Schneider
7ad266949b update some filepaths that have changed 2022-07-21 10:08:47 -04:00
Sarah Schneider
4cbbf22fbd Merge branch 'main' of github.com:github/docs-internal into versioned-redirects 2022-07-21 09:04:04 -04:00
Peter Bengtsson
9dce4cd96d redirect to language url for ghes 3.0 and 3.1 (#29136)
Co-authored-by: Hector Alfaro <hectorsector@github.com>
2022-07-19 15:22:48 +00:00
Nick McCurdy
619aa2e9cd Merge branch 'main' of https://github.com/github/docs into fix-links-to-feedback-discussions 2022-07-19 06:22:27 -04:00
SmolParascythe
57e68c9f11 Add Note callout and reword sentence 2022-07-18 20:18:57 -07:00
SmolParascythe
0e216da252 Fix grammar and made writing succinct in README 2022-07-18 20:08:57 -07:00
SmolParascythe
c109de2523 Fix grammar and made writing succinct in README 2022-07-18 20:07:56 -07:00
SmolParascythe
4125b5d7ab Fix grammar and made writing succinct in README 2022-07-18 20:01:26 -07:00
Peter Bengtsson
4bff926c7e inject language for legact admin/release-notes URLs (#29082) 2022-07-15 20:28:31 +00:00
Peter Bengtsson
e0a20add31 //en/some/path should redirect to /en/some/path (#29077)
* //en/some/path should redirect to /en/some/path

* remove debugging
2022-07-15 19:16:42 +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
Peter Bengtsson
e61d71f42f HTML to plain text is broken in various places (#29006)
* HTML to plain text is broken in various places

* remove comment
2022-07-13 21:29:55 +00:00
Grace Park
822fe2926b Megabranch: Upgrade primer/react (#28458)
* upgrade primer/react

* upgrade

* using deprecated

* remove lib"

* Upgrade primer/react: Upgrade Label (#28502)

update Label to primer/react 35.2.2

* fix merge conflicts

* primer/react v35: update ActionList (#28467)

* Update to v35 ActionList for LearningTrack

* Update to v35 ActionList for ArticleList

* Update to v35 ActionList for ProductArticleList

* Update to v35 ActionList for TableOfContents

* Update to v35 ActionList for ProductCollapsibleSection

* Update to v35 ActionList for RestCollapsibleSection

* Update to v35 ActionList for SidebarHomepage

* Update to v35 ActionList for MiniTocs

* Update to v35 ActionList for Search

* Extra div for rendering test

* One less div for rendering test

* All the style updates for v35 ActionList

* Works without setting as an li which is already the default (didn't before for some reason)

* Use deprecated ItemInput for now

* Picker update for primer/react (#28485)

* update picker

* inline picker for mobile

* set width to auto

* Update components/ui/Picker/Picker.tsx

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

* update

* Update Picker.tsx

* update onselect

* checking language code

* move language cookie setting to language picker

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

* Resolve package merge conflicts

* fresh npm install

* Primer update UnderlineNav (#28582)

* update underlinenav for primer/react update

* update tests

* update switches test

* update one last label

* update header test"

* remove href in underlinenav

* update rendering tests

* update cursor

* primer/react v35: update DropDownMenu to ActionMenu (#28576)

* Update to v35 ActionMenu for ArticleCards

* Update to v35 ActionMenu for Search

* Set button to inline-block

* Put the props on the overlay

* Update test for ActionMenu markup

* update package

* update package lock

* primer/react v35: CodeLanguagePicker update from SelectMenu to ActionMenu (#28625)

* Use octicon for menu down arrow

* Update to v35 ActionMenu for CodeLanguagePicker

* update to SubNav

Co-authored-by: Grace Park <gracepark@github.com>

* update package-lock

Co-authored-by: Robert Sese <734194+rsese@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2022-07-11 11:51:18 -07:00