google / google/ground-android

[Code health] Rename members of `LocalDataStore` classes

Open
#1,425 7 comments 0 reactions 0 assignees View on GitHub
type: code health
Dominant language
Kotlin
Stars
293
Forks
149
Avg merge
1d 16h
Merged PRs (30d)
42

Description

To improve readability, recommending the following changes to `LocalDataStore`. Sharing initial thoughts here:

* `surveyStore` -> `surveys`
* `userStore` -> `users`
* etc.

Then, in each local data store, functions can exclude the qualifier (survey, locationOfInterest, etc), since they data store name already qualifies them. Also, we should be consist and use meaningful verbs to clarify what each fun does. For ex, in `LocalSurveyStore`:

* `surveys()` -> `loadAll()`
* `getSurveyById()` -> `loadById()`
* etc

Lastly, replace `surveyDataStore` alias with direct reference to `localDataStore.surveys` to remove ambiguity.

Example usage:

* `localDataStore.surveys.loadAll()`

@scolsen Wdyt?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.