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

Chore: Set tum artemis server as default #257

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

FelberMartin
Copy link
Collaborator

Problem Description

The current Artemis Android release in the Play Store uses the "Tum" build flavor, which does not allow instance (artemis server) selection. Simply switching the released build flavor to "unrestricted" would have caused already logged in users with weird behaviour (all network calls would fail because it would try to reach the artemis server via localhost; only a logout and sign in again would have resolved this issue).

Changes

  • Changed the default server for the "unrestricted" flavor to the tum artemis server
  • Adapted settings code to rely on the serverUrl instead of the duplicated logic with hasUserSelectedInstance
    • Removed now no longer needed code hasUserSelectedInstance
  • Fixed bug introduced by Feature: Add navigation animations #222, as it removed the NestedDestination.InstanceSelection navigation target, but did not remove it in other places of the code. This would lead to an app crash just after freshly installing the app.

Steps for testing

Scenario 1 - Updating the app from "tum" to "unrestricted" flavor

  • Uninstall the app on the test device
  • Switch the build variant by Menu > Build > Select Build variant ... and select "productionTumDebug" for :app
  • Launch the app and log in with your TUM credentials
  • Now we check that changing to new release version with the "unrestricted" flavor works as expected:
    • Change the build variant to "productionUnrestrictedDebug" for :app
    • Launch the app
    • See that you are still logged in with your account to the TUM server and the dashboard is loaded

Scenario 2 - Fresh install

  • Uninstall the app on the test device
  • Directly change the build variant to "productionUnrestrictedDebug" for :app
  • Launch the app
  • See that by default the tum instance is selected for login, but the user can also select a different server by pressing "not your university"

@FelberMartin FelberMartin added the ready for review This PR can be reviewed label Dec 27, 2024
@FelberMartin FelberMartin self-assigned this Dec 27, 2024
@eylulnc
Copy link
Contributor

eylulnc commented Dec 30, 2024

Both scenario works as expected, I only have few suggestions,

1 - Maybe we can open the instance bottom sheet as full
2 - In iOS if we select different instance that default, itshows which one maybe we can also have sth like this

Screenshot 2024-12-30 at 12 28 25

Copy link
Contributor

@eylulnc eylulnc left a comment

Choose a reason for hiding this comment

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

Lgtm!

@FelberMartin
Copy link
Collaborator Author

FelberMartin commented Dec 30, 2024

I addressed your comments and the BottomSheet now opens in full screen.
I also added an indicator of the the server host, however I thought it mainly is helpful for us developers (which test server do we have selected?), but not really necessary for the end users, so I decided to only show it in the debug version. Do you think this is sufficient @eylulnc ?

EDIT: I now also added the host url for non-debug build, but only if the user has selected a custom instance.

@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Dec 31, 2024
Copy link
Contributor

@julian-wls julian-wls left a comment

Choose a reason for hiding this comment

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

Just tested your changes and I did not notice any issues. The code changes seem appropriate.

@FelberMartin FelberMartin merged commit a22457d into develop Jan 3, 2025
5 checks passed
@FelberMartin FelberMartin deleted the chore/set-tum-artemis-server-as-default branch January 3, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants