vkbo / novelWriter

novelWriter is an open source plain text editor designed for writing novels. It supports a minimal markdown-like syntax for formatting text. It is written with Python 3 (3.9+) and Qt 5 (5.15) for cross-platform support.
https://novelwriter.io
GNU General Public License v3.0
2.05k stars 105 forks source link

Format menu options should respect Markdown/Shortcodes mode #1636

Closed tmarplatt closed 10 months ago

tmarplatt commented 10 months ago

Edit: This is a v2.2rc1 ticket.

The problem

The new Markdown/Shortcodes toggle button is working as expected: when using the toolbar formatting controls, the user gets either syntax in their document, according to the toggle.

But when Shortcodes mode has been chosen, and the user changes text format via the Format menu, novelWriter will format the selected words using Markdown syntax instead. This is unintuitive and therefore confusing.

The solution

Regardless of which formatting mode is enabled, when the user chooses text formatting via the Format menu, novelWriter should apply its formatting syntax according to the chosen Markdown/Shortcodes toggle.

vkbo commented 10 months ago

This is a feature of the toolbar itself, and decides which formatting signal it sends to the editor. It is not a part of the implementation of the menu, and I seriously doubt having an equivalent toggle menu entry in the format menu is going to be more user friendly as a lot of people don't check the menus. I am deliberately trying to make the UI less menu-dependant.

I also don't intend shortcodes to replace regular markdown emphasis syntax. The duplications are there to solve corner cases and special cases where markdown emphasis cannot work due to limitations in the syntax.

If the toggle button is confusing to people, which remains to be seen but may very well be the case, my solution would be to remove it and just add the extra three buttons. Complicating the existing emphasis functionality is not a good solution.

vkbo commented 10 months ago

Is this a sensible alternative toolbar? image