Skip to content

Conversation

@oskar-codes
Copy link
Collaborator

@oskar-codes oskar-codes commented Dec 12, 2024

This pull request adds pull to refresh indicators just like the one in the user's profile in the following places:

  • Association Profile
  • Event Details
  • Home Screen
  • Saved Screen
  • Explore Screen

This pull request also temporarily fixes the issue where a newly created event would not show up on the association's page. This fix should be refactored soon as it produces excessive requests. EDIT: This has been fixed.

@oskar-codes oskar-codes self-assigned this Dec 12, 2024
@oskar-codes oskar-codes added the enhancement New feature or request label Dec 16, 2024
@oskar-codes oskar-codes linked an issue Dec 16, 2024 that may be closed by this pull request
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
68.28% Line Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Collaborator

@AlexeiThornber AlexeiThornber left a comment

Choose a reason for hiding this comment

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

Overall these are great changes that will greatly improve the user experience when loading events, associations, ect.. I will refuse this pull request so that you can add some java doc to the methods found in the repositories. Aside that this is some great work. Well done 👾 !

.onNodeWithText(event.description, substring = true)
.assertDisplayComponentInScroll()

Espresso.onView(ViewMatchers.isRoot()).perform(ViewActions.swipeUp())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Amazing tests! Using Expresso, thinking about me every time oh, is a great way to test this functionality !

script: firebase emulators:exec --import=firebase/emulator-data './gradlew connectedCheck --parallel --build-cache'

# Upload the test results to the artifacts
- name: Upload Test Results
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great Addition, maybe a bit late for the project, but better than never

* fetched.
* @param onFailure [(Exception) -> Unit] : The callback to call when the fetch fails.
*/
override fun getAssociationWithId(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good job separating the two types of databases calls. If we just use the snapchot listener, there will be way too many Firebase requests 🚀

Copy link
Collaborator

Choose a reason for hiding this comment

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

The only thing I can critisize is the lack of descriptions to the methods. If you can add a small javadoc that'll be great !

})
}

fun refreshAssociation() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a description to this method ?

}
}

fun refreshEvent() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again maybe add a description and a toast

_refreshState.value = false
},
onFailure = { exception ->
Log.e("AssociationViewModel", "Failed to fetch association", exception)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe that a toast would be a good implementation in the onFailure to show the user what is going on

@AlexeiThornber AlexeiThornber merged commit 46d3adf into main Dec 19, 2024
2 of 3 checks passed
@AlexeiThornber AlexeiThornber deleted the feature/pull-to-refresh branch December 19, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pull-to-refresh indicators to several screens

3 participants