-
Notifications
You must be signed in to change notification settings - Fork 2
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
Session extension modal properly appears after 5 seconds (for develop… #469
base: main
Are you sure you want to change the base?
Conversation
…ment purposes), need to work on extending the actual session
const trigger = document.createElement('a') | ||
trigger.id = 'session-timeout-trigger' | ||
trigger.href = '#cbv-session-timeout-content' | ||
trigger.className = 'usa-button' | ||
trigger.setAttribute('aria-controls', 'cbv-session-timeout-content') | ||
trigger.dataset.openModal = true // Set to true instead of empty string | ||
trigger.textContent = 'Open Session Timeout Modal' | ||
|
||
// Add to DOM in a visible location | ||
const container = document.createElement('div') | ||
container.style.position = 'fixed' | ||
container.style.top = '20px' | ||
container.style.right = '20px' | ||
container.style.zIndex = '9999' | ||
container.appendChild(trigger) | ||
document.body.appendChild(container) | ||
console.log('Created modal trigger:', trigger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to put these in the layout template instead of creating/tearing down each time. There are turbo features for selecting stuff like this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For sure! This is preliminary stuff used for development, but if we opt to use a hidden button then I'll be sure to move it to the template.
app/app/javascript/controllers/cbv/sessions/timeout_controller.js
Outdated
Show resolved
Hide resolved
…r activity and extend or cancel the session
…the session now, might have to implement a controller for that?
Ticket
Resolves FFS-2377.
Changes
Context for reviewers
Acceptance testing
:alert: Deploy block! @ffs-eng I just merged PR [#123] and will be doing acceptance testing in demo - please don't deploy until I'm finished!
)