MacDownApp/macdown

Toggling pane views behaves oddly

Open

#473 opened on 2015年10月18日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Objective-C (7,686 stars) (930 forks)batch import
enhancementhelp wanted

説明

Some scenarios:

  1. Turn an individual pane on and off with the Hide/Restore pane menu options. No problems as long as you restore the second pane. Note that the Left 1:1 Right menu item will also work to restore two panes when only one is visible.
  2. Hide one pane, let's say the Editor pane, though it doesn't matter. Now the menu items are Restore Editor Pane and Hide Preview Pane. Choose to hide the Preview pane, which is now the only pane visible, and you end up switching to the Editor pane. In other words, the Hide options now function as a toggle. This strikes me as odd, if not incorrect behavior. (I'd suggest that when only one pane is visible, the option to hide that pane should not be available.)
  3. Further, this toggling behavior is not consistent. Hide the Editor pane. If you use the Hide/Restore menu item for the Preview pane (via shift-command-H), the screen will toggle between the two modes, as just described. Now instead, from two-pane mode, hide the Editor, hide the Preview, hide the Editor, restore the Editor. So that's shift-command-E, H, E, E. You should be in single-pane Editor mode. But now the Restore Preview Pane option doesn't work. Seems like you can recreate this in any single-pane environment by any hide-restore combo. Pretty sure this is a bug.

Here's a suggestion for redoing these menu items:

  1. Similar to the current:
    • When both panes are visible, the menu items should say Hide X Pane, as now.
    • When one pane is visible, the other pane's menu item should say Show X Pane and the visible pane's item should be grayed out or say Switch to X Pane. (I like Show better than Restore, because Restore implies that the default mode should be two-pane display.)
  2. Completely change the menu to have three items, which would be greyed out when appropriate:
    • Show both panes (shift-cmd-R?)
    • Show Editor Pane only (shift-cmd-E)
    • Show Preview Pane only (shift-cmd-H)
  3. Completely change the menu to have one item that cycles through the same options just listed (shift-cmd-H?), showing one pane, then the other, then both.

コントリビューターガイド