Close `(` with `)` as it is typed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in the onKeyDown handler in app/src/renderer/project/Block/Block.tsx. The issue wants ( and ) added as one more entry in the pair table that #55 introduces there, so check whether #55 has landed before starting. Done means typing ( gives () with the caret between, typing ) steps over an existing ), Backspace removes an empty (|) pair, a selection gets wrapped, and undo reverts the pair in one step.
Written by the indexing model from the issue text.
Description
Same as #55, for parentheses. Typing ( while editing a block should insert () and leave the caret between them.
Behaviour
The rules from #55, with ( and ) in place of [ and ]:
- Typing
(inserts()with the caret between them. - Typing
)when the next character is already)moves the caret past it instead of inserting a second one. - Backspace with the caret inside an empty pair,
(|), deletes both. - With text selected, typing
(wraps the selection,(selection), instead of replacing it. - Undo (Cmd/Ctrl+Z) takes back the pair in one step.
Together with #55 this makes the aliased link from #7 easy to type: [foo]( gives [foo](|), and [[ then gives [foo]([[|]]), where the autocomplete in #29 opens for the aliased form.
What already exists
- Whatever #55 adds to the
onKeyDownhandler inapp/src/renderer/project/Block/Block.tsxshould take a table of pairs, so this issue is one more entry in it, not a second copy of the logic.
Out of scope
- Pairing
*or quotes.`is #57.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 10m
- Merged PRs (30d)
- 57
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 shovon/pbnotes
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Website for Pb NotesOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
Graph viewOpenenhancement
Difficulty 5/5 Over a week Newbie friendliness 22/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
🔊 a11y
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
betagouv/mon-entreprise#4726 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Deltares/fews-pi-requests#357 ·
Maintainers usually reply within 1 day
-
bug confirmed js v6
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day