-
Notifications
You must be signed in to change notification settings - Fork 221
Update Settings Dialog to allow for better scaling #984
Conversation
Looks like the external storage is a GeckoView issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1527074 |
One other thing that might be useful is to add a |
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 |
There was a problem hiding this 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".
c6911a9
to
d9c7aec
Compare
PR updated:
@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 |
Wiki page explaining external environments: |
I can add a |
I got this crash when I hit the https://crash-stats.mozilla.com/report/index/d7b7d268-2f35-42da-8008-1dd570190306 It was reproducible. This was with the latest version of the PR. |
It looks like the tracking protection toggle doesn't actually work. |
public void setTrackingEnabled(final boolean aEnabled) { | ||
State state = getCurrentState(); | ||
if (state != null && state.mSettings.trackingProtection != aEnabled) { | ||
state.mSettings.multiprocess = aEnabled; |
There was a problem hiding this comment.
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
d9c7aec
to
c6ac211
Compare
@bluemarvin Pushed a new commit with fixes for tracking and the crash. The crash also happened on master, was not related to this PR. |
I have added a help icon in the environment override setting that opens the wiki page |
That's the system's UI |
There was a problem hiding this 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).
@philip-lamb good catch. I updated the PR to fix the horizontal reversed scrolling |
There was a problem hiding this 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:
- improving UX of Privacy & Security > Permissions:
Enabled
vs.Enable
buttons. - adding the missing Notifications item to the list of Permissions.
- adding titles at the top of the Settings dialog windows.
- changing Privacy Policy's
Show
button ->Learn More
(in Privacy & Security > Permissions) - 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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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()
?
app/src/common/shared/org/mozilla/vrbrowser/browser/SessionStore.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
public void setTrackingEnabled(final boolean aEnabled) { |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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.
|
||
String env = SettingsStore.getInstance(getContext()).getEnvironment(); | ||
mEnvironmentsRadio = findViewById(R.id.environmentRadio); | ||
mEnvironmentsRadio.setOnCheckedChangeListener(mEnvsListener); |
There was a problem hiding this comment.
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.
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/EnvironmentOptionsWidget.java
Outdated
Show resolved
Hide resolved
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/dialogs/EnvironmentOptionsWidget.java
Outdated
Show resolved
Hide resolved
app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/options/ControllerOptionsWidget.java
Outdated
Show resolved
Hide resolved
061de9b
to
675218e
Compare
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. |
Fixes #638 and #214 and #705