diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index af7ea9ef3..7666e2437 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -77,6 +77,8 @@ jobs: env: VERSION: ${{ steps.version.outputs.next }} run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git tag -a "$VERSION" -m "Release $VERSION" git push origin "$VERSION" diff --git a/app/app.vue b/app/app.vue index 1f7e40b41..5916e3e32 100644 --- a/app/app.vue +++ b/app/app.vue @@ -48,10 +48,17 @@ if (import.meta.server) { } const keyboardShortcuts = useKeyboardShortcuts() +const { settings } = useSettings() onKeyDown( '/', e => { + if (e.ctrlKey) { + e.preventDefault() + settings.value.instantSearch = !settings.value.instantSearch + return + } + if (!keyboardShortcuts.value || isEditableElement(e.target)) return e.preventDefault() diff --git a/app/components/InstantSearch.vue b/app/components/InstantSearch.vue new file mode 100644 index 000000000..ae721f837 --- /dev/null +++ b/app/components/InstantSearch.vue @@ -0,0 +1,54 @@ + + + diff --git a/app/pages/index.vue b/app/pages/index.vue index 3bf21e21e..1b12b60c3 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -52,15 +52,20 @@ defineOgImageComponent('Default', { {{ $t('tagline') }}

-
+ -
+
@@ -82,6 +87,7 @@ defineOgImageComponent('Default', { no-correct size="large" class="w-full ps-8 pe-24" + aria-describedby="instant-search-advisory" @focus="isSearchFocused = true" @blur="isSearchFocused = false" /> @@ -98,6 +104,8 @@ defineOgImageComponent('Default', {
+ + diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 0d017ee56..4374ceff5 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -65,7 +65,13 @@ "org": "org", "view_user_packages": "View packages by this user", "view_org_packages": "View packages by this organization" - } + }, + "instant_search": "Instant search", + "instant_search_on": "on", + "instant_search_off": "off", + "instant_search_turn_on": "turn on", + "instant_search_turn_off": "turn off", + "instant_search_advisory": "{label} {state} — {action}" }, "nav": { "main_navigation": "Main", diff --git a/i18n/schema.json b/i18n/schema.json index f1eb7e5b7..5842a37bc 100644 --- a/i18n/schema.json +++ b/i18n/schema.json @@ -201,6 +201,24 @@ } }, "additionalProperties": false + }, + "instant_search": { + "type": "string" + }, + "instant_search_on": { + "type": "string" + }, + "instant_search_off": { + "type": "string" + }, + "instant_search_turn_on": { + "type": "string" + }, + "instant_search_turn_off": { + "type": "string" + }, + "instant_search_advisory": { + "type": "string" } }, "additionalProperties": false diff --git a/nuxt.config.ts b/nuxt.config.ts index 4aa911662..4031a9828 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -136,6 +136,14 @@ export default defineNuxtConfig({ // never cache '/api/auth/**': { isr: false, cache: false }, '/api/social/**': { isr: false, cache: false }, + '/api/atproto/bluesky-author-profiles': { + isr: { + expiration: 60 * 60 /* one hour */, + passQuery: true, + allowQuery: ['authors'], + }, + cache: { maxAge: 3600 }, + }, '/api/opensearch/suggestions': { isr: { expiration: 60 * 60 * 24 /* one day */, diff --git a/test/nuxt/a11y.spec.ts b/test/nuxt/a11y.spec.ts index 4774a5ce6..1986138d4 100644 --- a/test/nuxt/a11y.spec.ts +++ b/test/nuxt/a11y.spec.ts @@ -156,6 +156,7 @@ import { HeaderAccountMenu, HeaderConnectorModal, HeaderSearchBox, + InstantSearch, InputBase, LicenseDisplay, LoadingSpinner, @@ -2657,6 +2658,14 @@ describe('component accessibility audits', () => { }) }) + describe('InstantSearch', () => { + it('should have no accessibility violations', async () => { + const component = await mountSuspended(InstantSearch) + const results = await runAxe(component) + expect(results.violations).toEqual([]) + }) + }) + describe('SearchProviderToggle', () => { it('should have no accessibility violations', async () => { const component = await mountSuspended(SearchProviderToggle)