Skip to content

Refactor : Batch issuance rework #407

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

Conversation

gstamatop
Copy link
Contributor

Refactor : Batch issuance rework

  • Removed from the Settings Screen the toggle for showing/hiding the batch issuance counter. Now it will always be visible, both in the Documents Tab and in the Document Details Screen.
  • Add Document Screen now has a data class where is config is parameterized, instead of a simple enum.
  • If Add Document Screen gets loaded with IssuanceFlowType.ExtraDocument and its FormatType is not null and matches some of the Issuer's supported documents, then only those documents will be displayed on its list. Existing functionality to also filter and show only the PIDs if the screen was loaded with IssuanceFlowType.NoDocument remains unchanged.
  • In the Documents Tab, if a document is running out of credentials (<=1 and its policy is OneTimeUse) then a warning icon will be displayed.
  • For the same scenario, in the Document Details Screen, the Credential Info section will be expanded by default (otherwise it will be collapsed) and it will also show a "Issue new" button(otherwise it will not be shown at all). Upon clicking it the User will be navigated to the Add Documents Screen with only this document displayed in its list.
  • getShowBatchIssuanceCounter() and setShowBatchIssuanceCounter() have been removed from the PrefKeys. All related strings, usages and dependencies have also been removed.
  • Navigation to the Add Document Screen has been updated and adjusted across the whole project.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other fix (maintenance or house-keeping)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test suite run successfully
  • Added Tests ()

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the readme
  • My changes generate no new warnings
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked that my views are accessible
  • I have checked that my strings are localized where applicable

- Removed from the Settings Screen the toggle for showing/hiding the batch issuance counter. Now it will always be visible, both in the Documents Tab and in the Document Details Screen.
- Add Document Screen now has a data class where is config is parameterized, instead of a simple enum.
- If Add Document Screen gets loaded with IssuanceFlowType.ExtraDocument and its FormatType is not null and matches some of the Issuer's supported documents, then only those documents will be displayed on its list. Existing functionality to also filter and show only the PIDs if the screen was loaded with  IssuanceFlowType.NoDocument remains unchanged.
- In the Documents Tab, if a document is running out of credentials (<=1 and its policy is OneTimeUse) then a warning icon will be displayed.
- For the same scenario, in the Document Details Screen, the Credential Info section will be expanded by default (otherwise it will be collapsed) and it will also show a "Issue new" button(otherwise it will not be shown at all). Upon clicking it the User will be navigated to the Add Documents Screen with only this document displayed in its list.
- getShowBatchIssuanceCounter() and setShowBatchIssuanceCounter() have been removed from the PrefKeys. All related strings, usages and dependencies have also been removed.
- Navigation to the Add Document Screen has been updated and adjusted across the whole project.

- Added new unit tests in the TestAddDocumentInteractor.kt to test these new changes.
- Updated existing tests.
The `popUpToScreenRoute` and `inclusive` parameters in `Effect.Navigation.SwitchScreen` are now nullable. This allows navigation to the "Add Document" screen without popping the back stack.

Specifically:
- `popUpToScreenRoute` is now set to `null` when navigating to add a document.
- `inclusive` is also set to `null` in this scenario.
- The `DocumentDetailsScreen` now handles nullable `popUpToScreenRoute` and `inclusive` values in navigation effects.
The QR scan screen for an extra document issuance flow now navigates back (simple Pop) to the previous screen instead of popping to the Dashboard.
The footer in the AddDocumentScreen, which contains the 'Scan QR code' button and allows for scanning a Credential Offer, should be shown if no options(Documents that can be issued) are fetched from the Issuer's metadata (already existing logic that also shows it if the Issuance flow type is NoDocument remains unchanged.
@stzouvaras stzouvaras merged commit f4fac4c into eu-digital-identity-wallet:main Jul 30, 2025
2 checks passed
@stzouvaras stzouvaras deleted the refactor/batch_issuance_rework branch July 30, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants