Skip to content

Extract session JavaScript package#8092

Merged
aduth merged 6 commits intomainfrom
aduth-session-timeout-package
Mar 30, 2023
Merged

Extract session JavaScript package#8092
aduth merged 6 commits intomainfrom
aduth-session-timeout-package

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Mar 29, 2023

🛠 Summary of changes

This pull request extracts logic reused between session-timeout-ping.ts and document-capture.ts packs related to session behavior to a new JavaScript package, @18f/identity-session.

Rationale:

  1. Shared logic for common session API interaction
  2. Better testability
  3. Support upcoming work for session modal custom element as part of this package
  4. Reduce scope of session-timeout-ping pack toward eventual removal
  5. Improves refactorability of API endpoint by consolidating, supporting Avoid database query associated with active session polling #7966

📜 Testing Plan

  • yarn mocha app/javascript/packages/session-timeout/index.spec.ts
  • Ensure that session timeout modal appears as expected
  • Ensure that clicking "Keep me signed in" extends session as expected
  • Ensure that document capture step progression (i.e. IPP) extends session timeout

aduth added 3 commits March 29, 2023 09:32
Why:

1. Shared logic for common session API interaction
2. Better testability
3. Support upcoming work for session modal custom element as part of this package
4. Reduce scope of session-timeout-ping pack toward eventual removal

changelog: Internal, Session Timeout, Refactor session timeout request behaviors
Shorter, more accommodating to additional features, reflects the existing description "utilities for managing a user's session"
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@aduth aduth merged commit b0c8d65 into main Mar 30, 2023
@aduth aduth deleted the aduth-session-timeout-package branch March 30, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants