-
Notifications
You must be signed in to change notification settings - Fork 112
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
Reimplement timeout countdown as custom element #6023
Commits on Mar 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 177b48d - Browse repository at this point
Copy the full SHA 177b48dView commit details -
Reimplement timeout countdown as custom element
**Why**: - Reduce size and scope of hot-path application pack - Avoid relying on window globals (LoginGov.countdownTimer), since they rely on fragile dependency order - Improve testability of element behavior in isolation - Allow reuse for common countdown behavior changelog: Internal, Optimziation, Reduce size of common JavaScript file
Configuration menu - View commit details
-
Copy full SHA for c01cbd5 - Browse repository at this point
Copy the full SHA c01cbd5View commit details -
Initialize modal presenter with view_context
Avoid passing from view See: #6023 (comment)
Configuration menu - View commit details
-
Copy full SHA for d25a961 - Browse repository at this point
Copy the full SHA d25a961View commit details -
Move countdown tag contructor to call
- Simplify tests to avoid accounting for newline - Because it's single, simple tag See: #6023 (comment)
Configuration menu - View commit details
-
Copy full SHA for cef5cec - Browse repository at this point
Copy the full SHA cef5cecView commit details -
Render component using view_context.render
**Why**: Avoid errors in runtime
Configuration menu - View commit details
-
Copy full SHA for 237fcc4 - Browse repository at this point
Copy the full SHA 237fcc4View commit details -
Convert dataset to getAttribute
Seemingly more compatible with element lifecycle, where dataset can be undefined prior to element being connected. For example, when `define`-ing the custom element, the attributeChangedCallback is triggered, but the element isn't yet mounted.
Configuration menu - View commit details
-
Copy full SHA for 94282af - Browse repository at this point
Copy the full SHA 94282afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fc904e - Browse repository at this point
Copy the full SHA 2fc904eView commit details -
Use static variable syntax vs. getter
Example snippets often use getter syntax, since it's better supported in older browsers. But since we transpile, and since reasonably new browsers support static variables, we can update to simplify. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static
Configuration menu - View commit details
-
Copy full SHA for 8492b80 - Browse repository at this point
Copy the full SHA 8492b80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4258680 - Browse repository at this point
Copy the full SHA 4258680View commit details -
Update countdown text via Text#nodeValue
**Why**: To restore previous behavior of screen reader atomic announcement including time remaining.
Configuration menu - View commit details
-
Copy full SHA for 0c4c4e9 - Browse repository at this point
Copy the full SHA 0c4c4e9View commit details