nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

Enable Zoom Options in Preferences

Open nirmit opened this issue 7 years ago • 18 comments

This attempts to fix #59 by adding the option in preferences to change the zoom factor. The current available values are 80%, 100% (default), 125%, 150%, 175% and 200%.

Fixes #59

nirmit avatar Nov 12 '17 06:11 nirmit

Oh, cool! How well does it work?

dweremeichik avatar Nov 12 '17 17:11 dweremeichik

It works pretty well.

125% 125

150% 150

200% 200

nirmit avatar Nov 13 '17 03:11 nirmit

Fantastic! I've been waiting for this.. Thank you! Please compile a new version with this pretty soon :-)

On Mon, 13 Nov, 2017 at 3:38 AM, Nirmit [email protected] wrote:

It works pretty well.

125%

150%

200%

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

lamixer avatar Nov 13 '17 09:11 lamixer

@nirmit is this one ready to merge, or do you still have some changes to make?

dweremeichik avatar Nov 13 '17 18:11 dweremeichik

Ready to merge! Can someone test this on Linux/Windows? I don't have either. :(

nirmit avatar Nov 13 '17 18:11 nirmit

I'm :+1: on this, I will give it a spin on Linux when I get a chance.

dweremeichik avatar Nov 15 '17 03:11 dweremeichik

im :+1: if @dweremeichik is

mikeseese avatar Nov 15 '17 03:11 mikeseese

I'll merge after testing.

dweremeichik avatar Nov 15 '17 03:11 dweremeichik

This breaks for me after opening up an email. (It resets to default).

dweremeichik avatar Nov 21 '17 00:11 dweremeichik

That is what happens if you set the zoom level in the config file also -- you see the zoom but clicking on something makes it revert to normal.

On Tue, 21 Nov, 2017 at 12:18 AM, Dylan Weremeichik [email protected] wrote:

This breaks for me after opening up an email. (It resets to default).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

lamixer avatar Nov 21 '17 00:11 lamixer

Hmm... Once you set the zoom, can you check if the interfaceZoom value propagates to all the config files in ~/.nylas-mail. It seems that the old value lingers in one of the config files.

nirmit avatar Nov 21 '17 02:11 nirmit

@nirmit do you have a status on this since the last comments? are you waiting on someone to test and provide feedback?

mikeseese avatar Dec 13 '17 04:12 mikeseese

@seesemichaelj the issue is that not all versions of the config.json get the updated interfaceZoom values when the user changes the default. Can you help here in making this consistent across the various config.jsons being created?

If I change the zoom options, don't click on an email from the thread list, quit Nylas, and reopen, the interfaceZoom is updated and used. The client then displays everything with the desired zoom.

nirmit avatar Dec 13 '17 14:12 nirmit

Well no where in your code does it look like the config is ever being changed? Unfortunately I don't really know how to add a parameter to be written to the config file

mikeseese avatar Dec 14 '17 02:12 mikeseese

A change in settings emits a change event that triggers an atomic write. Am I missing something?

In this case, the write happens in one file and not the other 9. If you change the zoom settings, you can see the changed value in one of your config.

On Wed, Dec 13, 2017 at 9:31 PM Mike Seese [email protected] wrote:

Well no where in your code does it look like the config is ever being changed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nylas-mail-lives/nylas-mail/pull/166#issuecomment-351590112, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaUJPxfpXoTB-4_EyfYVy3yxwJlIlmiks5tAIiegaJpZM4QaxzW .

nirmit avatar Dec 14 '17 04:12 nirmit

The config.json files are timestamped backups. so the one with the biggest number should be the most recent one, and the one that has your change. we always read from the most recent config file; so i wouldn't expect this to be a problem as i expect the 9 files to not have your thing as they're backed up versions of the config

mikeseese avatar Dec 14 '17 04:12 mikeseese

But the file that gets the update is not being used when a user clicks an email in the thread list.

As mentioned earlier, if you quit and reopen Nylas after making the change, it persists.

On Wed, Dec 13, 2017 at 11:41 PM Mike Seese [email protected] wrote:

The config.json files are timestamped backups. so the one with the biggest number should be the most recent one, and the one that has your change. we always read from the most recent config file; so i wouldn't expect this to be a problem as i expect the 9 files to not have your thing as they're backed up versions of the config

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nylas-mail-lives/nylas-mail/pull/166#issuecomment-351607168, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaUJNFkqawGiV03Z8U3uePmdDRnh-keks5tAKb5gaJpZM4QaxzW .

nirmit avatar Dec 14 '17 04:12 nirmit

Ah ok. I think you need to listen to the NylasEnv.config.onDidChange event to get the change in the config. Looks like what you're reading is just the initial config variable. Probably a similar example for this would be https://github.com/nylas-mail-lives/nylas-mail/blob/91d6514c97ebaa1cf8767be1eda31b14e27df427/packages/client-app/src/browser/system-tray-manager.es6#L59-L66

mikeseese avatar Dec 14 '17 04:12 mikeseese