Skip to content

Commit

Permalink
Merge pull request #121 from CSE-110-Winter-2024/fixing-reverts
Browse files Browse the repository at this point in the history
reverted half of previous reversion from 'UI Bug Fixes + Goal Creatio…
  • Loading branch information
JGonzaga7 authored Mar 15, 2024
2 parents 1472c5c + 2207ed1 commit 416840b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,24 @@ Successorator is an Android app, designed to help people keep track of their dai
- [x] - Setup GitHub repo (branch protection, CI, etc) (1hr)
- [ ] - Create app in android studio and push basic stuff to git (1hr)


## Post Iteration 1 planning

### Post Iteration 1 (15/18)
US1: Menu to swap between type of goal displayed High, 4/4hr
US3: Context assignment for new goal High, 4/4hr
US6: View and create recurring goal on Recurring page High, 6/9hr
Loose task: Iteration 1 testing, 1hr

Team Velocity = 15 / 30 = 0.5

Due to some issues with scheduling, some members did not work all 6 hours of the week. Therefore, the total amount of hours worked is reduced. Some of the tasks for Stories in iteration 2 has overlap with tasks done in iteration 1 such as the logic needed being mostly complete. Therefore, the hours needed to complete stories 2, 4, 5, and 7 are reduced.

### Planned Iteration 2 (17.75/18)
US2: Order/group by Context (+ Focus Mode Filter) Medium, 5hr -> 4hr
US4: View and create goal on Tomorrow page Low, 4hr -> 2.5hr
US5: Create recurring goal on “currently selected” day Low, 2hr -> 1.5hr
US6: View and create recurring goal on Recurring page High, 3hr
US7: Create pending goal Medium, 2hr -> 1.75hr
US 8: Move pending goal Low 3hr
Loose task: Iteration 2 testing, 1hr
Loose task: Milestone 2 testing, 1hr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import android.app.AlertDialog;
import android.app.Dialog;
import android.os.Bundle;

import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
Expand All @@ -14,8 +15,6 @@

import android.view.inputmethod.EditorInfo;
import android.widget.TextView;


import edu.ucsd.cse110.successorator.MainViewModel;
import edu.ucsd.cse110.successorator.databinding.FragmentDialogCreateGoalBinding;
import edu.ucsd.cse110.successorator.lib.domain.AppMode;
Expand Down Expand Up @@ -56,7 +55,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {

@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState){
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
this.view = FragmentDialogCreateGoalBinding.inflate(getLayoutInflater());

// Hook up button labels to the view model
Expand Down Expand Up @@ -103,7 +102,7 @@ public Dialog onCreateDialog(@Nullable Bundle savedInstanceState){
TextView.OnEditorActionListener editListener = (v, actionId, event) -> {
//actionId determined in corresponding xml file.
//Unnecessary now but futureproofs for multiple textboxes with the same listener.
if(actionId == EditorInfo.IME_ACTION_DONE){
if (actionId == EditorInfo.IME_ACTION_DONE) {
String content = view.goalInput.getText().toString();

if (context == null) {
Expand All @@ -114,13 +113,14 @@ public Dialog onCreateDialog(@Nullable Bundle savedInstanceState){
return false;
}

//If on pending view logic to make pending goal
if (mainViewModel.getCurrentMode().getValue() == AppMode.PENDING) {
mainViewModel.addPendingGoal(content, context);
} else if (this.recurrenceType != recurrenceType.NONE) {
mainViewModel.addRecurringGoalDateless(content, this.recurrenceType, context);
} else {
mainViewModel.addGoal(content, context);
}

//Lambda functions allow for usage of this. in interface declaration.
//Interestingly, without it dismiss() appears to call the correct function regardless.
this.dismiss();
Expand Down

0 comments on commit 416840b

Please sign in to comment.