Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential save course fix #964

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

potential save course fix #964

wants to merge 2 commits into from

Conversation

plumshum
Copy link
Contributor

Summary

  • default collection functionality changed
  • courses in default collection can only be removed by specifically removing that course from the default collection

This pull request is the first step potentially fixing save Courses default collection functionality

Test Plan

  • If no specific collection is chosen, then a course is only saved to the 'All/default collection'
  • If a course is deleted from 'All/default collection', then every instance of that course is deleted from the specific collections
  • Note: if a course is removed from any instance from the specific collections, that course will still remain in the 'All/default collection`
  • There should never be any duplicate courses in a particular collection.

Notes

May not change the functionality based on future user reviews

Blockers

  • A newly discovered dependency that hasn’t been addressed

Breaking Changes

  • Database schema change (anything that changes Firestore collection structure)
  • Other change that could cause problems (Detailed in notes)

- default collection functionality changed
- courses in default collection can only be removed by specifically removing that course from the default collection
@dti-github-bot
Copy link
Member

[diff-counting] Significant lines: 21.

Copy link
Contributor

github-actions bot commented Nov 17, 2024

Visit the preview URL for this PR (updated for commit f00b29a):

https://cornelldti-courseplan-dev--pr964-savedcourses-fixes-hpuztrf4.web.app

(expires Tue, 17 Dec 2024 22:25:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 6d4e0437c4559ed895272bbd63991394f1e0e933

Copy link
Contributor

@nidhi-mylavarapu nidhi-mylavarapu left a comment

Choose a reason for hiding this comment

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

I know this is a draft PR so there are still some more fixes but great progress so far!! thanks so much for being on top of it!

@@ -162,6 +162,11 @@ export default defineComponent({
collection => !this.checkedCollections.includes(collection)
);

// If no specific collections were selected, and no prevoius selections were removed, add to 'All'
if (addedToCollections.length === 0 && deletedFromCollections.length === 0) {
console.log('added to All');
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify the functionality:
anytime you save any course, it should end up in the "all" collection, whether you add it to another specific collection or not?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, on a completely separate note, should the other drop downs for collections close if you open a different one? That is, is it possible for all of the collection drop downs to be open at the same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants