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: Fix and rework "start chat" text field input #10450

Merged
merged 1 commit into from
Apr 27, 2023

Conversation

igor-sirotin
Copy link
Contributor

Fixes #10318

Relates to:

What does the PR do

I've consolidated all the work we've done here and here's the solution.

  1. We agreed with @John-44 to support "editing", not just "pasting"
  2. What's supported:
    • ENS name
    • compressed keys
    • uncompressed key
    • link with one of above
  3. Any leading and ending spaces are trimmed
  4. Pasting processed immediately, editing has a heuristic delay of 500ms
  5. Compressed key length is checked
  6. Compressed key is checked to start with zQ3sh
  7. Fixed asyncRequestContactInfoTask which led to a crush
  8. getContactById checks the decompressed key for validness

Affected areas

"Start chat" screen

Screenshot of functionality (including design for comparison)

Screen.Recording.2023-04-26.at.21.18.22.mov

@status-im-auto
Copy link
Member

status-im-auto commented Apr 26, 2023

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 24d149c #1 2023-04-26 18:29:15 ~5 min tests/imports 📄log
✔️ 24d149c #1 2023-04-26 18:30:37 ~6 min tests/nim 📄log
✔️ 24d149c #1 2023-04-26 18:32:26 ~8 min macos/aarch64 🍎dmg
✔️ 24d149c #1 2023-04-26 18:35:25 ~11 min macos/x86_64 🍎dmg
✔️ 24d149c #1 2023-04-26 18:40:13 ~16 min linux/x86_64 📦tgz
✖️ 24d149c #1 2023-04-26 18:47:41 ~23 min tests/e2e 📄log
✔️ 24d149c #1 2023-04-26 18:55:16 ~31 min windows/x86_64 💿exe
✔️ 24d149c #2 2023-04-26 20:39:48 ~22 min tests/e2e 📄log

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -33,7 +33,14 @@ MembersSelectorBase {
}

edit.onTextChanged: {
d.lookupContact(edit.text)
// When edited, give a small delay in case next character is printed soon
contactLookupDelayTimer.start()
Copy link
Contributor

Choose a reason for hiding this comment

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

No double check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should be fine, I stop the timer on pasting:

onTextPasted: (text) => {
// When pated, process text immediately
contactLookupDelayTimer.stop() // when pasting, textChanged is still emited first
d.lookupContact(text)
}

Copy link
Contributor

@borismelnik borismelnik left a comment

Choose a reason for hiding this comment

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

LGTM :)

@igor-sirotin igor-sirotin merged commit 6fe82ef into master Apr 27, 2023
@igor-sirotin igor-sirotin deleted the fix/start-chat-input branch April 27, 2023 14:03
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.

Pasting ENS name in Start chat doesn't work
5 participants