Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Converts AutofillAddressPanel into redux component #9490

Merged
merged 1 commit into from
Jun 20, 2017

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jun 15, 2017

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Resolves #9444

Auditors: @bsclifton @bridiver @darkdh

Test Plan:

  • try to add autofill address
  • try to delete it
  • try to edit it

Test Plan (l10n):

  1. Install Google IME (CJK);
  2. Enable it (Hiragana ひらがな mode)
  3. Open about:autofill
  4. Input brave
  5. It should display the conversion candidate like this:

screenshot 2017-06-20 0 51 32

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@NejcZdovc NejcZdovc added this to the 0.19.x (Nightly Channel) milestone Jun 15, 2017
@NejcZdovc NejcZdovc self-assigned this Jun 15, 2017
@NejcZdovc NejcZdovc mentioned this pull request Jun 15, 2017
51 tasks
onSave () {
appActions.addAutofillAddress(this.props.currentDetail, this.props.originalDetail)
Copy link
Member

Choose a reason for hiding this comment

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

why removing this.props.currentDetail? This will cause save not working

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because this is this WIP and I need to check some things before finishing this PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the current status of 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.

this is done, but we need to find a way to fix IME problem

const originalDetail = currentWindow.getIn(['autofillAddressDetail', 'originalDetail'], Immutable.Map())

const props = {}
// Used in renderer
Copy link
Member

Choose a reason for hiding this comment

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

you will also need to set

props.currentDetail = currentDetail
props.originalDetail = originalDetail

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't want to do that, let's discuss it more on the call

Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

This change will introduce the problem of #9017

app/autofill.js Outdated
@@ -15,16 +15,16 @@ module.exports.init = () => {

module.exports.addAutofillAddress = (detail, guid) => {
Copy link
Member

Choose a reason for hiding this comment

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

guid arg here can be removed now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

.waitUntil(function () {
return this.getAppState().then((val) => {
console.log(val.value.autofill.addresse)
Copy link
Member

Choose a reason for hiding this comment

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

forgot to remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@NejcZdovc
Copy link
Contributor Author

This change will introduce the problem of #9017

Not sure what you meant by that

@NejcZdovc NejcZdovc requested a review from darkdh June 16, 2017 17:38
@darkdh
Copy link
Member

darkdh commented Jun 16, 2017

just like this
https://cloud.githubusercontent.com/assets/3362943/26372992/d32887a0-403a-11e7-82fd-7568ecc15575.gif
The Chinese IME I use will have composition state same as Japanese.
And this will cause I couldn't select the word I need
it should let user to select word like this
https://cloud.githubusercontent.com/assets/3362943/26373228/a9d63644-403b-11e7-9285-74753cc846cf.gif

@NejcZdovc
Copy link
Contributor Author

@darkdh if I understand correctly this PR will cause a regression for thing that was fixed in #9017, because I removed this part 4102e95#diff-590c7f19ab835ddb769d5c3e5b227ab5R51 ?

@darkdh
Copy link
Member

darkdh commented Jun 16, 2017

yeah, but in this PR. Adding it back doesn't solve the issue because lots of things also changed

@NejcZdovc
Copy link
Contributor Author

Yeah we can't just add that part back, because we are connected to the store now and it will not work, so we need to find another approach of how to fix this.

@NejcZdovc
Copy link
Contributor Author

Will try to find a way how to fix it, added back label WIP

@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Jun 19, 2017

@darkdh can you please provide STR how to trigger this problem, because I tried it on my machine and I can't reproduce it, autofill dialog is not auto-dismissing

@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Jun 19, 2017

@luixxiul I saw that you tested out #9017, can you please checkout out this PR and see if you can reproduce this problem or not. I couldn't, but I am not sure that I did correct STR. Thank you

@darkdh
Copy link
Member

darkdh commented Jun 19, 2017

@NejcZdovc you need an input method which requires selecting character for a certain symbol combination like Chinese or Japanese.
So the problem is it won't allow us to select the character. If we are in selecting stage, there will be underline on that character(s)

@darkdh
Copy link
Member

darkdh commented Jun 19, 2017

I use Zhuyin on Mac. and you can have測試 by input hk4g4 and you can see underline on these two characters and you should be able to change character by arrow left/right to select character you want to change and arrow down is to change the character

@luixxiul
Copy link
Contributor

luixxiul commented Jun 19, 2017

Yes the issue gets back.

bbb

Also I added another test plan (l10n) to the first post.

ref #9045

@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Jun 20, 2017

@luixxiul @darkdh thank you so much for STR. I finally managed to reproduce it. I also pushed the fix for it, so can you please try it again?

Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

++

ref={(nameOnAddress) => { this.nameOnAddress = nameOnAddress }} />
spellCheck='false'
ref={(ref) => { this.nameOnAddress = ref }}
defaultValue={this.props.name}
Copy link
Member

Choose a reason for hiding this comment

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

neat pick. The order is different than others

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

@NejcZdovc NejcZdovc merged commit 759e164 into brave:master Jun 20, 2017
@luixxiul
Copy link
Contributor

One slight issue on deleting the candidate.

STR:

  1. Enable the Japanese IME
  2. Input brave
  3. Make sure you get bらう゛ぇ
  4. Hit backspace 3 times
  5. Make sure you only have
  6. Hit that one more time to delete

Actual result: just conversion candidate pulldown disappears and is still there

Expected result: should be removed

@NejcZdovc would you mind solving this issue as it is a regression? thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants