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

Full-screen Message View on Double-Click #1787

Closed
eriksid opened this issue Oct 1, 2024 · 3 comments
Closed

Full-screen Message View on Double-Click #1787

eriksid opened this issue Oct 1, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@eriksid
Copy link

eriksid commented Oct 1, 2024

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;
    }
}


@eriksid
Copy link
Author

eriksid commented Oct 2, 2024

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.

@the-djmaze
Copy link
Owner

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

@eriksid
Copy link
Author

eriksid commented Oct 2, 2024

#1791

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

No branches or pull requests

2 participants