the-djmaze/snappymail

Full-screen Message View on Double-Click

eriksid opened this issue · 3 comments

Is your feature request related to a problem? Please describe.

When double-clicking on a message, the reading panel is split, making it difficult to read the full message content.

Describe the solution you'd like

When double-clicking on a message, the reading panel should be displayed without division, allowing the full message content to be viewed.

Describe alternatives you've considered

I considered the possibility of adding a button to toggle between split and full view, but I believe that double-clicking is a more intuitive and efficient way to achieve this.

Additional context

The following files are relevant to this feature request:

snappymail/v/0.0.0/app/templates/Index.html
dev/Styles/User/MessageList.less
dev/Stores/User/Messagelist.js
dev/View/User/MailBox/MessageView.js

The proposed solution involves adding a new property to the MessagelistUserStore object called msgDblSelected. This property will be set to true when a message is double-clicked and false when the message is closed. The CSS class fullView will be applied to the reading panel when msgDblSelected is true, which will hide the message list and display the full message content.

snappymail/v/0.0.0/app/templates/Index.html

<div id="rl-right" data-bind="css: { fullView: msgDblSelected }></div>

dev/Stores/User/Messagelist.js

addObservablesTo ….
+msgDblSelected

dev/View/User/MailBox/MessageList.js

	gotoThread(message) {
		if (message?.threadsLen()) {
			MessagelistUserStore.pageBeforeThread(MessagelistUserStore.page());

			hasher.setHash(
				mailBox(FolderUserStore.currentFolderFullNameHash(), 1, MessagelistUserStore.listSearch(), message.uid)
			);
+		} else {
+			 MessagelistUserStore.msgDblSelected(true);
+		}
	}

dev/View/User/MailBox/MessageView.js

closeMessage() {
		currentMessage(null);
		MessagelistUserStore.focusedMessage(null);
+             MessagelistUserStore.msgDblSelected(false);
		}

dev/Styles/User/MessageList.less

.message-selected.fullView {
    #V-MailMessageList {
        display: none;
    }
    #V-MailMessageView .top-toolbar {
        display: block;
    }
}


Feature Suggestion: Double-Click Behavior Configuration

With the current change, double-clicking opens the system in full screen. However, I would like to suggest a more flexible approach, allowing users to define the double-click behavior through a configuration.

Proposal:
Add a configuration option to customize the double-click behavior. The options would be:

Default: Does nothing.
Open without split:With options to reply and label (exactly like it works in the reading panel).
image

Open in a new tab: With options to reply and label (exactly like it works in the reading panel).
image

Open in full screen: Keeps the behavior from commit 68045f5.
I am willing to develop this feature and submit a Pull Request for implementation if there is interest.

You should create new issues.
As this has the title "full-screen" which is implemented now.