marcusolsson/obsidian-projects

Widen "create new note" note title name input box

Opened this issue · 1 comments

What would you like to be added?

I tried to do a PR but I just am too inexperienced with Svelte that this seemingly simple change was going to take too much time for me to figure out. Thanks in advance!

image

Why is this needed?

I like to use descriptive note names and it is very hard with the tiny input text field. Would be great if it could be extended to the widest that fits the modal.

I'll have limited availability in the coming weeks so it will take some time to see this implemented.

But if you want to find it out yourself, here's a potential reference. In activated text typed table cells, you can see the wrapped <TextInput /> component from obsidian-svelte package fitting itself to the column width. Maybe this is a suitable point to start. Thank you so much for reporting this use-case and the possible contributions!

<TextInput
autoFocus
value={value || ""}
embed
width="100%"
on:input={({ detail }) => (value = detail)}
on:blur={(event) => {
if (
event.currentTarget instanceof HTMLInputElement &&
event.relatedTarget instanceof HTMLDivElement &&
!event.relatedTarget.contains(event.currentTarget)
) {
selected = false;
edit = false;
}
onChange(value);
}}
/>