1
0
mirror of synced 2025-12-21 02:46:50 -05:00
Commit Graph

96 Commits

Author SHA1 Message Date
Peter Bengtsson
ae3dadfc66 cache asset images more aggressively (#23553)
* cache asset images more aggressively

* more careful about which gets the manual surrogate key

* fix rendered-content-link-checker script too

* feedbacked
2021-12-10 13:01:48 +00:00
Peter Bengtsson
77f298f225 301 redirects should not set-cookie (#23360)
* 301 redirects should not set-cookie

Part of #1316

* Update release-notes.js

* No public facing doc changes (#23355)

Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>

* New translation batch for pt (#23362)

* Add crowdin translations

* Run script/i18n/homogenize-frontmatter.js

* Run script/i18n/fix-translation-errors.js

* Run script/i18n/lint-translation-files.js --check parsing

* Run script/i18n/lint-translation-files.js --check rendering

* run script/i18n/reset-known-broken-translation-files.js

* Check in pt CSV report

* 24h cache all internal redirects without language prefix (#23354)

Part of #1271

* Redirects for root path should not set-cookie in all supported languages (#23377)

* test: add case when unsupported language is specified in redirect

* test: assert root redirects to appropriate language preference if specified

* refactor: remove redundant unit test

* refactor: re-order units starting with affirmative case

* refactor: remove single-use variable from unit

* fix: re-include previous unit with udpated description

Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Rogan Ferguson <40493721+roferg@users.noreply.github.com>
Co-authored-by: jmarlena <6732600+jmarlena@users.noreply.github.com>
Co-authored-by: docubot <67483024+docubot@users.noreply.github.com>
Co-authored-by: Francis <15894826+francisfuzz@users.noreply.github.com>
Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
2021-12-09 16:31:27 +00:00
Peter Bengtsson
7b5711e095 cache archived enterproxy proxy responses much longer (#23456)
* cache archived enterproxy proxy responses much longer

* Update middleware/archived-enterprise-versions.js

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

Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-12-08 19:55:12 +00:00
Peter Bengtsson
53e3077973 use 302 when redirecting from without language prefix (#23409)
Part of #1312
2021-12-07 14:07:11 +00:00
Peter Bengtsson
7c66d4456f static assets should not use csrf (Set-Cookie) (#23357)
* static assets should not use csrf (Set-Cookie)

Part of #1316

* move setFastlySurrogateKey up too
2021-12-06 13:00:34 +00:00
Peter Bengtsson
ddd14479c5 24h cache all internal redirects without language prefix (#23354)
Part of #1271
2021-12-03 21:51:04 +00:00
Grace Park
ed2495ed97 using legacy fake timers (#23110) 2021-11-29 18:40:31 +00:00
Grace Park
33c5ce2d36 Updating images styling and accessibility for minitocitems (#22976)
* updating images styling on design systems feedback

* maintaining ul li structure for accessiblity

Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
2021-11-19 00:56:51 +00:00
Grace Park
5a809be3dc MiniTocItems: rerender tocs and fix bugs (#22948)
* add key to force rerender tocs

* move up platform specific to properly display none and go back to using contents

* remove i
2021-11-17 22:29:07 -08:00
Grace Park
0afdf66a08 Primer Update: Table of Contents (#22933)
* update to ActionList

* fix nested mini tocs

* adding key

* remove li and fix tests

* update font size to 14px

* remove border radius
2021-11-18 00:27:12 +00:00
Kevin Heis
329a8c664e Create a shared picker component (#22836)
* Unified picker component

* Add picker to storybook

* TS fixes

* Simplify "mobile" header spacing

* Fix a few testid

* Update Picker.tsx

* Update Picker.tsx

* Update Picker.tsx

* Fix unit test

* Fix rendering tests
2021-11-16 19:10:28 +00:00
Kevin Heis
6ec20638b5 Version picker combo (#22694)
* Move version picker next to product picker

* Always render in header

* Inline variant

* Remove topper-sidebar

* Handle breadcrumb length

* Have breadcrumbs use Primer breakpoint

* Make a breadcrumbs scss module

* Update Breadcrumbs.tsx

* Update Breadcrumbs.module.scss

* Update Breadcrumbs.module.scss

* Update server.js

* Use responsive classes for hide/show breadcrumb
2021-11-10 16:20:34 +00:00
Kevin Heis
567652b0e3 Primer 18 b (#22462)
* Create migrate-colors-primer-18.js

* Update colors round 1

* upgrade primer packages

* Update index.scss

* Replace auto colors

* remove btn-primary-matte

* Turns out the class names and variables names DONT LINE UP... ugh....

* Check for allowed var colors
2021-10-28 19:17:23 +00:00
Edward Thomson
0fee9aedcd Landing page: groups of features (#22313)
* homepage: reduce padding below search area

Bring as much useful content up "above the fold".

* homepage: add groups for the front page sections

Group the homepage links into sections that map to the GitHub features
page (`/features`) plus two groups that are bespoke to the docs ("Get
started" and "Developers").

* homepage: update group design

Group the feature list area using the design exploration work by
@arisacoba.  Remove the description.

* homepage: remove ungrouped items from main area

Remove ungrouped items (like the external links) from the main feature
area.  Users can still navigate to ungrouped items in the sidebar.

* fix tsc error, use Link component

* homepage: support empty icon in group

Don't assume that we have icons everywhere on the landing page groups.

* homepage: drop octocat/invertocat

Looks weird with the modern icons, looks bad in dark mode.  Drop them
for now.

* homepage: document the childGroups frontmatter property

* homepage: don't test that sidebar == main content

We're reducing the links on the homepage in the main content area, but
the sidebar should be the complete list of products.  Remove the tests
that ensure that the main content area has all the sidebar content.  But
keep the tests that ensure that the sidebar content has all the links in
the main content area.

* homepage: remove "GitHub" doc set

The "GitHub" doc set "will be removed soon as we keep moving more content
out of it, so let's not include it here to keep the page more
evergreen."

* homepage: don't test that `/github` is linked on the main page

We're removing the `/github` doc set, and it's now not in the main page
grouped links.  Remove the test that `/github` exists, now look for
`/get-started`.

* homepage: use octicons instead of images

The images from https://github.com/features will be updated 🔜 - in
the meantime, let's use octicons which are consistent and give visual
interest.

* homepage: use octicons from @primer/octicons-react

Using the react components adds `<svg>` elements instead of `<img>`
elements, which lets the element use the current fill color, supporting
both light and dark themes.

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Emily Gould <4822039+emilyistoofunky@users.noreply.github.com>
2021-10-22 17:58:16 +00:00
Peter Bengtsson
4e4ca1d12d gg commit (#22323)
Part of #1061
2021-10-20 09:45:18 -04:00
Peter Bengtsson
1d72d4c87e use temporary redirect to inject locale prefix (#22239)
* use temporary redirect to inject locale prefix

Fixes #996

* fix routing tests
2021-10-18 20:09:20 +00:00
Laura Coursen
8f964ea2cb GHEC version (#20947)
Co-authored-by: Matt Pollard <mattpollard@users.noreply.github.com>
Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>
2021-10-15 15:41:33 -05:00
Grace Park
fd3d223bce Adding links to all skipped tests (#22037)
* adding links to all skipped tests

* updating links
2021-10-08 21:53:44 +00:00
Matt Pollard
307e8094ec Backport updated content from GitHub AE M2 megabranch and version for ghae-next (#21525) 2021-10-04 16:11:57 +00:00
Mike Surowiec
85f6a43502 Mini TOC semantic rendering (#21836)
* semantic rendering of miniTocItems

* feat: create nested mini toc structure to simplify semantic rendering

* remove className usage of indentationLevel in miniToc rendering

* manually run script/graphql/update-files.js to update pre-rendered files

* use less brittle regex method to extract number
2021-10-04 10:48:42 -04:00
Mike Surowiec
d81f51ebf7 Picker improvements (#21765)
* close Language and ArticleVersion pickers after click

* cleanup ArticleGridLayout due to VersionPicker changes

* fix tsc errors resulting from primer upgrade

* fix / update tests

* cleanup mobile pickers visual consistency

* use btn-sm on VersionPicker

* update translation and close on click for enterprise releases

Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
2021-09-30 20:22:13 +00:00
Marcelo Jacobus
aed6c1654f translation batch 1632491035 (#21717) 2021-09-30 11:53:04 +00:00
Laura Coursen
b8429d8248 "Authentication" top-level doc set (#21531) 2021-09-21 19:27:08 +00:00
Laura Coursen
57740f3424 Add "Repositories" doc set (#21294) 2021-09-10 13:48:54 +00:00
Kevin Heis
9f7c20dae8 Upgrade Primer CSS to version 17, removing marketing styles (#20965)
* Package updates

* Fix up things that look broken

* Add to utils

* Lead now just sets font size, just use f3 where needed

* Update package-lock.json

* Update index.tsx

* Delete bump-link.scss

* Update trigger-error.js

* Update components/GenericError.tsx

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>

* Update ArticlePage.tsx

* Update ActionBar.tsx

* Changes from meeting

* Found a few more monos

* Fix from a merge conflict

* Missed a few f3s

* Update SubLandingHero.tsx

* Bye gradients

* Match up breadcrumbs

* Update SubLandingHero.tsx

* Update lists.scss

Co-authored-by: Ash Guillaume <10384315+ashygee@users.noreply.github.com>
2021-08-31 14:49:39 -07:00
Laura Coursen
60b0d95f0d Hide the GitHub Insights docs (#20414) 2021-08-25 18:36:35 +00:00
Mike Surowiec
5f5aa0b0d1 BumpLink component (#21033)
* create BumpLink component, re-org components/ui
2021-08-24 11:25:38 -04:00
Laura Coursen
0f03dac1ea Create "Account and profile" top-level docset (#20982) 2021-08-24 15:08:25 +00:00
Mike Surowiec
c433c43019 Sidebar refactor: scope css + more (#20837)
* refactor sidebar, scope css, wire up nav events to link component, update tests

* remove link onClick analytics event

* fix: missing key on breadcrumbs
2021-08-12 15:28:32 -04:00
Mike Surowiec
23f4681b42 Scope product-callout and contributor-callout css to component (#20801)
* remove custom css for product-callout and contributor-callout

* create callout component, update existing test

* use Callout in more places
2021-08-11 17:50:20 +00:00
Ramya Parimi
306751cd62 remove inter fonts, copy-webpack-plugin 2021-08-05 20:15:52 -05:00
Grace Park
2dbea3737a Removing algolia (#20633) 2021-08-05 13:10:51 -04:00
Mike Surowiec
a511c95c7f SCSS and Component cleanup (pt 1) (#20572)
* turn article.scss into a module + componentized

* Update Survey to use only component styles, add cancel button

* Update GenericError + 404 page to use only standard classes

* update LearningTrack to not use markdown-body

* remove / consolidate stylesheets

* cleanup Graphiql explorer page and scss

* Componentize Breadcrumb styles

* Componentize DeprecationBanner styles

* scope h2 a link style to markdown-body

* cleanup nav, organize page-header and page-footer components

* remove unused scroll-button.scss

* organize LanguagePicker and ProductPicker

* add declarations file

* remove featured-links.scss, update tests

* update list utility and toc test

* fix bad merge resolution

* update breadcrumbs test
2021-07-29 17:27:20 +00:00
Grace Park
44f451eb09 Removing webpack build step (#20405)
* removing webpack build step

* keep copywebpackplugin and add fonts to assets/fonts

* update marketing font path

* update font path

* update font

* remove builtAssets

* remove copying front end code with dist

* move Inter fonts to /assets/fonts/inter

* move copy-webpack-plugin back to deps

Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
2021-07-22 09:11:30 -07:00
Mike Surowiec
df38087aed Update 404/500 pages to no longer use liquid templates (#20450)
* Update 404/500 page rendering to no longer use liquid templates

* updating tests

* remove unused path

Co-authored-by: Grace Park <gracepark@github.com>
2021-07-21 12:22:30 -07:00
Grace Park
27aa5d92ea Remove FEATURE_NEXTJS Flag Part 1 (#20176)
* cleanup FEATURE_NEXTJS

* fixing some server tests

* updating article a for server tests

* update h2 to h4 map topic tests

* data off on TOCs

* updating dropdown article versions links

* Update so markdown renders in intros

* updating typo and all server tests are now passing

* remove nextjs feature flag

* head.js tests pass

* updating article-version-picker

* remove nextjs feature flag browser test

* update header.js tests

* fix page-titles.js test

* fix deprecated-enterprise versions

* adding early access

* testing

* getting childTocItem

* fixing table of contents to show child toc items

* updated to 2 because the sidebar article also has the same link

* remove comment

* updating pick

* Update TocLandingContext.tsx

* update package.json and change className to h4 for h2

* updating with mikes feedback

* remove a.active test

* React clean up: Delete unnecessary layouts/includes Part 2 (#20143)

* Delete unnecessary layouts

* setting back tests failing :(

* update layouts

* delete unnecessary includes

* remove github-ae-release-notes and updating layouts

* remove a.active test
2021-07-16 14:54:25 -07:00
Kevin Heis
8a56437c93 Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00
Kevin Heis
42e785b0a8 Migrate CommonJS to ESM (#20301)
* First run of script

* Get the app running --- ish

* Get NextJS working

* Remove `node:`

* Get more tests passing in unit directory

* Update FailBot test to use nock

* Update test.yml

* Update Dockerfile

* tests/content fixes

* Update page.js

* Update build-changelog.js

* updating tests/routing

* Update orphan-tests.js

* updating tests/rendering

* Update .eslintrc.js

* Update .eslintrc.js

* Install jest/globals

* "linting" tests

* staging update to server.mjs

* Change '.github/allowed-actions.js' to a ESM export

* Lint

* Fixes for the main package.json

* Move Jest to be last in the npm test command so we can pass args

* Just use 'npm run lint' in the npm test command

* update algolia label script

* update openapi script

* update require on openapi

* Update enterprise-algolia-label.js

* forgot JSON.parse

* Update lunr-search-index.js

* Always explicitly include process.cwd() for JSON file reads pathed from project root

* update graphql/update-files.js script

* Update other npm scripts using jest to pass ESM NODE_OPTIONS

* Update check-for-enterprise-issues-by-label.js for ESM

* Update create-enterprise-issue.js for ESM

* Import jest global for browser tests

* Convert 'script/deploy' to ESM

Co-authored-by: Grace Park <gracepark@github.com>
Co-authored-by: James M. Greene <jamesmgreene@github.com>
2021-07-14 13:49:18 -07:00
Sarah Schneider
3b78be7ff0 Merge branch 'main' into revert-20087-revert-20069-fix-homepage-versions-dropdown 2021-06-23 18:55:17 -04:00
Grace Park
cbed05ad17 usefaketimers on server test 2021-06-23 11:13:06 -07:00
Sarah Schneider
af018389ce add tests to ensure that the homepages have the expected links 2021-06-23 13:09:04 -04:00
Grace Park
d3d1902414 Merge pull request #20017 from github/upgrade-esm
Enforce and Move to Top Level require
2021-06-22 11:27:48 -07:00
Grace Park
9401a8f13a Merge branch 'main' into upgrade-esm 2021-06-18 13:13:53 -07:00
Emily Gould
1e5372ac79 Move Getting started category to top-level doc set (#20008)
* Move category to top-level doc set

* Move doc set to the top and update short title

* Undo package-lock changes

* updated hardcoded refs in tests

* Update test

* Fix hardcoded link in test

Co-authored-by: Sarah Schneider <sarahs@github.com>
2021-06-18 17:13:04 +00:00
Grace Park
0762734b43 fixed easy global requires 2021-06-17 18:39:38 -07:00
Grace Park
310cc5309b pull in main and conflicts 2021-06-16 14:02:31 -07:00
Grace Park
1823cff641 updating pages to page-data 2021-06-15 11:02:05 -07:00
Grace Park
b8cb15444b update test 2021-06-10 09:43:32 -07:00
Sarah Schneider
f41ff942cf add tests 2021-06-08 10:03:56 -04:00
Sarah Schneider
5978edb47b remove feature flagged code 2021-05-20 10:01:33 -04:00