Skip to content

Conversation

@srajupusapati
Copy link
Contributor

@srajupusapati srajupusapati commented Nov 25, 2025

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

srajupusapati and others added 4 commits October 28, 2025 16:48
* 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>
Copilot AI review requested due to automatic review settings November 25, 2025 09:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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) {
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Missing space after 'if' keyword. Kotlin style guide recommends a space between control flow keywords and opening parentheses.

Suggested change
if(::file.isInitialized) {
if (::file.isInitialized) {

Copilot uses AI. Check for mistakes.
return ModuleUtility.getFragment(moduleItem, course, moduleObject, false, isOnline, tabs, files, context)
}
}
///*
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@@ -1,7 +1,5 @@
/* Top-level project modules */
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[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.

Suggested change
/* 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.

Copilot uses AI. Check for mistakes.
try {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
Toast.makeText(context, "No PDF viewer found", Toast.LENGTH_SHORT).show()
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not an addition copied from existing code, will update it to string in next build

Copy link
Contributor Author

Choose a reason for hiding this comment

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

already change is part of #28

courseId,
childFragmentManager,
studentAnnotationView = true,
courseId
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To get PDF Name

get() = binding.loadingContainer
override val progressBar: ProgressiveCanvasLoadingView
get() = binding.progressBar
private var initJob: Job? = null
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not an addition was there in existing code above

Copy link

@sghosh-sonata-rgb sghosh-sonata-rgb left a comment

Choose a reason for hiding this comment

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

Reviewed and approved.

@sghosh-sonata-rgb sghosh-sonata-rgb merged commit b8a1309 into master Nov 26, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants