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 auto-filling of country name in tax popup #5286

Merged
merged 7 commits into from
Oct 12, 2020

Conversation

ShreyanshSrivastava
Copy link
Contributor

Fixes #4504

Short description of what this resolves:

The proposed changes disabled the auto-filling of information other than country name during the Tax Pop-up in wizard step-1.

Changes proposed in this pull request:

  • Added @autocomplete="some-random-string" in all the input fields separately.

Old View

OldView

New View

newView

@vercel
Copy link

vercel bot commented Oct 10, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/9lsrsa4q2
✅ Preview: https://open-event-frontend-git-development.eventyay.vercel.app

@codecov
Copy link

codecov bot commented Oct 10, 2020

Codecov Report

Merging #5286 into development will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #5286      +/-   ##
===============================================
- Coverage        22.90%   22.80%   -0.10%     
===============================================
  Files              491      491              
  Lines             5230     5239       +9     
  Branches            36       37       +1     
===============================================
- Hits              1198     1195       -3     
- Misses            4027     4039      +12     
  Partials             5        5              
Impacted Files Coverage Δ
app/components/tabbed-navigation.js 33.33% <0.00%> (-20.00%) ⬇️
app/models/event.js 57.14% <0.00%> (-4.40%) ⬇️
app/components/events/view/publish-bar.ts 15.62% <0.00%> (-1.62%) ⬇️
app/mixins/event-wizard.js 0.89% <0.00%> (-0.05%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d39d293...c39577c. Read the comment docs.

mariobehling
mariobehling previously approved these changes Oct 11, 2020
Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Thank you, it is solving the problem for me.

maze-runnar
maze-runnar previously approved these changes Oct 11, 2020
@iamareebjamal iamareebjamal changed the title Disabled auto-filling of information other than country name during Tax Pop-up in wizard step-1 fix: Disable auto-filling of information other than country name in tax popup Oct 11, 2020
@auto-label auto-label bot added the fix label Oct 11, 2020
@@ -6,7 +6,7 @@
<div class="field">
<label class="required">{{t 'Choose country'}}</label>
<UiDropdown @class="search selection" @selected={{this.tax.country}} @forceSelection={{false}} @fullTextSearch={{true}}>
<Input @type="hidden" @autocomplete="no" @id="tax_country" @value={{this.tax.country}} />
<Input @type="hidden" @autocomplete="some-random-string" @id="tax_country" @value={{this.tax.country}} />
Copy link
Member

@iamareebjamal iamareebjamal Oct 11, 2020

Choose a reason for hiding this comment

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

Instead of some-random-string, try country

If it does not work, then something else which doesn't look like a placeholder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is also working by doing @autocomplete = "tax-country" instead of using "some-random-string". Should I do that in all others also?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done sir, please check now.

@@ -21,20 +21,20 @@
</div>
<div class="field">
<label class="required">{{t 'Tax name'}}</label>
<Input @type="text" @id="tax_name" @value={{this.tax.name}} />
<Input @type="text" @autocomplete="tax-name" @id="tax_name" @value={{this.tax.name}} />
Copy link
Member

Choose a reason for hiding this comment

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

Unneeded. Just do this in country field

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iamareebjamal Please check now

@@ -21,20 +21,20 @@
</div>
<div class="field">
<label class="required">{{t 'Tax name'}}</label>
<Input @type="text" @id="tax_name" @value={{this.tax.name}} />
<Input @type="text" @autocomplete="some-random-string" @id="tax_name" @value={{this.tax.name}} />
Copy link
Member

Choose a reason for hiding this comment

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

Remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iamareebjamal should I remove the whole autocomplete attribute from here only?

Copy link
Member

Choose a reason for hiding this comment

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

The issue is about country field, so why add this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iamareebjamal Sir I have to add this autocomplete to every input field, to prevent it from getting auto-filled, and if I am removing it from there then auto-filling is not disabled for those fields
confirm
i.e. all information will get auto-filled like it is behaving now in eventyay.com

Copy link
Member

Choose a reason for hiding this comment

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

As I understand, the issue is about country autofill disabling, not all fields

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually sir I think should be the other way round as stated by @mariobehling, because we want that a person adding his or her tax info should not have the option to autofill all the fields based on the browsers form's memory that's why we want to disable it and only allow the autofilling of country name, and not other sensitive information that is user-specific.

Copy link
Member

@iamareebjamal iamareebjamal Oct 11, 2020

Choose a reason for hiding this comment

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

@mariobehling There is still confusion. Do we want to?

  • 1. Disable all browser autocomplete including name, address,country, etc
  • 2. Disable browser autocomplete for country and allow browser autocomplete for other form fields
  • 3. Disable browser autocomplete for all fields and allow browser autocomplete for country field

Our suggestion autocomplete will be shown in all 3 cases. If we want 2., then we don't require to change a lot of things as they are in the PR, just one field.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for clarifying. We need:

  • Disable browser autocomplete for country and allow browser autocomplete for other form fields

Copy link
Member

Choose a reason for hiding this comment

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

@ShreyanshSrivastava Please remove the autocomplete tag from other fields

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -21,20 +21,20 @@
</div>
<div class="field">
<label class="required">{{t 'Tax name'}}</label>
<Input @type="text" @id="tax_name" @value={{this.tax.name}} />
<Input @type="text" @id="tax_name" @value={{this.tax.name}} />
Copy link
Member

Choose a reason for hiding this comment

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

Extra space. Ensure that no changes other than in country field are present in the files changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iamareebjamal Sorry sir didn't notice that. Removed the extra spaces

@iamareebjamal iamareebjamal changed the title fix: Disable auto-filling of information other than country name in tax popup fix: Disable auto-filling of country name in tax popup Oct 12, 2020
@iamareebjamal iamareebjamal merged commit 6a3c1f2 into fossasia:development Oct 12, 2020
divyanshrastogi51 added a commit to divyanshrastogi51/open-event-frontend that referenced this pull request Oct 12, 2020
fix: Disable auto-filling of country name in tax popup (fossasia#5286)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tax Information Country Field offers Autofill of other information
4 participants