willowtreeapps / willowtreeapps/vocable-android

Combine EditPhrasesKeyboardFragment and AddPhraseKeyboardFragment

Open
#496 0 comments 0 reactions 1 assignee View on GitHub

@lauren-ahart is already working on this.

Since May 14, 2024.

Dominant language
Kotlin
Stars
127
Forks
21
Avg merge
16m
Merged PRs (30d)
4

Description

These fragments are both subclasses of EditKeyboardFragment, and have very similar functionality. EditPhrasesKeyboardFragment should be able to handle both jobs, with the following changes:

  • Add a boolean nav arg that identifies whether a phrase is being added (a var already exists in the fragment for this, but its value is always false)
  • Pass the appropriate value for said nav arg when editing vs. adding a new phrase (tapping existing phrase or using + button)
  • Alter nav graph so that the + button on EditCategoryPhrasesFragment opens an Edit fragment instead of an Add fragment
  • Add the function addPhrase to EditPhrasesViewModel: see AddPhraseViewModel
  • Probably replace use of deprecated ILegacyCategoriesAndPhrasesRepository in PhrasesUseCase (may be best broken out into future work)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.