Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Update Settings Dialog to allow for better scaling #984

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

MortimerGoro
Copy link
Contributor

@MortimerGoro MortimerGoro commented Mar 5, 2019

Fixes #638 and #214 and #705

@ghost ghost assigned MortimerGoro Mar 5, 2019
@ghost ghost added the in progress label Mar 5, 2019
@bluemarvin
Copy link
Contributor

Now that the pref dialog is larger, it feels too close. We might want to consider moving it back a bit.
The external storage preference seems to be broken:
screen_shot_1903052600
The switch shows Allow but it is still red. Also there is this dialog behind the preference dialog which can be seen if you close the preference dialog:
screen_shot_1903052626
If this dialog is accepted, then you get the system prompt. This might be a bug in GeckoView.

The environment dialog has the wrong text for the reset button:
screen_shot_1903051508

The privacy dialog has the wrong text for the reset button as well.
screen_shot_1903051601
I also really dislike using toggle buttons for this functionality. My expectation as a user is that clicking on it will change the preference. I find this dialog confusing and unexpected:
screen_shot_1903051726

@bluemarvin
Copy link
Contributor

Looks like the external storage is a GeckoView issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1527074

@bluemarvin
Copy link
Contributor

One other thing that might be useful is to add a Use Current Page button to the Homepage option.

@bluemarvin
Copy link
Contributor

Got this crash while testing noapi https://crash-stats.mozilla.com/report/index/bp-bb896c7a-043d-4243-940e-1cb560190305

Unfortunately stack trace isn't helpful. I was in the Display prefs dialog and had pressed the back button. Haven't been abler to reproduce the issue yet.

Copy link
Contributor

@philip-lamb philip-lamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't done a full test of the build yet but I concur with Randall's observations. As regards the permissions dialog. while the UIS showed toggle switches, these are inappropriate given that we can't disable the system setting. So I would recommend a two-element approach, where if the permission is disabled, we show a button with the label "Enable", and if the permission is enabled, the button is removed and replaced with a label "Enabled".

In the environments panel, the "Allow environment override" doesn't really explain who or what would override. Might be better as "Allow sites to override environment".

@MortimerGoro
Copy link
Contributor Author

MortimerGoro commented Mar 6, 2019

PR updated:

  • Use button and label instead of the switch
  • Fix settings distance due to larger size
  • Fix wrong text in reset buttons
  • Fix external storage read permission
  • Improve text on honeybomb buttons (sans-serif-light doesn't look good in VR)

@philip-lamb regarding "Allow environment override" I agree that it's confusing. It's used to load enviroments from a hardcoded folder in sdcard. We need to find a better text, and maybe add a tooltip/more info button because there is not enough space to explain it. We can address that as a follow-up issue

@bluemarvin
Copy link
Contributor

Wiki page explaining external environments:
https://github.com/MozillaReality/FirefoxReality/wiki/Environments

@MortimerGoro
Copy link
Contributor Author

I can add a more info button below the env override switch that opens that URL, what do you think?

@bluemarvin
Copy link
Contributor

bluemarvin commented Mar 6, 2019

I got this crash when I hit the reset button in Display options dialog:

https://crash-stats.mozilla.com/report/index/d7b7d268-2f35-42da-8008-1dd570190306
https://crash-stats.mozilla.com/report/index/bp-9854595e-bf55-4655-b780-e42e40190306

It was reproducible. This was with the latest version of the PR.

@bluemarvin
Copy link
Contributor

It looks like the tracking protection toggle doesn't actually work.
If you go here: https://mozilla.github.io/tracking-test/
If TP is disabled you should see:
screen shot 2019-03-06 at 10 22 55 am
But I always see regardless of the setting:
screen shot 2019-03-06 at 10 23 07 am

public void setTrackingEnabled(final boolean aEnabled) {
State state = getCurrentState();
if (state != null && state.mSettings.trackingProtection != aEnabled) {
state.mSettings.multiprocess = aEnabled;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be the problem, looks like a CCP error. multiprocess should be trackingProtection

@MortimerGoro
Copy link
Contributor Author

@bluemarvin Pushed a new commit with fixes for tracking and the crash. The crash also happened on master, was not related to this PR.

@MortimerGoro
Copy link
Contributor Author

I have added a help icon in the environment override setting that opens the wiki page

@philip-lamb
Copy link
Contributor

Looks good, except for one minor UI issue... if you click "deny" on any permissions dialog, and later trigger the dialog again, the "don't ask again" box is really cramped. Is this our dialog or a system one?
device-2019-03-08-112826

@bluemarvin
Copy link
Contributor

Looks good, except for one minor UI issue... if you click "deny" on any permissions dialog, and later trigger the dialog again, the "don't ask again" box is really cramped. Is this our dialog or a system one?

That's the system's UI

@philip-lamb philip-lamb self-requested a review March 9, 2019 03:18
Copy link
Contributor

@philip-lamb philip-lamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested one additional item; scroll direction. The "natural" vs "reversed" should apply to both X and Y axes... this is basically the difference between touch-surface scrolling and joystick scrolling, so it should be consistent in both axes. In #705 there was a request to separate X and Y scrolling axes which I think we should consider in another issue (including design).

@MortimerGoro
Copy link
Contributor Author

@philip-lamb good catch. I updated the PR to fix the horizontal reversed scrolling

Copy link
Contributor

@cvan cvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really solid work 👍 this adds some outstanding improvements to the Settings UX.

apologies in advance for having to read all my nitpicky comments. I'll leave it up to your discretion of what to punt on for now.

the items I feel strongly about:

  1. improving UX of Privacy & Security > Permissions: Enabled vs. Enable buttons.
  2. adding the missing Notifications item to the list of Permissions.
  3. adding titles at the top of the Settings dialog windows.
  4. changing Privacy Policy's Show button -> Learn More (in Privacy & Security > Permissions)
  5. increasing the click targets of the Environments radio buttons so they don't miss user clicks. (it'd be great if we can at least increase the height so the area above/below the text is clickable in the row, and ideally we can make the entire row clickable, but that's fine if it's not handled in this PR.)

many thanks for reading all my (mostly nitpicky) comments and taking the time to iterate on this. and thank you for patiently waiting for my review on this. 👍

permission,
aCallback);
public void requestPermission(String uri, @NonNull String permission, GeckoSession.PermissionDelegate.Callback aCallback) {
if (uri != null && uri.length() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we replace .length > 0 with .isEmpty(), to be consistent with usage mostly elsewhere.

if (uri != null && uri.length() > 0) {
mPermissionDelegate.onAppPermissionRequest(SessionStore.get().getCurrentSession(), uri, permission, aCallback);
} else {
mPermissionDelegate.onAndroidPermissionsRequest(SessionStore.get().getCurrentSession(), new String[]{permission}, aCallback);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can new String[]{permission} be permission.toString()?

}
}

public void setTrackingEnabled(final boolean aEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be called setTrackingProtection instead of setTrackingEnabled (for consistency with the names of this class' methods and their respective setting properties)?

if (mAudio != null) {
mAudio.playSound(AudioEngine.Sound.CLICK);
}
SessionStore.get().loadUri(getContext().getString(R.string.environment_override_help_url));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is helpful. thanks for adding 👍


P.S. UX nit request: to make it easier for developers who will likely be reading documentation from their desktop PC screens, it might be nice to have @philip-lamb submit a bit.ly request for a short URL (à la https://mzl.la/fxr or https://mzl.la/reality), and the tiny URL could possibly be shown in a tooltip upon hover.

image


String env = SettingsStore.getInstance(getContext()).getEnvironment();
mEnvironmentsRadio = findViewById(R.id.environmentRadio);
mEnvironmentsRadio.setOnCheckedChangeListener(mEnvsListener);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX request: would it be possible to increase the radius of the click target for the radio such that clicking anywhere on the row (the thumbnail, the radio button, or anywhere around but not precisely on the text line) would trigger a checked-change event?

I found myself thinking the UI was broken, until I was more precise with my clicks.

image

@MortimerGoro
Copy link
Contributor Author

Good catch @cvan on the radio button click area. I refactored the environment layout to make it work clicking on any area of the row.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants