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

fix: disable autofill for time selection field #6279

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Sachin-chaurasiya
Copy link

@Sachin-chaurasiya Sachin-chaurasiya commented Oct 26, 2024

Summary

This PR adds autoComplete="off" to the time selection input in CustomTimePicker.tsx to prevent password managers from auto-filling values.

Also, added a unit test to ensure that the input element is rendered with the correct attribute.

Related Issues / PR's

Fixes #5875

Screenshots

image

Affected Areas and Manually Tested Areas


Important

Adds autoComplete="off" to CustomTimePicker input to prevent autofill and includes a test for this change.

  • Behavior:
    • Adds autoComplete="off" to the time selection input in CustomTimePicker.tsx to prevent autofill by password managers.
  • Testing:
    • Adds a unit test in CustomTimePicker.test.tsx to verify the autocomplete="off" attribute is present on the input element.

This description was created by Ellipsis for 4f93eb4. It will automatically update as commits are pushed.

Copy link

welcome bot commented Oct 26, 2024

Welcome to the SigNoz community! Thank you for your first pull request and making this project better. 🤗

@CLAassistant
Copy link

CLAassistant commented Oct 26, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 4f93eb4 in 9 seconds

More details
  • Looked at 69 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. frontend/src/components/CustomTimePicker/CustomTimePicker.test.tsx:49
  • Draft comment:
    Consider adding a test case to verify that the 'autocomplete' attribute is not set to 'off' when it should not be. This will help ensure that the attribute is not accidentally removed in the future.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The test file is missing a test for the case when the input does not have the 'autocomplete' attribute set to 'off'. This would ensure that the attribute is not accidentally removed in the future.

Workflow ID: wflow_A4eiJ9fD7ybgL1Ai


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@Sachin-chaurasiya
Copy link
Author

Hello @YounixM , Could you please review the PR? thanks

@vikrantgupta25
Copy link
Collaborator

Hi @Sachin-chaurasiya can you please add some before screenshot as well ? where the password manager was filling some value ?

@Sachin-chaurasiya
Copy link
Author

Hi @Sachin-chaurasiya can you please add some before screenshot as well ? where the password manager was filling some value ?

Hey @vikrantgupta25, I have a password manager active; however, I'm unable to replicate the scenario where the password manager was filling in some value.

Screen.Recording.2024-11-05.at.12.52.12.PM.mov

@ChrisLightfootWild
Copy link

ChrisLightfootWild commented Nov 13, 2024

👋

I've encountered this myself locally (currently on version v0.54.0).

image

From a quick check, it only appeared to affect the time selector on the following pages:

  • /logs/logs-explorer
  • /traces-explorer

@makeavish
Copy link
Member

This PR doesn't fix the issue. 1Password is still offering to autofill.
Tested on local

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.

Disable autofill for time selection field
5 participants