Skip to content
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

web: Indicate when caps-lock is active during password input. #12733

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GirlBossRush
Copy link
Contributor

@GirlBossRush GirlBossRush commented Jan 18, 2025

Details

Hey team! 👋

I had fun implementing the caps-lock detection feature! Since we rely on keystroke events to determine the caps-lock state, the warning stays hidden until we get that first user input.

This is my first time contributing to the lit-html parts of our codebase, and I'm excited to get your thoughts. I was able to bring the InputPassword component up to speed with some of authentik's more recent component design patterns, such as leaning on the Lit's ref directive to manage event listeners.

I'd love feedback on my approach to both the LitHTML patterns and authentik's existing conventions.

Looking forward to your review!

Screenshot 2025-01-18 at 02 43 03

Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@GirlBossRush GirlBossRush requested a review from a team as a code owner January 18, 2025 08:21
Copy link

netlify bot commented Jan 18, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit be69786
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67aead8a0e02860008f24170

Copy link

netlify bot commented Jan 18, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit be69786
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67aead8a297af40008f555c3
😎 Deploy Preview https://deploy-preview-12733--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@GirlBossRush GirlBossRush force-pushed the 51-caps-lock-indicator branch from 2588d77 to 3d7a451 Compare January 18, 2025 08:36
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.76%. Comparing base (5904fae) to head (be69786).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12733      +/-   ##
==========================================
+ Coverage   92.68%   92.76%   +0.08%     
==========================================
  Files         785      785              
  Lines       39623    39623              
==========================================
+ Hits        36724    36757      +33     
+ Misses       2899     2866      -33     
Flag Coverage Δ
e2e 48.49% <ø> (+0.71%) ⬆️
integration 24.54% <ø> (-0.01%) ⬇️
unit 90.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

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

I think the show caps lock is a bit over-engineered; I gave a more lit-like suggestion.

web/src/flow/components/ak-flow-password-input.ts Outdated Show resolved Hide resolved
web/src/flow/components/ak-flow-password-input.ts Outdated Show resolved Hide resolved
@GirlBossRush GirlBossRush force-pushed the 51-caps-lock-indicator branch from 3d7a451 to 753827f Compare January 25, 2025 09:49
@GirlBossRush GirlBossRush force-pushed the 51-caps-lock-indicator branch 2 times, most recently from 4c6f199 to ae9b6ca Compare January 27, 2025 22:28
Determining the state of the caps-lock key can be tricky as we're
dependant on a user-provided input to set a value. Thus, our initial
state defaults to not display any warning until the first keystroke.

- Revise to better use lit-html.
@GirlBossRush GirlBossRush force-pushed the 51-caps-lock-indicator branch from ae9b6ca to be69786 Compare February 14, 2025 02:42
@GirlBossRush GirlBossRush self-assigned this Feb 14, 2025
@GirlBossRush GirlBossRush enabled auto-merge (squash) February 14, 2025 02:42
@GirlBossRush GirlBossRush added javascript Pull requests that update Javascript code enhancement/confirmed Enhancements that will be implemented in the future labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement/confirmed Enhancements that will be implemented in the future javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants