Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function DropdownNavbarItemDesktop({
{...props}
onClick={props.to ? undefined : (e) => e.preventDefault()}
onKeyDown={(e) => {
if (e.key === 'Enter') {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
setShowDropdown(!showDropdown);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,15 @@ function DocSearch({externalUrlRegex, ...props}: DocSearchV4Props) {
);
}

export default function SearchBar(): ReactNode {
export default function SearchBar(props: Partial<DocSearchV4Props>): ReactNode {
const {siteConfig} = useDocusaurusContext();
return (
<DocSearch {...(siteConfig.themeConfig.algolia as DocSearchV4Props)} />
);

const docSearchProps: DocSearchV4Props = {
...(siteConfig.themeConfig.algolia as DocSearchV4Props),
// Let props override theme config
// See https://github.com/facebook/docusaurus/pull/11581
...props,
};

return <DocSearch {...docSearchProps} />;
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ async function tryOpenWithAppleScript({
);
}

// Test this manually with:
// osascript ./packages/docusaurus/src/commands/utils/openBrowser/openChrome.applescript "http://localhost:8080" "Google Chrome"
// osascript ./packages/docusaurus/src/commands/utils/openBrowser/openChrome.applescript "http://localhost:8080" "Arc"
async function tryBrowser(browserName: string): Promise<boolean> {
try {
// This command runs the openChrome.applescript (copied from CRA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ on run argv
set theProgram to item 2 of argv
end if

-- Arc: simple open + activate, no tab reuse
-- See https://github.com/facebook/docusaurus/issues/11582
if theProgram is "Arc" then
tell application "Arc"
activate
open location theURL
end tell
return
end if

using terms from application "Google Chrome"
tell application theProgram

Expand Down
7 changes: 7 additions & 0 deletions packages/docusaurus/src/webpack/aliases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export async function createAliasesForTheme(

const themeComponentFiles = await Globby(['**/*.{js,jsx,ts,tsx}'], {
cwd: themePath,
ignore: [
// Ignore co-located test files
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
// Ignore type declaration files
'**/*.d.ts',
],
});

const aliases: ThemeAliases = {};
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-plugin/src/rules/no-untranslated-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export default createRule<Options, MessageIds>({
properties: {
ignoredStrings: {
type: 'array',
items: {
type: 'string',
},
},
},
additionalProperties: false,
Expand Down
Loading