Skip to content

Conversation

parthshindee
Copy link
Contributor

@parthshindee parthshindee commented Aug 15, 2024

Summary

Campus Mobile codebase contains a large number of unnecessary nullable variables and null checks. This issue removes a majority of the redundant nulls.

Resolves #1955

Changelog

[General] [Change] - Removed redundant nulls throughout the app

Test Plan

morebytes and others added 19 commits July 19, 2024 16:09
- Rewrote some logic to mitigate need for nullable variables (i.e., empty strings instead of nullables)
- app_provider
- ImageLoader
- Image
- NoticesModel, NoticesCard
- BuildInfo
- ContinueReadingButton
- LinkifyWithCatch
- CardContainer (partially)
- WebViewContainer (partially)
- DotsIndicator
- EventTime
- LastUpdatedWidget
- TimeRangeWidget
- DiningCard (partially), DiningDataProvider (partially), Item model, DiningMenuItem
- EmployeeIdDataProvider (partially)
- EventsDataProvider, EventsModel
- ScannerMessageDataProvider
- SpeedTestProvider (partially)
- Shuttle (partially)
- MessagesDataProvider, MessageService
- ParkingModel, all Parking cards
- CardsProvider
- Home card
- News
- EventsModel
- NoticesDataProvider
- UserDataProvider, UserProfileService
- Notifications models, Notifications cards, Notifications providers
- WebView
- PushNotifications (wrapper)
- EmployeeIdDataProvider
- MapSearchModel, MapSearchService, MapsDataProvider, Maps cards
@parthshindee parthshindee requested a review from c3bryant August 15, 2024 18:22
@parthshindee parthshindee linked an issue Aug 15, 2024 that may be closed by this pull request
6 tasks
@morebytes morebytes requested review from morebytes and removed request for c3bryant September 25, 2024 21:55
…ls_removal

# Conflicts:
#	ios/Podfile.lock
#	lib/core/models/availability.dart
#	lib/core/providers/availability.dart
#	lib/core/providers/cards.dart
#	lib/core/providers/messages.dart
#	lib/core/providers/user.dart
#	lib/core/services/dining.dart
#	lib/core/services/map.dart
#	lib/core/services/triton_media.dart
#	lib/core/services/weather.dart
#	lib/ui/availability/availability_display.dart
#	lib/ui/availability/manage_availability_view.dart
#	lib/ui/common/webview_container.dart
#	lib/ui/notifications/notifications_list_view.dart
#	lib/ui/profile/login.dart
Cleaned up some merge mistakes
…w? The way Coordinates is set up in the app, the entire system needs to be redesigned at some point to prevent future bugs like this
@morebytes
Copy link
Contributor

Talked w/ Charles. Decided to pause this until the Dart 3 migration gets merged in

@morebytes
Copy link
Contributor

Spoke with Alex. Most likely this will be paused until after the next release of Campus Mobile

…ls_removal

# Conflicts:
#	lib/app_networking.dart
#	lib/core/models/triton_media.dart
#	lib/core/providers/cards.dart
#	lib/core/providers/events.dart
#	lib/core/providers/map.dart
#	lib/core/providers/messages.dart
#	lib/core/providers/news.dart
#	lib/core/providers/notices.dart
#	lib/core/providers/notifications_freefood.dart
#	lib/core/providers/scanner.dart
#	lib/core/providers/scanner_message.dart
#	lib/core/providers/speed_test.dart
#	lib/core/providers/triton_media.dart
#	lib/core/providers/user.dart
#	lib/core/services/availability.dart
#	lib/core/services/cards.dart
#	lib/core/services/dining.dart
#	lib/core/services/map.dart
#	lib/core/services/messages.dart
#	lib/core/services/notices.dart
#	lib/core/services/triton_media.dart
#	lib/core/services/user.dart
#	lib/core/services/weather.dart
#	lib/ui/common/build_info.dart
#	lib/ui/my_chart/my_chart_card.dart
#	lib/ui/notifications/notifications_list_view.dart
#	lib/ui/parking/circular_parking_indicator.dart
#	lib/ui/parking/spot_types_view.dart
#	lib/ui/profile/cards.dart
#	lib/ui/triton_media/triton_media_card.dart
#	lib/ui/triton_media/triton_media_detail_view.dart
#	lib/ui/triton_media/triton_media_list.dart
#	lib/ui/triton_media/triton_media_tile.dart
#	lib/ui/triton_media/triton_media_view_all.dart
@morebytes
Copy link
Contributor

Finished manual merge w/ experimental. After thoroughly resolving build tools issues, there does not appear to be any regressions. Still should be monitored...

…ls_removal

# Conflicts:
#	lib/app_networking.dart
#	lib/app_provider.dart
#	lib/ui/onboarding/onboarding_screen.dart
@morebytes morebytes added the Bug Something isn't working label Nov 23, 2024
@morebytes morebytes removed the Bug Something isn't working label Nov 23, 2024
morebytes
morebytes previously approved these changes Nov 23, 2024
Copy link
Contributor

@morebytes morebytes left a comment

Choose a reason for hiding this comment

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

Looks good and was tested. Any issues that arise going forward will be treated as separate bug tasks

…ls_removal

# Conflicts:
#	lib/core/providers/cards.dart
#	lib/ui/common/card_container.dart
#	lib/ui/home/home.dart
#	lib/ui/profile/cards.dart
Copy link
Contributor

@morebytes morebytes left a comment

Choose a reason for hiding this comment

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

Tests passed. Latest commit was a merge w/ experimental - low chance for any regressions. Looks good

@morebytes morebytes merged commit 7676a1d into UCSD:experimental Nov 26, 2024
2 checks passed
messages.forEach((m) async {
if (m!.audience != null &&
m.audience!.topics != null &&
(m.audience!.topics!.contains("freeFood") || m.audience!.topics!.contains("testFreeFood"))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@morebytes May we plan to revert or discuss for 7.31? The testFreeFood condition is is required to fully test Free Food notifications.

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

Successfully merging this pull request may close these issues.

Remove redundant nulls
3 participants