crunch-time / crunch-time/crunchtime

Update condition for the info box: "Your class selections have changed. Refreshing your schedules..."

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
frontend
Dominant language
Vue
Stars
9
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The info box for "Your class selections have changed. Refreshing your schedules..." currently checks the **length** of classSections and doesn't even consider customEvents. The condition should watch the Vuex state instead, like SelectedEvents.vue.

```js
//PaginatedSchedule
selectedClassSectionsHaveUpdated: function() {
if (this.lastUsedClassSections.length == 0) { // For when the component is first created
return false;
} else {
// (big) TODO: This should also check the contents, not just the length. Also it's not checking custom events.
return this.lastUsedClassSections.length != this.classSections.length;
}
},
```

```js
// SelectedEvents
watch: {
selectedCoursesAndCustomEvents: function() {
this.throttledGetSchedules();
}
},
computed: {
selectedCoursesAndCustomEvents: function() {
return this.$store.state.selectedCustomEvents.concat(this.$store.state.selectedCourses);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the PaginatedSchedule component at selectedClassSectionsHaveUpdated, then compare its state handling with SelectedEvents.vue and selectedCoursesAndCustomEvents. Verify that the info box responds to changes in both selected courses and custom events, including changes to the selections themselves rather than only their count.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.