diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000000..854cb73a81 --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["next/babel"], + "plugins": [["styled-components", { "ssr": true }]] +} diff --git a/.github/ISSUE_COMMENT_TEMPLATE/batch-status.yml b/.github/ISSUE_COMMENT_TEMPLATE/batch-status.yml new file mode 100644 index 0000000000..1f4789c282 --- /dev/null +++ b/.github/ISSUE_COMMENT_TEMPLATE/batch-status.yml @@ -0,0 +1,33 @@ +--- +name: Batch Status Update +description: Batch Status Update +body: + - type: dropdown + attributes: + label: Status + options: + - label: "GREEN \U0001F7E2 (All good, smooth sailing)" + value: 'Status: GREEN' + - label: + "YELLOW \U0001F7E1 (We've identified areas of concern, but have them under + control at this time)" + value: 'Status: YELLOW' + - label: "RED \U0001F534 (We need help, there are blockers beyond our control)" + value: 'Status: RED' + - label: GREY ⚪️ (Not started, paused, not currently being worked on) + value: 'Status: GREY' + - label: "BLACK ⚫️ (We shipped it \U0001F389)" + value: 'Status: BLACK' + - type: input + attributes: + label: Target date + format: date + - type: textarea + attributes: + label: Update + placeholder: A few words on how it's going + - type: input + attributes: + label: 'Attribution' + value: '_created with :heart: by typing_ `/status`' + format: text diff --git a/.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml b/.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml deleted file mode 100644 index ad29b79ce3..0000000000 --- a/.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: A brief status update -description: A brief status update. -body: - - type: dropdown - attributes: - label: Status - options: - - label: 'GREY ⚪️ (Not started, paused, not currently being worked on)' - value: 'Status: GREY' - - label: 'GREEN 🟢 (All good, smooth sailing)' - value: 'Status: GREEN' - - label: "YELLOW \U0001F7E1 (On track, with hurdles to work through)" - value: 'Status: YELLOW' - - label: "RED \U0001F534 (BLOCKED)" - value: 'Status: RED' - - label: "BLACK ⚫️ (We shipped it \U0001F389)" - value: 'Status: BLACK' - - type: textarea - attributes: - label: Update Summary - placeholder: - Brief summary of the status and next steps. Any blockers should be - called out specifically. - - type: input - attributes: - label: 'Attribution' - value: '_created with :heart: by typing_ `/status`' - format: text diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b5f0ccbfec..d10906d962 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,19 +12,20 @@ Thanks again! ### Why: +Closes [issue link] + -**Closes [issue link]** ### What's being changed: ### Check off the following: -- [ ] I have reviewed my changes in staging. (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**) -- [ ] For content changes, I have reviewed the [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md) -- [ ] For content changes, I have reviewed the [Content style guide for GitHub Docs](https://github.com/github/docs/blob/main/contributing/content-style-guide.md). + +- [ ] I have reviewed my changes in staging (look for the **deploy-to-heroku** link in your pull request, then click **View deployment**). +- [ ] For content changes, I have completed the [self-review checklist](https://github.com/github/docs/blob/main/CONTRIBUTING.md#self-review). ### Writer impact (This section is for GitHub staff members only): diff --git a/.github/actions-scripts/fr-add-docs-reviewers-requests.py b/.github/actions-scripts/fr-add-docs-reviewers-requests.py new file mode 100644 index 0000000000..0dfd87fcf1 --- /dev/null +++ b/.github/actions-scripts/fr-add-docs-reviewers-requests.py @@ -0,0 +1,232 @@ +# TODO: Convert to JavaScript for language consistency + +import json +import logging +import os +import requests + +# Constants +endpoint = 'https://api.github.com/graphql' + +# ID of the github/github repo +github_repo_id = "MDEwOlJlcG9zaXRvcnkz" + +# ID of the docs-reviewers team +docs_reviewers_id = "MDQ6VGVhbTQzMDMxMzk=" + +# ID of the "Docs content first responder" board +docs_project_id = "MDc6UHJvamVjdDQ1NzI0ODI=" + +# ID of the "OpenAPI review requests" column on the "Docs content first responder" board +docs_column_id = "PC_lAPNJr_OAEXFQs4A2OFq" + +# 100 is an educated guess of how many PRs are opened in a day on the github/github repo +# If we are missing PRs, either increase this number or increase the frequency at which this script is run +num_prs_to_search = 100 + +logging.basicConfig(level=logging.INFO) +logger = logging.getLogger(__name__) + + +def find_open_prs_for_repo(repo_id: str, num_prs: int): + """Return data about a specified number of open PRs for a specified repo + + Arguments: + repo_id: The node ID of the repo to search + num_prs: The max number of PRs to return + + Returns: + Returns a JSON object of this structure: + { + "data": { + "node": { + "pullRequests": { + "nodes": [ + { + "id": str, + "isDraft": bool, + "reviewRequests": { + "nodes": [ + { + "requestedReviewer": { + "id": str + } + }... + ] + }, + "projectCards": { + "nodes": [ + { + "project": { + "id": str + } + }... + ] + } + }... + ] + } + } + } + } + """ + + query = """query ($repo_id: ID!, $num_prs: Int!) { + node(id: $repo_id) { + ... on Repository { + pullRequests(last: $num_prs, states: OPEN) { + nodes { + id + isDraft + reviewRequests(first: 10) { + nodes { + requestedReviewer { + ... on Team { + id + } + } + } + } + projectCards(first: 10) { + nodes { + project { + id + } + } + } + } + } + } + } + } + """ + + variables = { + "repo_id": github_repo_id, + "num_prs": num_prs + } + + response = requests.post( + endpoint, + json={'query': query, 'variables': variables}, + headers = {'Authorization': f"bearer {os.environ['TOKEN']}"} + ) + + response.raise_for_status() + + json_response = json.loads(response.text) + + if 'errors' in json_response: + raise RuntimeError(f'Error in GraphQL response: {json_response}') + + return json_response + +def add_prs_to_board(prs_to_add: list, column_id: str): + """Adds PRs to a column of a project board + + Arguments: + prs_to_add: A list of PR node IDs + column_id: The node ID of the column to add the PRs to + + Returns: + Nothing + """ + + logger.info(f"adding: {prs_to_add}") + + mutation = """mutation($pr_id: ID!, $column_id: ID!) { + addProjectCard(input:{contentId: $pr_id, projectColumnId: $column_id}) { + projectColumn { + name + } + } + }""" + + for pr_id in prs_to_add: + logger.info(f"Attempting to add {pr_id} to board") + + variables = { + "pr_id": pr_id, + "column_id": column_id + } + + response = requests.post( + endpoint, + json={'query': mutation, 'variables': variables}, + headers = {'Authorization': f"bearer {os.environ['TOKEN']}"} + ) + + json_response = json.loads(response.text) + + if 'errors' in json_response: + logger.info(f"GraphQL error when adding {pr_id}: {json_response}") + +def filter_prs(data, reviewer_id: str, project_id): + """Given data about the draft state, reviewers, and project boards for PRs, + return just the PRs that are: + - not draft + - are requesting a review for the specified team + - are not already on the specified project board + + Arguments: + data: A JSON object of this structure: + { + "data": { + "node": { + "pullRequests": { + "nodes": [ + { + "id": str, + "isDraft": bool, + "reviewRequests": { + "nodes": [ + { + "requestedReviewer": { + "id": str + } + }... + ] + }, + "projectCards": { + "nodes": [ + { + "project": { + "id": str + } + }... + ] + } + }... + ] + } + } + } + } + reviewer_id: The node ID of the reviewer to filter for + project_id: The project ID of the project to filter against + + Returns: + A list of node IDs of the PRs that met the requirements + """ + + pr_data = data['data']['node']['pullRequests']['nodes'] + + prs_to_add = [] + + for pr in pr_data: + if ( + not pr['isDraft'] and + reviewer_id in [req_rev['requestedReviewer']['id'] for req_rev in pr['reviewRequests']['nodes'] if req_rev['requestedReviewer']] and + project_id not in [proj_card['project']['id'] for proj_card in pr['projectCards']['nodes']] + ): + prs_to_add.append(pr['id']) + + return prs_to_add + +def main(): + query_data = find_open_prs_for_repo(github_repo_id, num_prs_to_search) + prs_to_add = filter_prs(query_data, docs_reviewers_id, docs_project_id) + add_prs_to_board(prs_to_add, docs_column_id) + +if __name__ == "__main__": + main() diff --git a/.github/allowed-actions.js b/.github/allowed-actions.js index e8cce1d06d..71a5037dd7 100644 --- a/.github/allowed-actions.js +++ b/.github/allowed-actions.js @@ -9,6 +9,7 @@ module.exports = [ "actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", // v3.0.0 "actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0 "actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", // v2.1.4 + "actions/setup-python@dc73133d4da04e56a135ae2246682783cc7c7cb6", // v2.2.2 "ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", // v1.64.1 "actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", // v3.0.16 "alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9", diff --git a/.github/review-template.md b/.github/review-template.md new file mode 100644 index 0000000000..6567dfb616 --- /dev/null +++ b/.github/review-template.md @@ -0,0 +1,34 @@ +## Author self-review + +- [ ] The changes in this PR meet the user experience and goals outlined in the content design plan. +- [ ] I've compared my PR's source changes to staging and reviewed for versioning issues, redirects, the [style guide](https://github.com/github/docs/blob/main/contributing/content-style-guide.md), [content model](https://github.com/github/docs-content-strategy/blob/main/content-design/models.md), or [localization checklist](https://github.com/github/docs/blob/main/contributing/localization-checklist.md) rendering problems, typos, and wonky screenshots. +- [ ] I've worked through build failures and tests are passing. +- [ ] For REST API content, I've verified that endpoints, parameters, and responses are correct and work as expected and provided curl samples below. + + For more information, check out our [full review guidelines and checklist](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/reviews-and-feedback/review-process.md). + +## Review request + +### Summary + +_Help reviewers understand this project and its context by writing a paragraph summarizing its goals and intended user experience and explaining how the PR meets those goals._ +[Content design plan](LINK HERE) + +### Docs Content review + +_Give Docs Content any extra context, highlight areas for them to consider in their review, and ask them questions you need answered to ship the PR._ + +### Technical review + +_Ping in technical reviewers, asking them to review whether content is technically accurate and right for the audience._ +_Highlight areas for them to consider in their review and ask them questions you need answered to ship the PR._ + +### Content changes + +[PR on staging](LINK HERE) + +_Give a high-level overview of the changes in your PR and how they support the overall goals of the PR. Share links to important articles or changes in source and on staging. If your PR is large or complex, use a table to highlight changes with high user impact._ + +### Notes + +_Discuss test failures, versioning issues, or anything else reviewers should know to consider the overall user experience of the PR._ diff --git a/.github/workflows/add-review-template.yml b/.github/workflows/add-review-template.yml new file mode 100644 index 0000000000..380cfdb6d6 --- /dev/null +++ b/.github/workflows/add-review-template.yml @@ -0,0 +1,36 @@ +name: Add review template + +# **What it does**: When a specific label is added to a PR, adds the contents of .github/review-template.md as a comment in the PR +# **Why we have it**: To help Docs Content team members ensure that their PR is ready for review +# **Who does it impact**: docs-internal maintainers and contributors + +on: + pull_request: + types: + - labeled + +jobs: + comment-that-approved: + name: Add review template + runs-on: ubuntu-latest + if: github.event.label.name == 'docs-content-ready-for-review' && github.repository == 'github/docs-internal' + + steps: + - name: check out repo content + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + + # Jump through some hoops to work with a multi-line file + - name: Store review template in variable + run: | + TEMPLATE=$(cat .github/workflows/review-template.md) + echo "TEMPLATE<> $GITHUB_ENV + echo "$TEMPLATE" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Comment on the PR + run: | + gh pr comment $PR --body "$TEMPLATE" + env: + GITHUB_TOKEN: ${{secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES}} + PR: ${{ github.event.pull_request.html_url }} + TEMPLATE: ${{ env.TEMPLATE }} diff --git a/.github/workflows/docs-review-collect.yml b/.github/workflows/docs-review-collect.yml new file mode 100644 index 0000000000..255774a382 --- /dev/null +++ b/.github/workflows/docs-review-collect.yml @@ -0,0 +1,35 @@ +name: Add docs-reviewers request to FR board + +# **What it does**: Adds PRs in github/github that requested a review from docs-reviewers to the FR board +# **Why we have it**: To catch docs-reviewers requests in github/github +# **Who does it impact**: docs-content maintainers + +on: + workflow_dispatch: + schedule: + - cron: '25 4 * * *' + +jobs: + add-requests-to-board: + name: Add requests to board + runs-on: ubuntu-latest + + steps: + - name: Check out repo content + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + + - name: Set up Python 3.9 + uses: actions/setup-python@dc73133d4da04e56a135ae2246682783cc7c7cb6 + with: + python-version: '3.9' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install requests + + - name: Run script + run: | + python .github/actions-scripts/fr-add-docs-reviewers-requests.py + env: + TOKEN: ${{ secrets.DOCS_BOT }} diff --git a/.github/workflows/send-issues-to-how-how-we-work-boards.yml b/.github/workflows/send-issues-to-how-how-we-work-boards.yml index c60f2e7386..dfd73bbb1c 100644 --- a/.github/workflows/send-issues-to-how-how-we-work-boards.yml +++ b/.github/workflows/send-issues-to-how-how-we-work-boards.yml @@ -51,7 +51,7 @@ jobs: with: github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} script: | - var column_id = 13445932; + var column_id = 12860544; try { github.projects.createCard({ column_id: column_id, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5434dd0c1..bd21c52ce9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -158,12 +158,12 @@ We (usually the docs team, but sometimes GitHub product managers, engineers, or You should always review your own PR first. For content changes, make sure that you: -- [ ] Confirm that the changes address every part of the content design plan from your issue (if there are differences, explain them). +- [ ] Confirm that the changes meet the user experience and goals outlined in the content design plan (if there is one). +- [ ] Compare your pull request's source changes to staging to confirm that the output matches the source and that everything is rendering as expected. This helps spot issues like typos, content that doesn't follow the style guide, or content that isn't rendering due to versioning problems. Remember that lists and tables can be tricky. - [ ] Review the content for technical accuracy. - [ ] Review the entire pull request using the [localization checklist](contributing/localization-checklist.md). -- [ ] Copy-edit the changes for grammar, spelling, and adherence to the style guide. +- [ ] Copy-edit the changes for grammar, spelling, and adherence to the [style guide](https://github.com/github/docs/blob/main/contributing/content-style-guide.md). - [ ] Check new or updated Liquid statements to confirm that versioning is correct. -- [ ] Check that all of your changes render correctly in staging. Remember, that lists and tables can be tricky. - [ ] If there are any failing checks in your PR, troubleshoot them until they're all passing. ### Pull request template diff --git a/assets/images/help/codespaces/add-dotnet-prebuilt-container.png b/assets/images/help/codespaces/add-dotnet-prebuilt-container.png new file mode 100644 index 0000000000..cab1a516da Binary files /dev/null and b/assets/images/help/codespaces/add-dotnet-prebuilt-container.png differ diff --git a/assets/images/help/codespaces/add-dotnet-version.png b/assets/images/help/codespaces/add-dotnet-version.png new file mode 100644 index 0000000000..f173a586ac Binary files /dev/null and b/assets/images/help/codespaces/add-dotnet-version.png differ diff --git a/assets/images/help/codespaces/add-extension.png b/assets/images/help/codespaces/add-extension.png new file mode 100644 index 0000000000..ccbc9059da Binary files /dev/null and b/assets/images/help/codespaces/add-extension.png differ diff --git a/assets/images/help/codespaces/add-java-prebuilt-container.png b/assets/images/help/codespaces/add-java-prebuilt-container.png new file mode 100644 index 0000000000..f713636323 Binary files /dev/null and b/assets/images/help/codespaces/add-java-prebuilt-container.png differ diff --git a/assets/images/help/codespaces/add-java-version.png b/assets/images/help/codespaces/add-java-version.png new file mode 100644 index 0000000000..2462b51118 Binary files /dev/null and b/assets/images/help/codespaces/add-java-version.png differ diff --git a/assets/images/help/codespaces/add-nodejs-selection.png b/assets/images/help/codespaces/add-nodejs-selection.png new file mode 100644 index 0000000000..4b949ccc9e Binary files /dev/null and b/assets/images/help/codespaces/add-nodejs-selection.png differ diff --git a/assets/images/help/codespaces/add-python-prebuilt-container.png b/assets/images/help/codespaces/add-python-prebuilt-container.png new file mode 100644 index 0000000000..5b5c4f24e2 Binary files /dev/null and b/assets/images/help/codespaces/add-python-prebuilt-container.png differ diff --git a/assets/images/help/codespaces/add-python-version.png b/assets/images/help/codespaces/add-python-version.png new file mode 100644 index 0000000000..5c727513d9 Binary files /dev/null and b/assets/images/help/codespaces/add-python-version.png differ diff --git a/assets/images/help/codespaces/autofetch-all.png b/assets/images/help/codespaces/autofetch-all.png new file mode 100644 index 0000000000..b4d8d68860 Binary files /dev/null and b/assets/images/help/codespaces/autofetch-all.png differ diff --git a/assets/images/help/codespaces/autofetch-search.png b/assets/images/help/codespaces/autofetch-search.png new file mode 100644 index 0000000000..96fe6b8799 Binary files /dev/null and b/assets/images/help/codespaces/autofetch-search.png differ diff --git a/assets/images/help/codespaces/branch-in-status-bar.png b/assets/images/help/codespaces/branch-in-status-bar.png new file mode 100644 index 0000000000..f7e57247a4 Binary files /dev/null and b/assets/images/help/codespaces/branch-in-status-bar.png differ diff --git a/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png b/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png index aaad64089c..fe8f1cddfa 100644 Binary files a/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png and b/assets/images/help/codespaces/click-connect-to-codespace-icon-vscode.png differ diff --git a/assets/images/help/codespaces/click-name-codespace.png b/assets/images/help/codespaces/click-name-codespace.png index 6519a32c0c..298559390f 100644 Binary files a/assets/images/help/codespaces/click-name-codespace.png and b/assets/images/help/codespaces/click-name-codespace.png differ diff --git a/assets/images/help/codespaces/click-remote-explorer-icon-vscode.png b/assets/images/help/codespaces/click-remote-explorer-icon-vscode.png index 9308dc0d1a..f48801f696 100644 Binary files a/assets/images/help/codespaces/click-remote-explorer-icon-vscode.png and b/assets/images/help/codespaces/click-remote-explorer-icon-vscode.png differ diff --git a/assets/images/help/codespaces/codespace-overview-annotated.png b/assets/images/help/codespaces/codespace-overview-annotated.png new file mode 100644 index 0000000000..b2c1a0d5ca Binary files /dev/null and b/assets/images/help/codespaces/codespace-overview-annotated.png differ diff --git a/assets/images/help/codespaces/codespace-overview.png b/assets/images/help/codespaces/codespace-overview.png index ead0ae0ad7..85ce39885b 100644 Binary files a/assets/images/help/codespaces/codespace-overview.png and b/assets/images/help/codespaces/codespace-overview.png differ diff --git a/assets/images/help/codespaces/codespaces-commit-checkmark-icon.png b/assets/images/help/codespaces/codespaces-commit-checkmark-icon.png new file mode 100644 index 0000000000..ba0ee69eaa Binary files /dev/null and b/assets/images/help/codespaces/codespaces-commit-checkmark-icon.png differ diff --git a/assets/images/help/codespaces/codespaces-commit-commit-message.png b/assets/images/help/codespaces/codespaces-commit-commit-message.png index 4ae2de19de..14faaf8b1e 100644 Binary files a/assets/images/help/codespaces/codespaces-commit-commit-message.png and b/assets/images/help/codespaces/codespaces-commit-commit-message.png differ diff --git a/assets/images/help/codespaces/codespaces-commit-pr-button.png b/assets/images/help/codespaces/codespaces-commit-pr-button.png index f38fe9b2b9..354876134a 100644 Binary files a/assets/images/help/codespaces/codespaces-commit-pr-button.png and b/assets/images/help/codespaces/codespaces-commit-pr-button.png differ diff --git a/assets/images/help/codespaces/codespaces-commit-pr.png b/assets/images/help/codespaces/codespaces-commit-pr.png index cb645f6a60..af97c71285 100644 Binary files a/assets/images/help/codespaces/codespaces-commit-pr.png and b/assets/images/help/codespaces/codespaces-commit-pr.png differ diff --git a/assets/images/help/codespaces/codespaces-commit-stage.png b/assets/images/help/codespaces/codespaces-commit-stage.png index b4fc5e9e0c..7aa3f95ed6 100644 Binary files a/assets/images/help/codespaces/codespaces-commit-stage.png and b/assets/images/help/codespaces/codespaces-commit-stage.png differ diff --git a/assets/images/help/codespaces/codespaces-manage-settings-sync.png b/assets/images/help/codespaces/codespaces-manage-settings-sync.png new file mode 100644 index 0000000000..8fa4b7ba06 Binary files /dev/null and b/assets/images/help/codespaces/codespaces-manage-settings-sync.png differ diff --git a/assets/images/help/codespaces/codespaces-manage.png b/assets/images/help/codespaces/codespaces-manage.png new file mode 100644 index 0000000000..f075b5ae37 Binary files /dev/null and b/assets/images/help/codespaces/codespaces-manage.png differ diff --git a/assets/images/help/codespaces/codespaces-npm-run-dev.png b/assets/images/help/codespaces/codespaces-npm-run-dev.png new file mode 100644 index 0000000000..06619076f1 Binary files /dev/null and b/assets/images/help/codespaces/codespaces-npm-run-dev.png differ diff --git a/assets/images/help/codespaces/codespaces-option-secrets-org.png b/assets/images/help/codespaces/codespaces-option-secrets-org.png new file mode 100644 index 0000000000..966d651282 Binary files /dev/null and b/assets/images/help/codespaces/codespaces-option-secrets-org.png differ diff --git a/assets/images/help/codespaces/codespaces-option-secrets.png b/assets/images/help/codespaces/codespaces-option-secrets.png new file mode 100644 index 0000000000..95748d4f6c Binary files /dev/null and b/assets/images/help/codespaces/codespaces-option-secrets.png differ diff --git a/assets/images/help/codespaces/create-codespace-vscode.png b/assets/images/help/codespaces/create-codespace-vscode.png index 6203f5349a..0af392afd3 100644 Binary files a/assets/images/help/codespaces/create-codespace-vscode.png and b/assets/images/help/codespaces/create-codespace-vscode.png differ diff --git a/assets/images/help/codespaces/create-new-branch.png b/assets/images/help/codespaces/create-new-branch.png new file mode 100644 index 0000000000..51927af59f Binary files /dev/null and b/assets/images/help/codespaces/create-new-branch.png differ diff --git a/assets/images/help/codespaces/custom-prompt.png b/assets/images/help/codespaces/custom-prompt.png new file mode 100644 index 0000000000..6a435cc167 Binary files /dev/null and b/assets/images/help/codespaces/custom-prompt.png differ diff --git a/assets/images/help/codespaces/delete-codespace-vscode.png b/assets/images/help/codespaces/delete-codespace-vscode.png index fbc2874e32..c987ce0ed9 100644 Binary files a/assets/images/help/codespaces/delete-codespace-vscode.png and b/assets/images/help/codespaces/delete-codespace-vscode.png differ diff --git a/assets/images/help/codespaces/delete-codespace.png b/assets/images/help/codespaces/delete-codespace.png index 1e9400e96e..83807fe652 100644 Binary files a/assets/images/help/codespaces/delete-codespace.png and b/assets/images/help/codespaces/delete-codespace.png differ diff --git a/assets/images/help/codespaces/dotnet-extensions.png b/assets/images/help/codespaces/dotnet-extensions.png new file mode 100644 index 0000000000..94e0a692ed Binary files /dev/null and b/assets/images/help/codespaces/dotnet-extensions.png differ diff --git a/assets/images/help/codespaces/dotnet-options.png b/assets/images/help/codespaces/dotnet-options.png new file mode 100644 index 0000000000..1e08584dad Binary files /dev/null and b/assets/images/help/codespaces/dotnet-options.png differ diff --git a/assets/images/help/codespaces/fairyfloss.png b/assets/images/help/codespaces/fairyfloss.png new file mode 100644 index 0000000000..b7fca6963e Binary files /dev/null and b/assets/images/help/codespaces/fairyfloss.png differ diff --git a/assets/images/help/codespaces/header-link.png b/assets/images/help/codespaces/header-link.png deleted file mode 100644 index 91546ceb07..0000000000 Binary files a/assets/images/help/codespaces/header-link.png and /dev/null differ diff --git a/assets/images/help/codespaces/manage-button.png b/assets/images/help/codespaces/manage-button.png new file mode 100644 index 0000000000..210f90d3aa Binary files /dev/null and b/assets/images/help/codespaces/manage-button.png differ diff --git a/assets/images/help/codespaces/organization-user-permission-settings.png b/assets/images/help/codespaces/organization-user-permission-settings.png new file mode 100644 index 0000000000..26095461c9 Binary files /dev/null and b/assets/images/help/codespaces/organization-user-permission-settings.png differ diff --git a/assets/images/help/codespaces/python-extensions.png b/assets/images/help/codespaces/python-extensions.png new file mode 100644 index 0000000000..aba349ea62 Binary files /dev/null and b/assets/images/help/codespaces/python-extensions.png differ diff --git a/assets/images/help/codespaces/python-port-forwarding.png b/assets/images/help/codespaces/python-port-forwarding.png new file mode 100644 index 0000000000..9d6e2d8001 Binary files /dev/null and b/assets/images/help/codespaces/python-port-forwarding.png differ diff --git a/assets/images/help/codespaces/quickstart-port-toast.png b/assets/images/help/codespaces/quickstart-port-toast.png new file mode 100644 index 0000000000..b7989b1fd4 Binary files /dev/null and b/assets/images/help/codespaces/quickstart-port-toast.png differ diff --git a/assets/images/help/codespaces/secret-repository-access.png b/assets/images/help/codespaces/secret-repository-access.png new file mode 100644 index 0000000000..84a89f3512 Binary files /dev/null and b/assets/images/help/codespaces/secret-repository-access.png differ diff --git a/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png b/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png new file mode 100644 index 0000000000..98d554f066 Binary files /dev/null and b/assets/images/help/codespaces/sign-in-to-view-codespaces-vscode-mac.png differ diff --git a/assets/images/help/codespaces/source-control-activity-bar-button.png b/assets/images/help/codespaces/source-control-activity-bar-button.png new file mode 100644 index 0000000000..1e63344780 Binary files /dev/null and b/assets/images/help/codespaces/source-control-activity-bar-button.png differ diff --git a/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png b/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png new file mode 100644 index 0000000000..d141308c29 Binary files /dev/null and b/assets/images/help/codespaces/source-control-ellipsis-button-nochanges.png differ diff --git a/assets/images/help/codespaces/source-control-ellipsis-button.png b/assets/images/help/codespaces/source-control-ellipsis-button.png new file mode 100644 index 0000000000..8ce074743d Binary files /dev/null and b/assets/images/help/codespaces/source-control-ellipsis-button.png differ diff --git a/assets/images/help/discussions/github-discussions-example.png b/assets/images/help/discussions/github-discussions-example.png new file mode 100644 index 0000000000..c450a4bd99 Binary files /dev/null and b/assets/images/help/discussions/github-discussions-example.png differ diff --git a/assets/images/help/issues/issue-example.png b/assets/images/help/issues/issue-example.png new file mode 100644 index 0000000000..8da1777c68 Binary files /dev/null and b/assets/images/help/issues/issue-example.png differ diff --git a/assets/images/help/organizations/select-selected-users-radio-button.png b/assets/images/help/organizations/select-selected-users-radio-button.png deleted file mode 100644 index c5633c80cd..0000000000 Binary files a/assets/images/help/organizations/select-selected-users-radio-button.png and /dev/null differ diff --git a/assets/images/help/profile/profile-block-or-report-button.png b/assets/images/help/profile/profile-block-or-report-button.png index a2b9ef0bf2..3f0067aea5 100644 Binary files a/assets/images/help/profile/profile-block-or-report-button.png and b/assets/images/help/profile/profile-block-or-report-button.png differ diff --git a/assets/images/help/projects/team-discussions-example.png b/assets/images/help/projects/team-discussions-example.png new file mode 100644 index 0000000000..974bf47161 Binary files /dev/null and b/assets/images/help/projects/team-discussions-example.png differ diff --git a/assets/images/help/pull_requests/pr-conversation-example.png b/assets/images/help/pull_requests/pr-conversation-example.png new file mode 100644 index 0000000000..3da37643e9 Binary files /dev/null and b/assets/images/help/pull_requests/pr-conversation-example.png differ diff --git a/assets/images/help/pull_requests/pr-files-changed-example.png b/assets/images/help/pull_requests/pr-files-changed-example.png new file mode 100644 index 0000000000..c34bbec611 Binary files /dev/null and b/assets/images/help/pull_requests/pr-files-changed-example.png differ diff --git a/assets/images/help/pull_requests/pull-request-body.png b/assets/images/help/pull_requests/pull-request-body.png new file mode 100644 index 0000000000..056bf8d8ce Binary files /dev/null and b/assets/images/help/pull_requests/pull-request-body.png differ diff --git a/assets/images/help/pull_requests/pull-request-comment.png b/assets/images/help/pull_requests/pull-request-comment.png new file mode 100644 index 0000000000..46b99b658c Binary files /dev/null and b/assets/images/help/pull_requests/pull-request-comment.png differ diff --git a/assets/images/help/settings/codespaces-audit-log-org.png b/assets/images/help/settings/codespaces-audit-log-org.png new file mode 100644 index 0000000000..d620caef44 Binary files /dev/null and b/assets/images/help/settings/codespaces-audit-log-org.png differ diff --git a/assets/images/help/settings/codespaces-audit-log.png b/assets/images/help/settings/codespaces-audit-log.png new file mode 100644 index 0000000000..f61434edab Binary files /dev/null and b/assets/images/help/settings/codespaces-audit-log.png differ diff --git a/assets/images/help/settings/codespaces-org-access-and-security-radio-buttons.png b/assets/images/help/settings/codespaces-org-access-and-security-radio-buttons.png new file mode 100644 index 0000000000..db6d261e00 Binary files /dev/null and b/assets/images/help/settings/codespaces-org-access-and-security-radio-buttons.png differ diff --git a/assets/images/help/settings/email_privacy.png b/assets/images/help/settings/email_privacy.png index d80772f3c9..86765ede84 100644 Binary files a/assets/images/help/settings/email_privacy.png and b/assets/images/help/settings/email_privacy.png differ diff --git a/assets/images/help/sponsors/disable-github-sponsors-account-dialog.png b/assets/images/help/sponsors/disable-github-sponsors-account-dialog.png new file mode 100644 index 0000000000..ec3ed69803 Binary files /dev/null and b/assets/images/help/sponsors/disable-github-sponsors-account-dialog.png differ diff --git a/assets/images/help/sponsors/disable-your-account-button.png b/assets/images/help/sponsors/disable-your-account-button.png new file mode 100644 index 0000000000..8e31b144ec Binary files /dev/null and b/assets/images/help/sponsors/disable-your-account-button.png differ diff --git a/assets/images/help/sponsors/unpublish-profile-button.png b/assets/images/help/sponsors/unpublish-profile-button.png new file mode 100644 index 0000000000..c76ae475fd Binary files /dev/null and b/assets/images/help/sponsors/unpublish-profile-button.png differ diff --git a/assets/images/help/sponsors/unpublish-profile-dialog.png b/assets/images/help/sponsors/unpublish-profile-dialog.png new file mode 100644 index 0000000000..0d657d97a7 Binary files /dev/null and b/assets/images/help/sponsors/unpublish-profile-dialog.png differ diff --git a/assets/images/site/labtocat.png b/assets/images/site/labtocat.png deleted file mode 100644 index d0e76b31f0..0000000000 Binary files a/assets/images/site/labtocat.png and /dev/null differ diff --git a/assets/images/site/waldocat.png b/assets/images/site/waldocat.png deleted file mode 100644 index c65191e880..0000000000 Binary files a/assets/images/site/waldocat.png and /dev/null differ diff --git a/components/Breadcrumbs.tsx b/components/Breadcrumbs.tsx new file mode 100644 index 0000000000..04f4e5fe53 --- /dev/null +++ b/components/Breadcrumbs.tsx @@ -0,0 +1,42 @@ +import cx from 'classnames' +import Link from 'next/link' +import { useRouter } from 'next/router' +import { useMainContext } from './context/MainContext' + +export type BreadcrumbT = { + title: string + documentType?: string + href?: string +} + +type Props = {} +export const Breadcrumbs = (props: Props) => { + const router = useRouter() + const pathWithLocale = `/${router.locale}${router.asPath}` + const { breadcrumbs } = useMainContext() + + return ( + + ) +} diff --git a/components/Contribution.tsx b/components/Contribution.tsx new file mode 100644 index 0000000000..e7135a6663 --- /dev/null +++ b/components/Contribution.tsx @@ -0,0 +1,29 @@ +import { GitPullRequestIcon } from '@primer/octicons-react' +import { useMainContext } from 'components/context/MainContext' +import { useTranslation } from 'components/hooks/useTranslation' + +export const Contribution = () => { + const { relativePath } = useMainContext() + const { t } = useTranslation('contribution_cta') + + const contribution_href = relativePath + ? `https://github.com/github/docs/edit/main/content/${relativePath}` + : 'https://github.com/github/docs' + + return ( +
+

{t`title`}

+

{t`body`}

+ + + {t`button`} + +

+ {t`or`}{' '} + + {t`to_guidelines`} + +

+
+ ) +} diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx new file mode 100644 index 0000000000..8bc37100d6 --- /dev/null +++ b/components/DefaultLayout.tsx @@ -0,0 +1,35 @@ +import Head from 'next/head' + +// import { Sidebar } from 'components/Sidebar' +import { Header } from 'components/Header' +import { SmallFooter } from 'components/SmallFooter' +import { ScrollButton } from 'components/ScrollButton' +import { SupportSection } from 'components/SupportSection' +import { DeprecationBanner } from 'components/DeprecationBanner' +import { useMainContext } from 'components/context/MainContext' + +type Props = { children?: React.ReactNode } +export const DefaultLayout = (props: Props) => { + const { builtAssets, expose } = useMainContext() + return ( +
+ + +