Conversation
* Removed PDFKit implementation to open submitted pdfs * Removed PDF Activity class * updated * Updated PDF Submission * Update mobile-offline-downloader-android * minor update * Update strings.xml * removed pdfkit references from student module * Update libs/annotations/src/main/java/com/instructure/annotations/PDFUtils.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/student/src/main/res/values/styles.xml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/submissionDetails/content/PdfStudentSubmissionView.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update libs/annotations/src/main/java/com/instructure/annotations/PDFUtils.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * updated pdf download calls * updated PDFUtils * Code cleanup * Update PdfSubmissionView.kt * Update libs/annotations/src/main/java/com/instructure/annotations/PDFUtils.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/student/src/main/res/values/styles.xml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update libs/annotations/src/main/java/com/instructure/annotations/PDFUtils.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * pdf minor text update * Update PDFUtils.kt * updated version * Update OfflineDependencies.kt --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR releases version 1.9 to the PlayStore, implementing a significant architecture change by removing PSPDFKit dependency and replacing it with a simpler PDF viewing approach that delegates to external apps.
- Removed PSPDFKit library integration and all associated annotation functionality
- Replaced complex PDF annotation system with a download-and-open-externally approach using PDFUtils
- Updated offline downloader submodule version and added new localized strings
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/pandautils/src/main/res/values/strings.xml | Added new PDF-related user message string |
| libs/pandares/src/main/res/values/strings.xml | Added downloading progress indicator string |
| libs/canvas-api-2/src/main/java/com/instructure/canvasapi2/models/DocSession.kt | Added Pdfjs model and reformatted data classes |
| libs/annotations/src/main/java/com/instructure/annotations/PdfSubmissionView.kt | Replaced PSPDFKit-based annotation system with simplified download-and-open approach |
| libs/annotations/src/main/java/com/instructure/annotations/PDFUtils.kt | New utility class for PDF downloading and external app launching |
| apps/teacher/src/main/java/com/instructure/teacher/adapters/SubmissionContentAdapter.kt | Removed annotation update functionality |
| apps/student/src/test/java/com/instructure/student/test/util/ModuleUtilityTest.kt | Commented out entire test file |
| apps/student/src/main/res/values/themes_canvastheme.xml | Removed PSPDFKit theme attributes |
| apps/student/src/main/res/values/styles.xml | Removed PSPDFKit-related styles |
| apps/student/src/main/res/values-v35/themes_canvastheme.xml | Removed PSPDFKit theme attributes |
| apps/student/src/main/res/values-night/styles.xml | Deleted file containing PSPDFKit dark theme styles |
| apps/student/src/main/res/values-ldrtl/styles.xml | Deleted file containing PSPDFKit RTL styles |
| apps/student/src/main/res/layout/view_pdf_student_submission.xml | Replaced complex annotation layout with simple download-and-open UI |
| apps/student/src/main/java/com/instructure/student/util/FileUtils.kt | Removed PSPDFKit configuration and initialization |
| apps/student/src/main/java/com/instructure/student/util/BaseAppManager.kt | Removed PSPDFKit initialization |
| apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/submissionDetails/content/PdfSubmissionViewFragment.kt | Removed fragmentManager parameter from constructor |
| apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/submissionDetails/content/PdfStudentSubmissionView.kt | Simplified to download-and-open implementation, removed annotation system |
| apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/submissionDetails/content/AnnotationSubmissionViewFragment.kt | Removed fragment manager parameters |
| apps/student/src/main/java/com/instructure/student/mobius/assignmentDetails/submission/annnotation/AnnotationSubmissionUploadFragment.kt | Removed fragment manager and submission-related parameters |
| apps/student/src/main/java/com/instructure/student/features/assignments/details/StudentAssignmentDetailsSubmissionHandler.kt | Changed list removal method from removeFirst() to removeAt(0) |
| apps/student/src/main/java/com/instructure/student/activity/CandroidPSPDFActivity.kt | Deleted entire PSPDFKit activity file |
| apps/student/src/main/java/com/instructure/student/AnnotationComments/AnnotationCommentListFragment.kt | Removed EventBus event posting for annotation comments |
| apps/student/src/main/AndroidManifest.xml | Removed CandroidPSPDFActivity declaration |
| apps/student/proguard-rules.txt | Removed PSPDFKit ProGuard rules |
| apps/student/build.gradle | Removed PSPDFKIT_LICENSE_KEY build config field |
| apps/settings.gradle | Commented out teacher and parent modules |
| apps/mobile-offline-downloader-android | Updated submodule commit reference |
| apps/buildSrc/src/main/java/OfflineDependencies.kt | Updated version code to 15 and version name to 1.9 |
| .gitmodules | Added branch specification for submodule |
| .gitignore | Added keystore and google-services.json to ignored files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pdfFragment?.exitCurrentlyActiveMode() | ||
| pdfFragment?.enterAnnotationCreationMode() | ||
| protected fun openPdf() { | ||
| if(::file.isInitialized) { |
There was a problem hiding this comment.
Missing space after 'if' keyword. Kotlin style guide recommends a space between control flow keywords and opening parentheses.
| if(::file.isInitialized) { | |
| if (::file.isInitialized) { |
...nstructure/student/features/assignments/details/StudentAssignmentDetailsSubmissionHandler.kt
Show resolved
Hide resolved
| return ModuleUtility.getFragment(moduleItem, course, moduleObject, false, isOnline, tabs, files, context) | ||
| } | ||
| } | ||
| ///* |
There was a problem hiding this comment.
The entire test file has been commented out rather than deleted or properly updated. Commented-out test code reduces maintainability and may cause confusion. Consider either updating the tests to work with the new implementation or removing the file entirely.
| @@ -1,7 +1,5 @@ | |||
| /* Top-level project modules */ | |||
There was a problem hiding this comment.
[nitpick] The teacher and parent modules have been commented out, which may indicate incomplete work or temporary changes that should not be in a release. If these modules are intentionally excluded from this release, consider documenting why in the PR description.
| /* Top-level project modules */ | |
| /* Top-level project modules */ | |
| // The teacher and parent modules are intentionally excluded from this release. | |
| // If you need to include them, uncomment their respective lines and ensure they are properly configured. |
| try { | ||
| context.startActivity(intent) | ||
| } catch (e: ActivityNotFoundException) { | ||
| Toast.makeText(context, "No PDF viewer found", Toast.LENGTH_SHORT).show() |
There was a problem hiding this comment.
The error message 'No PDF viewer found' is hardcoded and not localized. This should use a string resource for proper internationalization support, especially since other strings in the PR are marked as translatable.
There was a problem hiding this comment.
Not an addition copied from existing code, will update it to string in next build
| courseId, | ||
| childFragmentManager, | ||
| studentAnnotationView = true, | ||
| courseId |
There was a problem hiding this comment.
To get PDF Name
| get() = binding.loadingContainer | ||
| override val progressBar: ProgressiveCanvasLoadingView | ||
| get() = binding.progressBar | ||
| private var initJob: Job? = null |
There was a problem hiding this comment.
not an addition was there in existing code above
Version 1.9 is released to PlayStore
This PR releases version 1.9 to the PlayStore, implementing a significant architecture change by removing PSPDFKit dependency and replacing it with a simpler PDF viewing approach that delegates to external apps.
Removed PSPDFKit library integration and all associated annotation functionality
Replaced complex PDF annotation system with a download-and-open-externally approach using PDFUtils
Updated offline downloader submodule version and added new localized strings