Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanpalm authored Jan 7, 2022
2 parents d798e89 + 18e5059 commit 2d45d69
Show file tree
Hide file tree
Showing 292 changed files with 2,626 additions and 1,766 deletions.
1 change: 1 addition & 0 deletions .github/workflows/merged-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

permissions:
issues: write
pull-requests: write

jobs:
comment:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 32 additions & 29 deletions components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,35 +209,38 @@ export function Search({
<div data-testid="search" aria-hidden="true">
<div className="position-relative z-2">
<form role="search" className="width-full d-flex" noValidate onSubmit={onFormSubmit}>
<input
data-testid="site-search-input"
ref={inputRef}
className={cx(
styles.searchInput,
iconSize === 24 && 'form-control px-6 f4',
iconSize === 16 && 'form-control px-5 f4',
variant === 'compact' && 'py-2',
variant === 'expanded' && 'py-3',
isHeaderSearch && styles.searchInputHeader,
!isHeaderSearch && 'width-full',
isHeaderSearch && query && styles.searchInputExpanded,
isHeaderSearch && query && 'position-absolute top-0 right-0'
)}
style={{
background: `var(--color-canvas-default) url("/assets/images/octicons/search-${iconSize}.svg") no-repeat ${
iconSize === 24 ? '12px' : '6px'
}`,
}}
type="search"
placeholder={t`placeholder`}
autoComplete="off"
autoCorrect="off"
autoCapitalize="off"
spellCheck="false"
maxLength={512}
onChange={onSearch}
value={localQuery}
/>
<label className="text-normal width-full">
<span className="visually-hidden">{t`placeholder`}</span>
<input
data-testid="site-search-input"
ref={inputRef}
className={cx(
styles.searchInput,
iconSize === 24 && 'form-control px-6 f4',
iconSize === 16 && 'form-control px-5 f4',
variant === 'compact' && 'py-2',
variant === 'expanded' && 'py-3',
isHeaderSearch && styles.searchInputHeader,
!isHeaderSearch && 'width-full',
isHeaderSearch && query && styles.searchInputExpanded,
isHeaderSearch && query && 'position-absolute top-0 right-0'
)}
style={{
background: `var(--color-canvas-default) url("/assets/images/octicons/search-${iconSize}.svg") no-repeat ${
iconSize === 24 ? '12px' : '6px'
}`,
}}
type="search"
placeholder={t`placeholder`}
autoComplete="off"
autoCorrect="off"
autoCapitalize="off"
spellCheck="false"
maxLength={512}
onChange={onSearch}
value={localQuery}
/>
</label>
<button className="d-none" type="submit" title="Submit the search query." hidden />
</form>
</div>
Expand Down
7 changes: 4 additions & 3 deletions components/page-header/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ export type BreadcrumbT = {

export const Breadcrumbs = () => {
const router = useRouter()
const pathWithLocale = `/${router.locale}${router.asPath.split('?')[0]}` // remove query string
// remove query string and hash
const pathWithLocale = `/${router.locale}${router.asPath.split('?')[0].split('#')[0]}`
const { breadcrumbs } = useMainContext()

return (
/*
NOTE: The breadcrumbs class and the nav tag are used by the
LUNR search scripts. The a tag generated by the Link is also used.
NOTE: The breadcrumbs class and the nav tag are used by the
Lunr search scripts. The a tag generated by the Link is also used.
If these change, please also change
updating script/search/parse-page-sections-into-records.js.
*/
Expand Down
8 changes: 7 additions & 1 deletion components/page-header/LanguagePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export const LanguagePicker = ({ variant }: Props) => {
const langs = Object.values(languages)
const selectedLang = languages[locale]

// The `router.asPath` will always be without a hash in SSR
// So to avoid a hydraration failure on the client, we have to
// normalize it to be without the hash. That way the path is treated
// in a "denormalized" way.
const routerPath = router.asPath.split('#')[0]

return (
<Picker
variant={variant}
Expand All @@ -25,7 +31,7 @@ export const LanguagePicker = ({ variant }: Props) => {
text: lang.nativeName || lang.name,
selected: lang === selectedLang,
item: (
<Link href={router.asPath} locale={lang.code}>
<Link href={routerPath} locale={lang.code}>
{lang.nativeName ? (
<>
<span lang={lang.code}>{lang.nativeName}</span> (
Expand Down
4 changes: 3 additions & 1 deletion components/sidebar/SidebarProduct.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const SidebarProduct = () => {
}

const productTitle = currentProductTree.renderedShortTitle || currentProductTree.renderedFullTitle
const routePath = `/${router.locale}${router.asPath.split('?')[0]}` // remove query string
// remove query string and hash
const routePath = `/${router.locale}${router.asPath.split('?')[0].split('#')[0]}`

const hasExactCategory = !!currentProductTree.childPages.find(({ href }) =>
routePath.includes(href)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Action | Description
`protected_branch.update_require_code_owner_review ` | Enforcement of required code owner review is updated on a branch.
`protected_branch.dismiss_stale_reviews ` | Enforcement of dismissing stale pull requests is updated on a branch.
`protected_branch.update_signature_requirement_enforcement_level ` | Enforcement of required commit signing is updated on a branch.
`protected_branch.update_pull_request_reviews_enforcement_level ` | Enforcement of required pull request reviews is updated on a branch.
`protected_branch.update_pull_request_reviews_enforcement_level ` | Enforcement of required pull request reviews is updated on a branch. Can be one of `0`(deactivated), `1`(non-admins), `2`(everyone).
`protected_branch.update_required_status_checks_enforcement_level ` | Enforcement of required status checks is updated on a branch.
`protected_branch.rejected_ref_update ` | A branch update attempt is rejected.
`protected_branch.policy_override ` | A branch protection requirement is overridden by a repository administrator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Organization owners and billing managers can view {% data variables.product.prod

{% data reusables.organizations.billing-settings %}
{% data reusables.dotcom_billing.codespaces-minutes %}
{% data reusables.dotcom_billing.codespaces-report-download %}

## Viewing {% data variables.product.prodname_codespaces %} usage for your enterprise account

Expand All @@ -27,4 +28,4 @@ Enterprise owners and billing managers can view {% data variables.product.prodna
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.billing-tab %}
1. Under "{% data variables.product.prodname_codespaces %}", view the usage details of each organization in your enterprise account.
1. Under "{% data variables.product.prodname_codespaces %}", view the usage details of each organization in your enterprise account.
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ For more information, see "[Managing the publication of {% data variables.produc
| `update_require_code_owner_review ` | Triggered when enforcement of required Code Owner review is updated on a branch.
| `dismiss_stale_reviews ` | Triggered when enforcement of dismissing stale pull requests is updated on a branch.
| `update_signature_requirement_enforcement_level ` | Triggered when enforcement of required commit signing is updated on a branch.
| `update_pull_request_reviews_enforcement_level ` | Triggered when enforcement of required pull request reviews is updated on a branch.
| `update_pull_request_reviews_enforcement_level ` | Triggered when enforcement of required pull request reviews is updated on a branch. Can be one of `0`(deactivated), `1`(non-admins), `2`(everyone).
| `update_required_status_checks_enforcement_level ` | Triggered when enforcement of required status checks is updated on a branch.
| `update_strict_required_status_checks_policy` | Triggered when the requirement for a branch to be up to date before merging is changed.
| `rejected_ref_update ` | Triggered when a branch update attempt is rejected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Some of the features listed below are limited to organizations using {% data var
| [Lock and unlock discussions](/discussions/managing-discussions-for-your-community/moderating-discussions) | | **X** | **X** | **X** | **X** |
| [Individually convert issues to discussions](/discussions/managing-discussions-for-your-community/moderating-discussions) | | **X** | **X** | **X** | **X** |
| [Create new discussions and comment on existing discussions](/discussions/collaborating-with-your-community-using-discussions/participating-in-a-discussion) | **X** | **X** | **X** | **X** | **X** |
| [Delete a discussion](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository#deleting-a-discussion) | | | | **X** | **X** |{% endif %}{% ifversion fpt or ghec %}
| [Delete a discussion](/discussions/managing-discussions-for-your-community/managing-discussions-in-your-repository#deleting-a-discussion) | | **X** | | **X** | **X** |{% endif %}{% ifversion fpt or ghec %}
| Create [codespaces](/codespaces/about-codespaces) | | | **X** | **X** | **X** |{% endif %}

### Access requirements for security features
Expand Down
2 changes: 2 additions & 0 deletions data/reusables/dotcom_billing/codespaces-report-download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. Optionally, next to "Usage this month", click **Get usage report** to email a CSV report of storage use for {% data variables.product.prodname_codespaces %} to the account's primary email address.
![Download CSV report](/assets/images/help/codespaces/usage-report-download.png)
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-cn-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-cn.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-en-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-en.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-es-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-es.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-ja-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-ja.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-pt-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.0-pt.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-cn-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-cn.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-en-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-en.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-es-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-es.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-ja-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-ja.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-pt-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.1-pt.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-cn-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-cn.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-en-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-en.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-es-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-es.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-ja-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-ja.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-pt-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.2-pt.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-cn-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-cn.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-en-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-en.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-es-records.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-es.json.br
Git LFS file not shown
4 changes: 2 additions & 2 deletions lib/search/indexes/github-docs-3.3-ja-records.json.br
Git LFS file not shown
Loading

0 comments on commit 2d45d69

Please sign in to comment.