Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisPhilippeHeon committed Jul 11, 2024
1 parent eeb230a commit 4d37828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/features/dashboard/dashboard_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ class _DashboardViewState extends State<DashboardView>
Skeletonizer(
enabled: model.busy(model.progress),
ignoreContainers: true,
effect: const ShimmerEffect(),
child: Stack(children: [
Container(
padding: const EdgeInsets.fromLTRB(17, 10, 15, 20),
Expand Down Expand Up @@ -320,6 +319,8 @@ class _DashboardViewState extends State<DashboardView>

late List<CourseActivity>? courseActivities;
if (isLoading) {
// User will not see this.
// It serves the purpuse of creating text in the skeleton and make it look closer to the real schedule.
courseActivities = [
CourseActivity(
courseGroup: "APP375-99",
Expand Down Expand Up @@ -390,6 +391,8 @@ class _DashboardViewState extends State<DashboardView>
final bool loaded = !model.busy(model.courses);
late List<Course> courses = model.courses;

// When loading courses, there are 2 stages. First, the courses of user are fetched, then, grades are fetched.
// During that first stage, putting empty courses with no title allows for a smoother transition.
if (courses.isEmpty && !loaded) {
final Course skeletonCourse = Course(
acronym: " ",
Expand Down
1 change: 1 addition & 0 deletions lib/features/more/contributors/contributors_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ContributorsView extends StatelessWidget {
future: model.contributors,
builder: (context, snapshot) {
if (!snapshot.hasData) {
// Populate the skeleton
final fakeContributors =
List.filled(30, Contributor(login: "Username"));
return Skeletonizer(
Expand Down

0 comments on commit 4d37828

Please sign in to comment.