-
Notifications
You must be signed in to change notification settings - Fork 6
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
Profile-Calendar and SOC-Search Implementation #29
Open
p8gonzal
wants to merge
25
commits into
UCSD:experimental
Choose a base branch
from
p8gonzal:profile
base: experimental
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Relevant Files and Changes:
Profile + Calendar
main.dart
Checking if token is being passed in (will be true when Campus Mobile opens Webreg-Mobile).
If not, will redirect to authentication_sso.dart
authentication_sso.dart
Will redirect user to SSO login page. Once logged in, will capture token from URL and redirect to bottom.dart (Main page)
bottom.dart
Main page calls two objects of Calendar( calendarType: ). Type for classes + discussion: 'LECT_DISC’. Type for finals: ‘FINALS’.
calendar.dart
Initializes an instance of the profile provider from providers/profile.dart. Begins by creating a future builder of profileProvider.fetchProfile(). Once call is complete, creates section cards of type CalendarCard from calendar_card.dart from a Profile Model from models/profile.dart. Main method to create cards is buildCalendarCard(String sectionType, SectionData sectionObject).
‘
providers/profile.dart
Change Notifier containing profile service from services/profile.dart and profile model models/profile.dart.
service/profile.dart
Employs Network Helper to call the user’s profile service. Will be replaced later with live APIs. Currently using mock lamda + api gateway: ‘https://i4ghbvwuo9.execute-api.us-west-2.amazonaws.com/qa/profile'
models/profile.dart
Top level of ‘enrolled classes’ but is composed of smaller data models in models/schedule_of_classes.dart. Particularly SectionData.
Schedule Of Classes + Search
search_view.dart
Initializes an instance of the schedule of classes provider from providers/schedule_of_classes.dart. Upon first run of this search, we get current term and previous terms in order to fill in term selector. Done with a future builder calling from classesProvider.scheduleOfClassesService.fetchTerms() from services/schedule_of_classes.dart. Once complete and query is entered, query will be parsed and generate a search input. Then a future builder will call classesProvider.fetchClasses(searchBuilder). Once complete, results list will be generated. Upon selecting an item in results list, redirected to an instance of SearchDetail(data: course) where course model is passed in (models/schedule_of_classes.dart). Search Detail implemented in search_detail.dart.
search_detail.dart
Unpacks CourseData model and displays different section options. UI heavy file.
providers/schedule_of_classes.dart
Change notifier holding references to the corresponding service and model.
models/schedule_of_classes.dart
Contains different models to parse data from live API: ScheduleOfClasses. Models include: CourseData: Top layer containing list of sections available for a course, Section Data: Second Layer holding information about professor, room, etc and MeetingData: Times for labs, discussions, lectures, etc.
services/schedule_of_classes.dart
Handles calls to academic term lambda: https://o17lydfach.execute-api.us-west-2.amazonaws.com/qa-peter/v1/term/current and schedule of classes api.
Changelog
[General] [Add] - Created new services and providers to implement some webreg functionality.
Test Plan
Notes:
Calendar will still scroll incorrectly as described in #26 . Fixed could not be applied due to change in widget structure.
Relevant files listed above. Other changed files are result of changed styling or previous developers.
Client_ID in authentication_sso.dart is missing to avoid exposing key.