Introduce global and scope/context-aware ClipboardHandler and SelectionHandler
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by reading Svedit.svelte and the existing KeyMapper implementation, especially how its scope_stack is managed. Replace the document-level selection and clipboard handlers with a global, scope-aware design; done means app-level handlers work when no Svedit instance is active and the focused Svedit scope takes over.
Written by the indexing model from the issue text.
Description
Much like I introduced KeyMapper (change to KeyboardHandler? or KeydownHandler) Svedit should have just a single handler to mange selection changes or clipboard events (copy, cut, paste), this handler must be aware of the current context, so just like the KeyMapper track a scope_stack, so we have an app on top level and once we focus a Svedit instance it registers a new svedit-aware scope to take over the handling.
In other words I should get rid of these global event handlers in Svedit.svelte:
<svelte:document {onselectionchange} {oncut} {oncopy} {onpaste} />
Example scenario:
You have an app, that has some selection & copy&paste handling on app level, when no svedit instance is active. E.g. think of a side-panel that manages website design parameters, e.g. Fonts. And then when when you paste a font into that area, you should be able to hook into that paste handler, while any Svedit instance's handler should do nothing (as they are not in focus).
- Dominant language
- TypeScript
- Stars
- 691
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from michael/svedit
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day