Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
2e1f069
fix: TypeError: this.$refs.actions.$refs.menuButton is undefined
wofferl Nov 16, 2024
0e449a2
Fix(NcActionButton): Add RTL support to NcActionButton component
falghamdi125 Nov 8, 2024
f0ac2e8
refactor(NcActionButton): Adjust css syntax
susnux Nov 19, 2024
12ffeb3
chore(assets): Update styling from server
nextcloud-command Nov 21, 2024
7567d3d
chore(NcAppSidebarTabs): remove internal component from docs
ShGKme Nov 21, 2024
eed0252
chore: release 8.21.0
Antreesy Nov 21, 2024
973319b
Merge pull request #6242 from nextcloud-libraries/automated/noid/serv…
Antreesy Nov 21, 2024
fe04dfd
Merge pull request #6255 from nextcloud-libraries/chore/v8.21.0
Antreesy Nov 21, 2024
40a1e98
docs(NcDateTimePickerNative): add time picker example
GVodyanov Nov 4, 2024
c2de7ec
Merge pull request #6188 from nextcloud-libraries/docs/add-time-examp…
GVodyanov Nov 21, 2024
78c6829
chore(deps): Bump @vueuse/core from 11.2.0 to 11.3.0
dependabot[bot] Nov 22, 2024
cb72eee
Merge pull request #6256 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Nov 22, 2024
d4036c7
chore(deps): Bump @vueuse/components from 11.2.0 to 11.3.0
dependabot[bot] Nov 22, 2024
b2dfaac
Merge pull request #6257 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Nov 22, 2024
a3b449f
chore(deps-dev): Bump typescript from 5.6.3 to 5.7.2
dependabot[bot] Nov 25, 2024
3c37a5a
Merge pull request #6263 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Nov 25, 2024
a3a2ae5
fix: Require actionsAriaLabel in NcListItem
artonge Nov 25, 2024
89fc7f2
style(NcCheckboxRadioSwitch): set default cursor to content of disabl…
Antreesy Nov 25, 2024
a2ee270
fix(NcModal): make 'Close' button the last element for the focus-trap
Antreesy Nov 25, 2024
730022d
Merge pull request #6253 from nextcloud-libraries/chore/6252/NcAppSid…
ShGKme Nov 25, 2024
32ca57f
Merge pull request #6226 from wofferl/fix_tabbing
susnux Nov 26, 2024
7400804
Merge pull request #6128 from nextcloud-libraries/artonge/fix/name_pr…
artonge Nov 26, 2024
25c80f2
fix(l10n): Translate l10n/messages.pot in ar
transifex-integration[bot] Nov 26, 2024
b27a94e
fix(l10n): Translate l10n/messages.pot in gl
transifex-integration[bot] Nov 26, 2024
4160ca8
fix(l10n): Translate l10n/messages.pot in pl
transifex-integration[bot] Nov 26, 2024
b0499d3
fix(l10n): Translate l10n/messages.pot in pt_BR
transifex-integration[bot] Nov 26, 2024
3974646
fix(l10n): Translate l10n/messages.pot in de_DE
transifex-integration[bot] Nov 26, 2024
781dd9a
fix(l10n): Translate l10n/messages.pot in fi_FI
transifex-integration[bot] Nov 26, 2024
5719ad3
fix(l10n): Translate l10n/messages.pot in ga
transifex-integration[bot] Nov 26, 2024
6b1db86
fix(l10n): Translate l10n/messages.pot in sr
transifex-integration[bot] Nov 26, 2024
cedcde4
fix(l10n): Translate l10n/messages.pot in uk
transifex-integration[bot] Nov 26, 2024
9636ee1
fix(l10n): Translate l10n/messages.pot in cs_CZ
transifex-integration[bot] Nov 26, 2024
85220b8
fix(l10n): Translate l10n/messages.pot in sv
transifex-integration[bot] Nov 26, 2024
7ad3678
fix(l10n): Translate l10n/messages.pot in da
transifex-integration[bot] Nov 26, 2024
e4a8e61
fix(l10n): Translate l10n/messages.pot in nb_NO
transifex-integration[bot] Nov 26, 2024
870bdf4
fix(l10n): Translate l10n/messages.pot in tr
transifex-integration[bot] Nov 26, 2024
4143b4c
fix(l10n): Translate l10n/messages.pot in en_GB
transifex-integration[bot] Nov 26, 2024
5a85256
fix(l10n): Translate l10n/messages.pot in zh_CN
transifex-integration[bot] Nov 26, 2024
ed2b570
fix(l10n): Translate l10n/messages.pot in fa
transifex-integration[bot] Nov 26, 2024
4b9eabe
fix(l10n): Translate l10n/messages.pot in de
transifex-integration[bot] Nov 26, 2024
1480e5d
fix(l10n): Translate l10n/messages.pot in fr
transifex-integration[bot] Nov 26, 2024
9c026d3
fix(l10n): Translate l10n/messages.pot in sk_SK
transifex-integration[bot] Nov 26, 2024
7f90ad6
fix(l10n): Translate l10n/messages.pot in ja_JP
transifex-integration[bot] Nov 26, 2024
4d8e264
Merge pull request #6265 from nextcloud-libraries/fix/noid/links-insi…
Antreesy Nov 27, 2024
02d3ee4
chore(deps): Bump dompurify from 3.2.1 to 3.2.2
dependabot[bot] Dec 2, 2024
b4bed5d
Merge pull request #6283 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 2, 2024
c55358c
chore(deps): Bump @nextcloud/sharing from 0.2.3 to 0.2.4
dependabot[bot] Dec 4, 2024
b3f67c5
chore(deps-dev): Bump webpack from 5.96.1 to 5.97.0
dependabot[bot] Dec 4, 2024
75d7a0e
chore(deps): Bump linkify-string from 4.1.4 to 4.2.0
dependabot[bot] Dec 4, 2024
8edfc53
Merge pull request #6284 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 4, 2024
512b95e
Merge pull request #6285 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 4, 2024
71a69eb
Merge pull request #6286 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 4, 2024
953bb65
chore(deps-dev): Bump cypress from 13.16.0 to 13.16.1
dependabot[bot] Dec 5, 2024
e3a78cd
Merge pull request #6287 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 5, 2024
b6c8ad0
Fix(NcSettingsSection): Add RTL support to NcSettingsSection info icon.
falghamdi125 Dec 5, 2024
703ca28
chore(deps): Bump codecov/codecov-action from 5.0.7 to 5.1.1
dependabot[bot] Dec 6, 2024
9b87b1d
Merge pull request #6293 from nextcloud-libraries/dependabot/github_a…
dependabot[bot] Dec 6, 2024
cc2783b
chore(deps-dev): Bump webpack from 5.97.0 to 5.97.1
dependabot[bot] Dec 6, 2024
6c6a55b
Merge pull request #6295 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 6, 2024
6f2e76a
Merge pull request #6266 from nextcloud-libraries/fix/13867/focus-fir…
Antreesy Dec 6, 2024
d82c63e
fix(l10n): Translate l10n/messages.pot in ru
transifex-integration[bot] Dec 7, 2024
c1878a9
fix(l10n): Translate l10n/messages.pot in nl
transifex-integration[bot] Dec 7, 2024
5317ce9
fix(l10n): Translate l10n/messages.pot in zh_HK
transifex-integration[bot] Dec 8, 2024
bd9344f
Merge pull request #6273 from nextcloud-libraries/translations_ef429a…
ShGKme Dec 8, 2024
348e3f1
Fix(NcActionButton): Set submenu arrow direction in RTL mode
falghamdi125 Dec 8, 2024
3221e78
chore(deps): Bump dompurify from 3.2.2 to 3.2.3
dependabot[bot] Dec 10, 2024
43254b7
Merge pull request #6299 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 10, 2024
b0e92d8
chore(deps): Bump nanoid from 3.3.7 to 3.3.8
dependabot[bot] Dec 10, 2024
d9ead6d
Merge pull request #6300 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 10, 2024
527d251
fix(useHotKey): make sure `shift` modifier is defined
Antreesy Dec 11, 2024
c67b40c
docs(useHotKey): describe support of keyFilter function
Antreesy Dec 11, 2024
85cb275
fix(useHotKey): validate event keys as case-insensitive by default
Antreesy Dec 11, 2024
2ed3522
Fix(NcAppNavigation): Fix sidebar position in RTL mode.
falghamdi125 Nov 22, 2024
782fcda
Merge pull request #6260 from falghamdi125/add-RTL-support-to-nav-sid…
skjnldsv Dec 11, 2024
f44187c
fix(NcCheckboxRadioSwitch): RTL support
hamza221 Dec 13, 2024
a223d8c
fix(Splitpanes): add RTL support
hamza221 Dec 13, 2024
2b2d3ca
Merge pull request #6303 from nextcloud-libraries/fix/rtl/splitpanes
skjnldsv Dec 17, 2024
e4d7568
feat(NcAvatar): implement custom javascript hook action for the conta…
st3iny Oct 29, 2024
4ceb79c
Merge pull request #6238 from nextcloud-libraries/feat/NcAvatar/js-ho…
st3iny Dec 17, 2024
f0ae7e5
chore(deps-dev): Bump cypress from 13.16.1 to 13.17.0
dependabot[bot] Dec 18, 2024
a7282d8
Merge pull request #6308 from nextcloud-libraries/dependabot/npm_and_…
dependabot[bot] Dec 18, 2024
f57de07
Merge pull request #6302 from nextcloud-libraries/fix/rtl/NcCheckboxR…
hamza221 Dec 18, 2024
d1e068d
chore(deps): Bump codecov/codecov-action from 5.1.1 to 5.1.2
dependabot[bot] Dec 19, 2024
fc57991
Merge pull request #6310 from nextcloud-libraries/dependabot/github_a…
dependabot[bot] Dec 19, 2024
277f77a
fix(NcDateTimePicker): popup position
hamza221 Dec 19, 2024
977cf07
feat(NcAppNavigation): add `n` hotkey to toggle navigation
skjnldsv Dec 19, 2024
5b6a8bb
chore: refactor logger
skjnldsv Dec 19, 2024
9c685e9
chore: l10n update
skjnldsv Dec 19, 2024
81927a5
Merge pull request #6312 from nextcloud-libraries/fix/datepicker/posi…
hamza221 Dec 19, 2024
cf3af9d
Merge branch 'master' into fix-ncaction-button-padding-in-rtl
Antreesy Dec 20, 2024
82ba479
Fix(NcDashboardWidgetItem): Add RTL support to NcDashboardWidgetItem
falghamdi125 Dec 5, 2024
0d3715f
Merge branch 'master' into support-rtl-info-icon
Antreesy Dec 20, 2024
3fa7dca
fix(NcRichContenteditable): prevent content from overflowing
Antreesy Dec 20, 2024
1e5eadd
fix(NcRichContenteditable): allow to customize input paddings
Antreesy Dec 20, 2024
038d599
Merge pull request #6290 from falghamdi125/support-rtl-info-icon
nickvergessen Dec 20, 2024
9d271dc
Merge pull request #6292 from falghamdi125/add-RTL-support-to-NcDashb…
nickvergessen Dec 20, 2024
d0f4bd9
Merge pull request #6301 from nextcloud-libraries/fix/5899/usehotkey-…
Antreesy Dec 20, 2024
0567af1
Merge pull request #6316 from nextcloud-libraries/fix/style/richconte…
Antreesy Dec 20, 2024
b804306
Merge pull request #6311 from nextcloud-libraries/feat/navigation-hotkey
skjnldsv Dec 20, 2024
99dc74b
Merge pull request #6200 from falghamdi125/fix-ncaction-button-paddin…
nickvergessen Dec 20, 2024
72df915
chore: release v8.22.0
hamza221 Dec 20, 2024
48e2b4d
fix(l10n): Translate l10n/messages.pot in de
transifex-integration[bot] Dec 20, 2024
ee4c447
fix(l10n): Translate l10n/messages.pot in de_DE
transifex-integration[bot] Dec 20, 2024
baaab93
Merge pull request #6324 from nextcloud-libraries/translations_ef429a…
ShGKme Dec 20, 2024
b00be42
fix(l10n): Translate l10n/messages.pot in zh_CN
transifex-integration[bot] Dec 20, 2024
cdd917c
fix(l10n): Translate l10n/messages.pot in tr
transifex-integration[bot] Dec 21, 2024
da878cd
fix(l10n): Translate l10n/messages.pot in cs_CZ
transifex-integration[bot] Dec 21, 2024
7595683
fix(l10n): Translate l10n/messages.pot in sv
transifex-integration[bot] Dec 22, 2024
41dd231
fix(l10n): Translate l10n/messages.pot in fr
transifex-integration[bot] Dec 22, 2024
0eb5ab3
fix(l10n): Translate l10n/messages.pot in nl
transifex-integration[bot] Dec 22, 2024
7284a3d
fix(l10n): Translate l10n/messages.pot in da
transifex-integration[bot] Dec 22, 2024
126ddbf
fix(l10n): Translate l10n/messages.pot in ar
transifex-integration[bot] Dec 22, 2024
987d562
fix(l10n): Translate l10n/messages.pot in ja_JP
transifex-integration[bot] Dec 22, 2024
e27f125
fix(l10n): Translate l10n/messages.pot in en_GB
transifex-integration[bot] Dec 22, 2024
d6a35de
Merge pull request #6325 from nextcloud-libraries/translations_ef429a…
ShGKme Dec 22, 2024
2a0b696
Merge pull request #6321 from nextcloud-libraries/v8.22.0
hamza221 Dec 23, 2024
e2eee0a
feat(deps): use custom-npms for icons
fracado Nov 22, 2024
f43ff81
IONOS Resolve conflicts of merge to v8.22.0
bromiesTM Feb 3, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
run: npm run test:coverage --if-present

- name: Collect coverage
uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
with:
files: ./coverage/lcov.info

Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,56 @@

# Changelog

## [v8.22.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.22.0) (2024-12-20)
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.21.0...v8.22.0)

### 🚀 Enhancements
* feat(NcAvatar): implement custom javascript hook action for the contacts menu [\#6238](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6238) \([st3iny](https://github.com/st3iny)\)
* feat(NcAppNavigation): add `n` hotkey to toggle navigation [\#6311](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6311) \([skjnldsv](https://github.com/skjnldsv)\)
### 🐛 Fixed bugs
* fix(NcAppNavigationItem): TypeError: this.$refs.actions.$refs.menuButton is undefined [\#6226](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6226) \([wofferl](https://github.com/wofferl)\)
* fix(NcListItem): Don't require name prop by @artonge in [\#6128](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6128) \([artonge](https://github.com/artonge)\)
* style(NcCheckboxRadioSwitch): fix styles in disabled state [\#6265](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6265) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcModal): make 'Close' button the last element for the focus-trap [\#6266](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6266) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcAppNavigation): Fix sidebar position in RTL and mobile mode.[\#6260](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6260) \([falghamdi125](https://github.com/falghamdi125)\)
* fix(NcAppContent): add RTL support [\#6303](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6303) \([hamza221](https://github.com/hamza221)\)
* fix(NcCheckboxRadioSwitch): RTL support [\#6302](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6302) \([hamza221](https://github.com/hamza221)\)
* fix(NcDateTimePicker): popup position [\#6312](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6312) \([hamza221](https://github.com/hamza221)\)
* Fix(NcSettingsSection): Add RTL support to NcSettingsSection info icon. [\#6290](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6290) \([falghamdi125](https://github.com/falghamdi125)\)
* Fix(NcDashboardWidgetItem): Add RTL support to NcDashboardWidgetItem [\#6292](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6292) \([falghamdi125](https://github.com/falghamdi125)\)
* fix(useHotKey): allow hotkeys with implicit `SHIFT` and add `caseSensitive`, custom event filter options [\#6301](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6301) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcRichContenteditable): prevent content from overflowing [\#6316](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6316) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcActionButton): RTL support [\#6200](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6200) \([falghamdi125](https://github.com/falghamdi125)\)
### Changed
* docs(NcDateTimePickerNative): add time picker example [\#6188](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6188) \([GVodyanov](https://github.com/GVodyanov)\)
* chore(NcAppSidebarTabs): remove internal component from docs [\#6253](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6253) \([ShGKme](https://github.com/ShGKme)\)
* Updated workflows and dependencies
* Updated translations

## New Contributors
* @falghamdi125 made their first contribution in https://github.com/nextcloud-libraries/nextcloud-vue/pull/6260

## [v8.21.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.21.0) (2024-11-21)
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.20.0...v8.21.0)


### 🚀 Enhancements
* feat(NcRichText): highlight code syntax if language provided [\#6212](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6212) \([Antreesy](https://github.com/Antreesy)\)

### 🐛 Fixed bugs
* fix(NcInputField): correct position of trailing icon in RTL [\#6202](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6202) \([alsulami1](https://github.com/alsulami1)\)
* fix(NcChip): wrong color-primary-text variable used [\#6218](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6218) \([skjnldsv](https://github.com/skjnldsv)\)
* fix: make sure model event in `v-model` happens first to avoid regression [\#6234](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6234) \([ShGKme](https://github.com/ShGKme)\)
* fix(NcTextField): don't fire value-updating events twice [\#6235](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6235) \([ShGKme](https://github.com/ShGKme)\)
* fix(NcRichContenteditable): support mentions of email/* guests [\#6233](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6233) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcAppContent): correct splitter color in dark mode when using split-horizontal mode [\#6227](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6227) \([wofferl](https://github.com/wofferl)\)
* fix(NcRichContenteditable): do not break adjacent user mentions [\#6223](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6223) \([Antreesy](https://github.com/Antreesy)\)
* fix(NcRichContenteditable): fix pasting of the content to an empty field [\#6241](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6241) \([DorraJaouad](https://github.com/DorraJaouad)\)

## New Contributors
* @alsulami1 made their first contribution in [\#6202](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6202)
* @wofferl made their first contribution in [\#6227](https://github.com/nextcloud-libraries/nextcloud-vue/pull/6227)

## [v8.20.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.20.0) (2024-10-29)
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.19.0...v8.20.0)

Expand Down
82 changes: 82 additions & 0 deletions cypress/component/NcAppNavigation.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/**
* SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import NcAppNavigation from '../../src/components/NcAppNavigation/NcAppNavigation.vue'
import NcAppNavigationItem from '../../src/components/NcAppNavigationItem/NcAppNavigationItem.vue'

describe('NcAppNavigation hotkeys', () => {
it('opens on n keyboard press', () => {
cy.mount({
render: (h) => h(NcAppNavigation, {
scopedSlots: {
list: () => [
h(NcAppNavigationItem, { props: { name: 'First' } }),
],
},
}),
})

cy.contains('li', 'First').should('exist')

cy.get('nav').then(($nav) => {
const id = $nav.attr('id')
cy.get(`[aria-controls="${id}"`).as('appNavigationToggle')
cy.get('@appNavigationToggle').should('have.attr', 'aria-expanded', 'true')
cy.get('nav').should('have.attr', 'aria-hidden', 'false')
cy.get('nav').should('not.have.attr', 'inert')

// close the sidebar
cy.get('@appNavigationToggle').click()

cy.get('@appNavigationToggle').should('have.attr', 'aria-expanded', 'false')
cy.get('nav').should('have.attr', 'aria-hidden', 'true')
cy.get('nav').should('have.attr', 'inert')

// open the sidebar with the keyboard
cy.get('body').type('n')

cy.get('@appNavigationToggle').should('have.attr', 'aria-expanded', 'true')
cy.get('nav').should('have.attr', 'aria-hidden', 'false')
cy.get('nav').should('not.have.attr', 'inert')

// make sure we auto-focus the first item
cy.document().then((doc) => {
const activeElement = doc.activeElement
const navigation = doc.querySelector('nav')
// eslint-disable-next-line no-unused-expressions
expect(navigation?.contains(activeElement)).to.be.true
})
})
})

it('closes on n keyboard press', () => {
cy.mount({
render: (h) => h(NcAppNavigation, {
scopedSlots: {
list: () => [
h(NcAppNavigationItem, { props: { name: 'First' } }),
],
},
}),
})

cy.contains('li', 'First').should('exist')
cy.get('nav').should('have.attr', 'aria-hidden', 'false')
cy.get('nav').should('not.have.attr', 'inert')

// pressing n does nothing until we focus something within
cy.get('body').type('n')
cy.get('nav').should('have.attr', 'aria-hidden', 'false')
cy.get('nav').should('not.have.attr', 'inert')

// focus something within
cy.get('nav').find('a').first().focus()

// pressing n closes the sidebar
cy.get('body').type('n')
cy.get('nav').should('have.attr', 'aria-hidden', 'true')
cy.get('nav').should('have.attr', 'inert')
})
})
21 changes: 13 additions & 8 deletions docs/composables/useHotKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@ import { useHotKey } from '@nextcloud/vue/dist/Composables/useHotKey/index.js'
const stopCallback = useHotKey(key, callback, options)
```
where:
- `key`: string representing the keyboard key to listen to
- `keysOrFilter`: one of following:
- `string`: representing the keyboard key to listen to
- `Array<string>`: representing any of keys to listen to
- `Function`: custom filter function to validate event key
- `true`: to listen for all events

See [KeyboardEvent.key Value column](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) for possible values
See [KeyboardEvent.key Value column](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values) for possible values
- `callback`: a function to be called when the key is pressed. Before called, it will be checked whether keyboard shortcuts are disabled, or interactive element is currently focused, or whether options should be applied
- `options`: options to be applied to the shortcut:
- `push`: whether the event should be triggered on both keydown and keyup
- `prevent`: prevents the default action of the event
- `stop`: prevents propagation of the event in the capturing and bubbling phases
- `ctrl`: whether the Ctrl key should be pressed (Cmd key on MacOS)
- `alt`: whether the Alt key should be pressed
- `shift`: whether the Shift key should be pressed
- `push`: whether the event should be triggered on both keydown and keyup (default: `false`)
- `prevent`: prevents the default action of the event (default: `false`)
- `stop`: prevents propagation of the event in the capturing and bubbling phases (default: `false`)
- `ctrl`: whether the Ctrl key (Cmd key on MacOS) should be pressed (default: `false`)
- `alt`: whether the Alt key should be pressed (default: `false`)
- `shift`: whether the Shift key should be pressed (should be explicitly defined as `true`|`false` if needed)
- `caseSensitive`: whether specific case should be listened, e.g. only 'd' and not 'D' (default: `false`)
- `stopCallback`: a callback to stop listening to the event

### Playground
Expand Down
13 changes: 5 additions & 8 deletions l10n/ar.pot
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# Translators:
# John Molakvoæ <[email protected]>, 2023
# Hamza, 2024
# Ali <[email protected]>, 2024
# abusaud, 2024
# abu.s3ud, 2024
# John Molakvoæ <[email protected]>, 2024
#
msgid ""
msgstr ""
"Last-Translator: abusaud, 2024\n"
"Last-Translator: John Molakvoæ <[email protected]>, 2024\n"
"Language-Team: Arabic (https://app.transifex.com/nextcloud/teams/64236/ar/)\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language: ar\n"
Expand All @@ -32,9 +32,6 @@ msgstr "بازلائي مطفي"
msgid "Actions"
msgstr "إجراءات"

msgid "Actions for item with name \"{name}\""
msgstr "إجراءات على العنصر المُسمَّى \"{name}\""

msgid "Activities"
msgstr "سجل الأنشطة"

Expand Down Expand Up @@ -272,8 +269,8 @@ msgstr "إفتَح الرابط إلى \"{resourceName}\""
msgid "Open menu"
msgstr "إفتَح القائمة"

msgid "Open navigation"
msgstr "إفتَح المتصفح"
msgid "Open navigation {shortcut}"
msgstr "إفتَح المتصفح {shortcut}"

msgid "Open sidebar"
msgstr "إفتَح الشريط الجانبي"
Expand Down
7 changes: 2 additions & 5 deletions l10n/cs.pot
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ msgstr "Akapulko"
msgid "Actions"
msgstr "Akce"

msgid "Actions for item with name \"{name}\""
msgstr "Akce pro položku s názvem „{name}“"

msgid "Activities"
msgstr "Aktivity"

Expand Down Expand Up @@ -269,8 +266,8 @@ msgstr "Otevřít odkaz na „{resourceName}“"
msgid "Open menu"
msgstr "Otevřít nabídku"

msgid "Open navigation"
msgstr "Otevřít navigaci"
msgid "Open navigation {shortcut}"
msgstr "Otevřít navigaci {shortcut}"

msgid "Open sidebar"
msgstr "Otevřít postranní panel"
Expand Down
11 changes: 4 additions & 7 deletions l10n/da.pot
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# Translators:
# John Molakvoæ <[email protected]>, 2023
# Martin "phnoggie" Trads, 2023
# Rasmus Rosendahl-Kaa, 2024
# Martin Bonde <[email protected]>, 2024
# John Molakvoæ <[email protected]>, 2024
#
msgid ""
msgstr ""
"Last-Translator: Martin Bonde <[email protected]>, 2024\n"
"Last-Translator: John Molakvoæ <[email protected]>, 2024\n"
"Language-Team: Danish (https://app.transifex.com/nextcloud/teams/64236/da/)\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language: da\n"
Expand All @@ -32,9 +32,6 @@ msgstr "Acapulco"
msgid "Actions"
msgstr "Handlinger"

msgid "Actions for item with name \"{name}\""
msgstr "Handlinger for element med navnet \"{name}\""

msgid "Activities"
msgstr "Aktiviteter"

Expand Down Expand Up @@ -272,8 +269,8 @@ msgstr "Åbn link til \"{resourceName}\""
msgid "Open menu"
msgstr "Åben menu"

msgid "Open navigation"
msgstr "Åbn navigation"
msgid "Open navigation {shortcut}"
msgstr "Åbn navigation {shortcut}"

msgid "Open sidebar"
msgstr "Åbn sidepanel"
Expand Down
7 changes: 2 additions & 5 deletions l10n/de.pot
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ msgstr "Acapulco"
msgid "Actions"
msgstr "Aktionen"

msgid "Actions for item with name \"{name}\""
msgstr "Aktionen für das Element \"{name}“"

msgid "Activities"
msgstr "Aktivitäten"

Expand Down Expand Up @@ -275,8 +272,8 @@ msgstr "Link zu \"{resourceName}“ öffnen"
msgid "Open menu"
msgstr "Menü öffnen"

msgid "Open navigation"
msgstr "Navigation öffnen"
msgid "Open navigation {shortcut}"
msgstr "Navigation öffnen {shortcut}"

msgid "Open sidebar"
msgstr "Seitenleiste öffnen"
Expand Down
7 changes: 2 additions & 5 deletions l10n/de_DE.pot
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ msgstr "Acapulco"
msgid "Actions"
msgstr "Aktionen"

msgid "Actions for item with name \"{name}\""
msgstr "Aktionen für Element mit dem Namen \"{name}“"

msgid "Activities"
msgstr "Aktivitäten"

Expand Down Expand Up @@ -274,8 +271,8 @@ msgstr "Link zu \"{resourceName}“ öffnen"
msgid "Open menu"
msgstr "Menü öffnen"

msgid "Open navigation"
msgstr "Navigation öffnen"
msgid "Open navigation {shortcut}"
msgstr "Navigation öffnen {shortcut}"

msgid "Open sidebar"
msgstr "Seitenleiste öffnen"
Expand Down
11 changes: 4 additions & 7 deletions l10n/en_GB.pot
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Translators:
# John Molakvoæ <[email protected]>, 2023
# Andi Chandler <[email protected]>, 2024
# John Molakvoæ <[email protected]>, 2024
#
msgid ""
msgstr ""
"Last-Translator: Andi Chandler <andi@gowling.com>, 2024\n"
"Last-Translator: John Molakvoæ <skjnldsv@protonmail.com>, 2024\n"
"Language-Team: English (United Kingdom) (https://app.transifex.com/nextcloud/teams/64236/en_GB/)\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Language: en_GB\n"
Expand All @@ -30,9 +30,6 @@ msgstr "Acapulco"
msgid "Actions"
msgstr "Actions"

msgid "Actions for item with name \"{name}\""
msgstr "Actions for item with name \"{name}\""

msgid "Activities"
msgstr "Activities"

Expand Down Expand Up @@ -270,8 +267,8 @@ msgstr "Open link to \"{resourceName}\""
msgid "Open menu"
msgstr "Open menu"

msgid "Open navigation"
msgstr "Open navigation"
msgid "Open navigation {shortcut}"
msgstr "Open navigation {shortcut}"

msgid "Open sidebar"
msgstr "Open sidebar"
Expand Down
3 changes: 0 additions & 3 deletions l10n/fa.pot
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ msgstr "آکاپولکو"
msgid "Actions"
msgstr "کنش‌ها"

msgid "Actions for item with name \"{name}\""
msgstr "کنش‌ها برای موردی با نام «{name}»"

msgid "Activities"
msgstr "فعالیت‌ها"

Expand Down
3 changes: 0 additions & 3 deletions l10n/fi.pot
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ msgstr "Acapulco"
msgid "Actions"
msgstr "Toiminnot"

msgid "Actions for item with name \"{name}\""
msgstr "\"{name}\"n toiminnot"

msgid "Activities"
msgstr "Aktiviteetit"

Expand Down
Loading
Loading