nextcloud-libraries / nextcloud-libraries/nextcloud-vue

[NcModal] Remove `allowInModal` in favour of hotkey scoping similar to the focus trap

Open
#7,967 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop feature: modal technical debt
Dominant language
Vue
Stars
246
Forks
99
Avg merge
1d 20h
Merged PRs (30d)
103

Description

Fine for a hotfix, but I'd propose to remove allowInModal in favour of hotkey scoping similar to the focus trap.

So that:

  • It doesn't depend on a CSS class in the modal
  • It supports not only NcModal but other modal popovers as well like NcPopover
  • It supports nesting, for example, when a file picker dialog is open from the settings dialog, and each has its own hotkeys

Originally posted by @ShGKme in https://github.com/nextcloud-libraries/nextcloud-vue/pull/7966#pullrequestreview-3558677200

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing allowInModal behavior in NcModal and compare it with the focus-trap scoping approach. The work is done when hotkeys are scoped without depending on a modal CSS class, apply to NcModal and NcPopover, and support nested modal popovers with separate hotkeys.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.