Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUGGESTION] QoL adjustments #11

Closed
firinael opened this issue Aug 18, 2021 · 7 comments
Closed

[SUGGESTION] QoL adjustments #11

firinael opened this issue Aug 18, 2021 · 7 comments

Comments

@firinael
Copy link

firinael commented Aug 18, 2021

To approximate the usage of cMenu to how MS's programs work, and therefore make the plugin more user-friendly, it'd be nice if:

  • clicking on a cMenu button did not take cursor focus away from the text body;
  • clicking on a cMenu button inserted the bolding/codeblock/whatever regardless of something being highlighted/selected;
  • clicking on a cMenu button while having the caret being in the middle of a word, without highlighting/selecting it, applied it to the word and not the position of the caret;
  • cMenu showed that the selected/highlighted/caret-in-middle characters have a button's specific formatting applied.
    • i.e. selecting a bolded word makes the bold button be filled with the accent colour, showing that it is already applied.

These are all recommendations for a better user experience, I swear I'm just being annoying/picky so that your plugin becomes as good as it can be! lol

Thank you for your work.

@chetachiezikeuzor
Copy link
Owner

These sounds nice, but to accomplish any one of these, I would have to edit the text editing commands that cMenu doesn't add (ones from Obsidian's command library). Not sure if that's even possible. The second bullet seems much more feasible with the commands added by cMenu so I can look into that one.

@firinael
Copy link
Author

firinael commented Aug 18, 2021

While editing the vanilla commands would most likely not be viable, wouldn't it be possible to add a check before running them?

Like, if <caret in middle of word> then <apply to end and start>? I'm not very familiar with coding (proper layman) so forgive my ignorance if that's not possible.

@chetachiezikeuzor
Copy link
Owner

Hmmm, perhaps it's possible. I'm not too shabby with code but I am no expert when it comes to Obsidian's API scope so you never know! But if not, a neat alternative would be that if <caret is in middle of word, button on hover background color is pale red> else <button on hover background color is standard color (whatever this is)> and only have this feature with commands that include editing text.

@firinael
Copy link
Author

firinael commented Aug 18, 2021 via email

@chetachiezikeuzor
Copy link
Owner

Ok so I've modified the text editing commands so that the first two bullet points are met.

  • Focus in editor is maintained after execution
  • Text edit button will insert regardless of selection
    I still think the feature we talked about would be cool, so I'm gonna keep it in my list. Please let me know if you have any other issues!
Obsidian.-.Forest.-.Obsidian.v0.12.14.mp4

@chetachiezikeuzor
Copy link
Owner

The next update will enhance this a bit more to include cursor placement. So that you can continue typing after command execution.

@chetachiezikeuzor
Copy link
Owner

Enhancement added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants