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

Add hidden developer settings in release builds too #3020

Merged

Conversation

jmartinesp
Copy link
Contributor

@jmartinesp jmartinesp commented Jun 12, 2024

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Adds developer settings for release apps too:

  • They can temporarily be enabled by tapping 7 times in the app info footer in the settings screen. Once the app restarts they'll be hidden again.
  • The room directory search feature flag will be hidden for release builds in play store versions until we have a way to safely enable it and filter out NSFW data.

Motivation and context

Helping users using release builds debug some issues.

Tests

  • You'd have to build the release apk for his branch, then install it and log in.
  • Go to settings, tap 7 times in the version info at the bottom.
  • The developer settings item should appear and you can navigate to it.
  • The room directory search FF should be hidden.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

Copy link
Contributor

github-actions bot commented Jun 12, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/pkxSee

@jmartinesp jmartinesp changed the title Fix tracing configuration in debug and nightlies: Add hidden developer settings in release builds too Jun 12, 2024
@jmartinesp jmartinesp force-pushed the misc/jme/add-hidden-developer-settings-to-release-builds branch from 19b852c to bead18a Compare June 12, 2024 10:21
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.79%. Comparing base (c9e0db2) to head (3c8c905).

Files Patch % Lines
...tures/preferences/impl/root/PreferencesRootView.kt 57.14% 1 Missing and 2 partials ⚠️
.../preferences/impl/root/PreferencesRootPresenter.kt 83.33% 0 Missing and 1 partial ⚠️
...rences/impl/utils/ShowDeveloperSettingsProvider.kt 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3020   +/-   ##
========================================
  Coverage    75.78%   75.79%           
========================================
  Files         1611     1613    +2     
  Lines        38101    38124   +23     
  Branches      7362     7367    +5     
========================================
+ Hits         28876    28895   +19     
- Misses        5373     5374    +1     
- Partials      3852     3855    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmartinesp jmartinesp marked this pull request as ready for review June 12, 2024 16:36
@jmartinesp jmartinesp requested a review from a team as a code owner June 12, 2024 16:36
@jmartinesp jmartinesp requested review from ganfra and removed request for a team June 12, 2024 16:36
@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 13, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jun 13, 2024
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Some late remarks, feel free to ignore :)

package io.element.android.features.preferences.impl.root

sealed interface PreferencesRootEvents {
data object EnableDeveloperSettingsClicked : PreferencesRootEvents
Copy link
Member

Choose a reason for hiding this comment

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

Just one late remark, I would name this Event OnFooterClick

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to OnVersionInfoClick since it's a bit more descriptive.

assertThat(loadedState.showDeveloperSettings).isFalse()

repeat(times = ShowDeveloperSettingsProvider.DEVELOPER_SETTINGS_COUNTER) {
loadedState.eventSink(PreferencesRootEvents.EnableDeveloperSettingsClicked)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add at the beginning of the repeat block:

assertThat(awaitItem().showDeveloperSettings).isFalse()

Copy link

sonarcloud bot commented Jun 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@jmartinesp jmartinesp merged commit cd04502 into develop Jun 13, 2024
22 checks passed
@jmartinesp jmartinesp deleted the misc/jme/add-hidden-developer-settings-to-release-builds branch June 13, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants