Граф коммитов

157 Коммитов

Автор SHA1 Сообщение Дата
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
Grace Park df6b782b11
Update navlist for MiniTocs (#30167)
* update navlist

* fix tests

* update to component

* update platform

* update key

* fix platform tool picker issue

* add key

* remove unnecessary key

* fix test

* update styling

* fix indented test

* Update components/ui/MiniTocs/MiniTocs.tsx

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

* remove null

Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-08-25 09:33:08 -07:00
Peter Bengtsson d38b8351a8
Revert "Update to NavList for minitocs" (#30051)
Revert "Update to NavList for minitocs (#29885)"

This reverts commit b5ea7bbcc5.
2022-08-18 09:44:23 -04: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
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
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 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
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 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 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
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
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
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
Peter Bengtsson ee1f20f4fb
jest 28.1.1 (#28797)
* got 28.1.1

* wip

* force upgrade nth-check

* legacyFakeTimers
2022-06-29 11:55:03 +00:00
Kevin Heis f948c81038
Upgrade got (#28617)
* Upgrade got

* Update e2etest.js

* Skip following redirects on redirect tests

* Update deprecated-enterprise-versions.js
2022-06-21 16:23:51 +00:00
Matt Pollard 965e27ca3a
Merge branch 'main' into copilot-ga-megabranch 2022-06-20 09:43:14 +02:00
Matt Pollard 8297c57ac3
Add article with conceptual overview of GitHub Enterprise Server (#28221) 2022-06-17 09:25:36 +00:00
Jules 14b008c99b
Merge branch 'main' into copilot-ga-megabranch 2022-06-17 09:56:12 +02:00
Peter Bengtsson a39614fdcf
remove supertest dependency (#28572)
* remove supertest dependency

* remove bad test
2022-06-16 15:56:41 +00:00
Matt Pollard e2be0f253c Remove unnecessary tests 2022-06-08 14:44:12 +02:00
Peter Bengtsson d014f36222
fix external redirects (#28063)
* fix external redirects

* oops

* feedbacked
2022-06-02 02:06:29 +00:00
Peter Bengtsson 9bef33aec4
let front door handle invalid paths (#27954) 2022-05-24 18:30:05 +00:00
Grace Park 10fea98af5
Search updates larger font (#27838)
* removing search from home page and adding to header

* remove homepage search

* adding description

* update to f5

* remove homepage search test

* removing homepage search rendering test

* showing preview of larger font

* update wording at breakpoint

* update to short description everywhere

* Update components/homepage/HomePageHero.tsx

Co-authored-by: Joe Oak <41307427+joeoak@users.noreply.github.com>

* remove unnecessary stylesheet

* Update data/ui.yml

Co-authored-by: Janice <janiceilene@github.com>

Co-authored-by: Joe Oak <41307427+joeoak@users.noreply.github.com>
Co-authored-by: Janice <janiceilene@github.com>
2022-05-20 12:12:36 -07:00
Peter Bengtsson 8580fb5e42
fast HEAD requests (#27672)
* fast HEAD requests

* update test
2022-05-13 14:46:57 +00:00
Grace Park b98c83e924
REST operations sidebar (#26225)
* testing out a rest operations sidebar

* cleanup

* renamed 5 files

* renamed 5 files

* set redirect_from on 5 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 1 files

* renamed 2 files

* renamed 1 files

* renamed 4 files

* renamed 15 files

* renamed 2 files

* renamed 6 files

* renamed 1 files

* renamed 4 files

* renamed 7 files

* renamed 1 files

* renamed 3 files

* renamed 3 files

* renamed 1 files

* renamed 5 files

* renamed 1 files

* renamed 1 files

* renamed 3 files

* renamed 4 files

* renamed 1 files

* renamed 1 files

* renamed 2 files

* renamed 4 files

* renamed 1 files

* renamed 1 files

* renamed 1 files

* renamed 6 files

* renamed 6 files

* renamed 4 files

* move files

* adding more

* updating to add restcontext and start of removing data/reusables/rest-reference

* removed data/reusables

* add a RestMiniTocItem and updating the filtering to add a subcategory so all manually added H3s are in mini tocs in addition to operations

* remove console log

* [WIP]: REST New Proposal Sidebar (#26471)

* saving

* update sidebar

* remove console log

* update guides and overview

* import Category for category level rest pages

* update undefined restOperations

* update restOperationData category and subcategory levels"

* minor updates

* update get mini toc items function

* updating REST context for sidebar

* updating rest data

* remove console logs

* WIP: mini-toc-ing the sidebar

Co-authored-by: Robert Sese <rsese@github.com>

* A little cleanup

* Fix first subcategory link and add some comments

* updating anchor links in sidebar

* adding updates

* remove standalone

* update product and maptopic pages using article context

* add conditional link wrapper

* fix sidebar toggle and versions for enterprise admin

* update versions per subcategory

* Highlight sidebar link for current page

* Update miniToc hash links and hash change tracking

* fix unique key in CollapsibleSection

* Fix list markup

* remove title

* update permissions

* Hide minitocs on landing (#26594)

* hide minitocs on landing page

* simplify page components and remove minitoc from sidebar for guides/overview

* fix carats and category fix

* remove id

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

* updating content based on versions script check with the OpenAPI

* update script and content files

* update script and content/rest files

* update to add TocLanding

* update script

* update index files

* add codespaces repository-secrets

* remove openapi schema check script

* remove minitocs at the top

* add h2 about the {title} api

* fix tests/unit/openapi-schema.js

* Fix linting tests

* fix search/topics test

* fix tests/unit/pages test

* update rest/reference links in components

* run prettier

* Update components/rest/RestReferencePage.tsx

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

* Update components/rest/RestReferencePage.tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update pages/[versionId]/rest/[category]/[subcategory].tsx

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

* Update tests/unit/openapi-schema.js

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

* updating comment location

* remove dependabot override

* remove path-utils current product update for rest

* run linter

* remove dependabot.md and remove h2 heading on restreference

* update the correct product to rest for rest pages

* adding comments for updates to path-utils

* remove console log

* REST sidebar: handle legacy v3 redirects (#26686)

* Add script to handle legacy v3 REST redirects

* Run the script

* Handle a redirect to a redirect

* Update REST test URLs

* 'await' and test runs subcategory of checks

* Update REST URLs for routing/developer-site-redirects tests

* Update developer-redirects fixture with new REST URLs

* Resolve merge conflicts

* Update rest-redirects fixture with new REST URLs

* Fix broken links with REST pages re-org

* redirectTo could be undefined

* Fix script for posterity, can't redirect paths with hashes

* Remove invalid hash redirects

* Typically don't need to save one-off scripts

* Undo redirect changes (not necessary for handling v3 redirects)

* Remove script-added redirects

* Update old v3 redirects with new REST URLs

* No more GHES search indexing page

* 'org' not 'organization'

* Update fixture data for new REST URLs

* revert any content directory changes

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

* Adding test rest (#26750)

* add test to check openapi schema versions and content rest frontmatter versions

* update lib/redirects

* fix test and add error messages

* adding repository secrets

* adding repository-secrets.md

* Revert "update lib/redirects"

This reverts commit 3aafe28265764d5bc09c0c478c8e0ca099c8fbcf.

* remove lib/redirects changes and console logs

* Update lib/rest/index.js

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

* update unique key

* Rest client side redirects (#26754)

* adding tags subcategory for the rest content repos category

* run prettier

* bug fix for anchor scrolls" (#26892)

* updating width size for rest reference page

* Rest sidebar consolidation (#26862)

* refactor sidebar

* fix articlecontext provider issue on rest product landing page for all versions

* fix a bug, create new component

* revert change to create new component and fix bug

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

* Set currentAnchor with a hashchange handler (#26923)

* Rest sidebar design tweaks (#26807)

* Rest sidebar design tweaks

* tweak color to subtle

* use muted color and margin for line

* update to design feedback

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

* Remove cheerio from rest-collapsible (#26948)

* remove cheerio from rest-collapsible

* update type

* adding endswith instead

* use productId instead

* one off edge case for secret-scanning

* Reorganize subcategory and category, Update pre -> div, Add RestContext (#26950)

* reorganize subcategory and category

* add RestContext

* update comment

* update for endpoints page

* add comment

* move object to restcontext

* remove effectiveDate in restcontext

* remove width calculation for rest reference page

* fix adding manual writer's minitocs to sidebar

* update with feedback

* update comment

* update isRestReferencePage

* remove page component and fix bug

* adding back rest/index.tsx

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

* update content/rest"

* add back design tweak

* update to div

* update margins on rest api reference

* remove page component

* adding tests

* separate product from rest sidebar (#27065)

* separate product from rest sidebar

* Use ProductCollapsibleSections for product pages

* fix tests

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

* Rest sidebar translations (#27052)

* update translations

* remove general test

Co-authored-by: Robert Sese <rsese@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2022-04-20 10:19:48 -07:00
mc fd0ff51c33
Update rendering test - remove hardcoded links to Dependabot article (#26765)
* update the article the tests use to something a bit more stable
2022-04-11 07:29:04 +00:00
Peter Bengtsson 68400c52a8
don't test external early-access in unit tests (#26612)
* don't test external early-access in unit tests

* make the rendering tests less weird && gg push
2022-04-04 21:00:14 +00:00
Peter Bengtsson 8362602503
do rendering end-to-end tests with a real server (#26169)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* feedbacked
2022-03-18 17:06:12 -04:00
literarytea 1c203bf2c1
Site policy content re-org (#26112)
* Site policy reorg
2022-03-15 13:35:02 +00:00
Peter Bengtsson 9d4b913bdc
language redirects without cache (#25872)
* redirect to your preferred language (#25664)

* redirect to your preferred language

* refactorings

* use js-cookies

* make sure no cache when language is involved in the redirect

* fix tests
2022-03-07 16:25:22 +00:00
Peter Bengtsson e69144b51f
temporarily re-introduct includes/rest_operations_at_current_path.html (#25719) 2022-03-01 08:32:30 -05:00
Peter Bengtsson 95a3e82ac5
remove 'redirects versioned category page' test (#25304) 2022-02-15 21:44:34 +00:00
Peter Bengtsson 07c8fc3c2a
Decouple redirects from language (#24597)
* experimenting with redirects

* cleanup developer.json

* wip

* clean console.log

* progress

* some progress

* progress

* much progress

* debugging tests

* hacky progress

* ditch latest -> number redirects

* minor

* hacky progress

* lots of progress

* some small fixes

* fix rendering tests

* small fixes

* progress

* undo debugging

* better

* routing tests OK

* more cleaning

* unit tests

* undoing lineending edit

* undoing temporary debugging

* don't ever set this.redirects on Page

* cope with archived version redirects

* adding code comments on the major if statements

* address all feedback

* update README about redirects

* delete invalid test

* fix feedback
2022-02-14 20:19:10 +00:00
Peter Bengtsson 24d3ea6814
remove catch-bad-accept-language middleware (#25231) 2022-02-10 18:51:30 +00:00
Peter Bengtsson 5c9a83be7c
Stop doing Gzip in the middleware (#25227) 2022-02-10 11:01:56 -05:00
Peter Bengtsson f33ab1cf89
set 'manul-purge' surrogate key on assets/cb- URLs (#25028) 2022-02-04 11:55:40 -05:00
Robert Sese c5f9788223
Version the 'All products' link (#24972)
* Don't show link no matter what version you're on

* Maintain current version in link

* No 'All products' link on homepage for all versions
2022-02-03 16:31:05 +00:00
Jules Parker 75d1a1ed10 fixes test, potentially 2022-02-01 16:45:57 +01:00
Jules Parker 264c3f9638 Merge branch 'jules-4800' of github.com:github/docs-internal into jules-4800 2022-01-25 12:43:38 +01:00
Jules Parker e20f8548cf fixes conflict 2022-01-25 12:43:09 +01:00
Peter Bengtsson daf6c65884
rewrite enterprise-serverl@atest links to enterprise-server@<version> (#24476)
* rewrite enterprise-server@latest links to enterprise-server@<actual>

* update test
2022-01-21 13:39:48 +00:00
Peter Bengtsson bebdeea0ee
fix test 2022-01-20 09:27:11 -05:00
Matt Pollard bc80a1ad60 Merge branch 'main' into jules-4800 2022-01-20 14:24:04 +01:00
Robert Sese cc69799558
a11y: landing page headings adjustments (#24295)
* Adjust heading level and only heading with intro text

* Adjust heading level

* Adjust code example and guide card heading levels

* Adjust tests for new heading levels

* Adjust rendering test for new heading levels
2022-01-14 17:23:05 +00:00
Jules Parker d1ace77811 fixes tests 2022-01-13 15:08:29 +01:00
Jules Parker 63d3dedbb7 fixes tests 2022-01-13 14:59:12 +01:00
Jules Parker 1b05aa958d fixes tests 2022-01-13 14:44:37 +01:00
Jules Parker a7d13278d6 fixing tests 2022-01-13 12:22:16 +01:00