michael / michael/svedit

Allow implicit node selections?

Open
#53 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
675
Forks
18
Avg merge
5h 11m
Merged PRs (30d)
1

Description

Currently we show "node tools" only when a single node in a container is selected. For instance when we have story.buttons you need to select the full button in order to see the URL tool.

However, we might want to show the URL tool also when your selection is inside button.label. So the button is implicitly selected.

Pro:

  • this will make the href (URL) field of buttons more discoverable

Con:

  • this might be a generalization that will not work for other situations
  • it creates some ambiguity (button href field shows up in two situations - is that intuitive?)

Thoughts:

  • collect more use cases like this and experiment
  • everything is possible already by inspecting the current doc state + selection state: but we may want to distill patterns and distill them to utilities (something like ProseMirror's commands, but i'm actually not sure if its a good idea, Svelte's $derived does a good job without introducing a new abstraction.

Contributor guide

No contributing guide indexed for this repository

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 collecting the proposed use cases and inspecting the current document state and selection state behavior. Experiment with implicit node selections, then determine whether a reusable pattern is justified and what consistent behavior should count as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.