Skip to content

fix(portal-framework-ui-core): only allow space and enter to toggle the password visibility#491

Merged
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-framework-ui-core
Sep 1, 2025
Merged

fix(portal-framework-ui-core): only allow space and enter to toggle the password visibility#491
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-framework-ui-core

Conversation

@pcfreak30
Copy link
Copy Markdown
Member

@pcfreak30 pcfreak30 commented Sep 1, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Password visibility toggle now responds to keyboard (Space/Enter) for improved accessibility and to prevent accidental toggles via mouse clicks.
  • Style

    • Polished input field styling for consistency across states.
    • Minor visual alignment tweaks to the password visibility control.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Sep 1, 2025

⚠️ No Changeset found

Latest commit: 9d5d048

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Sep 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds keyboard-gated password visibility toggling to the Input component (Space/Enter only) and reorders CSS class names for the input and toggle button. No public API changes.

Changes

Cohort / File(s) Summary
Input component interaction and styling
libs/portal-framework-ui-core/src/components/ui/input.tsx
Updated toggleShowPassword to accept an event and act only on Space/Enter keypress; disabled click-based toggle. Reordered Tailwind class lists for input and password toggle button. No exported interfaces or component signatures changed.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Input as Input Component
  participant Handler as toggleShowPassword
  participant State as Password Visibility State
  participant DOM as Input Field

  User->>Input: Keydown on toggle (Space/Enter)
  Input->>Handler: toggleShowPassword(e)
  alt Key is Space or Enter
    Handler->>State: Toggle visibility
    State-->>DOM: Update type (password/text)
    DOM-->>User: Field reflects new visibility
  else Other keys or click
    Handler-->>Input: Return without change
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A bunny taps the Space with care,
Peek-a-boo, the dots lay bare.
Enter nudges truth to light,
Clicks now rest—no toggle flight.
CSS hops in tidy rows,
A subtle shift the carrot knows.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6d58061 and 9d5d048.

📒 Files selected for processing (1)
  • libs/portal-framework-ui-core/src/components/ui/input.tsx (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch libs/portal-framework-ui-core

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@pcfreak30 pcfreak30 merged commit 7eab004 into develop Sep 1, 2025
0 of 2 checks passed
@pcfreak30 pcfreak30 deleted the libs/portal-framework-ui-core branch January 4, 2026 03:20
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.

1 participant