Skip to content

Commit

Permalink
feat: redocly ctrl-f hijack (#1632)
Browse files Browse the repository at this point in the history
* feat: redocly ctrl-f hijack

* chore(release): publish@4.14.18

---------

Co-authored-by: Melissa Garcia <ens15038@adobe.com>
  • Loading branch information
melissag-ensemble and Melissa Garcia authored Dec 13, 2024
1 parent d9e4cd0 commit 2fa13c0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Using a theme, all of your default configuration lives in an npm package.
- [width (optional)](#width-optional)
- [typography (optional)](#typography-optional)
- [codeblock (optional)](#codeblock-optional)
- [ctrlFHijack (optional)](#ctrlfhijack-optional)
- [disableSidebar (optional)](#disablesidebar-optional)
- [disableSearch (optional)](#disablesearch-optional)
- [hideTryItPanel (optional)](#hidetryitpanel-optional)
Expand Down Expand Up @@ -1164,6 +1165,18 @@ Defaults to ```"tokens: { punctuation: { color: 'white' }}"```
https://redocly.com/docs/api-reference-docs/configuration/theming/#path=codeBlock
#### ctrlFHijack (optional)
```js
<RedoclyAPIBlock src="URL pointing to your open api yaml file." ctrlFHijack={false} />
```
Brings focus to the search bar when Control-F is pressed.
Defaults to ```true```
https://redocly.com/docs/api-reference-docs/configuration/functionality/#theme-object-openapi-schema
#### disableSidebar (optional)
```js
Expand Down
5 changes: 5 additions & 0 deletions packages/gatsby-theme-aio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [4.14.18](https://github.com/adobe/aio-theme/compare/@adobe/gatsby-theme-aio@4.14.17..@adobe/gatsby-theme-aio@4.14.18) (2024-12-12)

### Feature
* Add ctrlFHijack config to RedoclyAPIBlock [541e825](https://github.com/adobe/aio-theme/commit/541e825ece9af477d9172889dbd845ad35738774)

## [4.14.17](https://github.com/adobe/aio-theme/compare/@adobe/gatsby-theme-aio@4.14.16..@adobe/gatsby-theme-aio@4.14.17) (2024-11-14)

### Fix
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-theme-aio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/gatsby-theme-aio",
"version": "4.14.17",
"version": "4.14.18",
"description": "The Adobe I/O theme for building markdown powered sites",
"main": "index.js",
"license": "Apache-2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const RedoclyAPIBlock = ({
codeBlock = "tokens: { punctuation: { color: 'white' }}",
disableSidebar = false,
disableSearch = false,
ctrlFHijack = true,
hideTryItPanel = false,
scrollYOffset = 0,
sortOperationsAlphabetically = false,
Expand Down Expand Up @@ -70,6 +71,7 @@ const RedoclyAPIBlock = ({
{licenseKey: '${licenseKey}',
disableSidebar: ${disableSidebar},
disableSearch: ${disableSearch},
ctrlFHijack: ${ctrlFHijack},
hideTryItPanel: ${hideTryItPanel},
scrollYOffset: ${scrollYOffset},
sortOperationsAlphabetically: ${sortOperationsAlphabetically},
Expand Down

0 comments on commit 2fa13c0

Please sign in to comment.