-
Notifications
You must be signed in to change notification settings - Fork 18
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
Changing uc link to open in app page #1035
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1035 +/- ##
=======================================
- Coverage 16% 15% -0%
=======================================
Files 228 228
Lines 6888 6899 +11
=======================================
- Hits 1083 1020 -63
- Misses 5805 5879 +74 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Left a few comments that should be easy to address.
be3ea97
to
ca7a80a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, some SDK/git issues to address.
The main point of the feature is done, though!
ca7a80a
to
b1d342d
Compare
d058b08
to
9f45374
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit weird that we're creating a sentinel course unit if we can't find one. I think we should simply use something like findOrNull
(if that is the correct name) and simply display an error.
417c250
to
bd61b50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, I just have a few suggestions I thought would be useful!
final courseUnits = | ||
Provider.of<ProfileProvider>(context, listen: false).state!.courseUnits; | ||
final notFound = | ||
CourseUnit(abbreviation: 'NF', name: 'not found', occurrId: 0); | ||
final correspondingCourseUnit = courseUnits.firstWhere( | ||
(courseUnit) => courseUnit.occurrId == occurrId, | ||
orElse: () => notFound, | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a way to pass down the courseUnit from the parent that build the schedule slot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid sentinel values. Return null in case of error.
if (correspondingCourseUnit(context).name == 'not found') { | ||
return const Column( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can't find a way to pass down the course unit from the parent of the schedule slot, you could run this in the initState method so that this doesn't every time the component is rebuilt!
568d250
to
1a6983b
Compare
1a6983b
to
519da09
Compare
final courseUnits = | ||
Provider.of<ProfileProvider>(context, listen: false).state!.courseUnits; | ||
final notFound = | ||
CourseUnit(abbreviation: 'NF', name: 'not found', occurrId: 0); | ||
final correspondingCourseUnit = courseUnits.firstWhere( | ||
(courseUnit) => courseUnit.occurrId == occurrId, | ||
orElse: () => notFound, | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid sentinel values. Return null in case of error.
e62adcc
to
8c9a9c3
Compare
8c9a9c3
to
2d0c6c2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Closes #913
Review checklist
whatsnew/whatsnew-pt-PT
changelog.md
with the change