linkedin / linkedin/Hakawai

Mentions chooser view showing initially for no reason

Open
#116 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
779
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Hey, I've updated to 7.1.0 and now the mentions chooser opens right away on textView.becomeFirstResponder().

It looks like the issue is with this check:
6.0.1 ... 7.1.0

if ((self.state != HKWMentionsCreationStateQuiescent || self.searchType == HKWMentionsSearchTypeInitial)
        && self.chooserState == HKWMentionsCreationChooserStateHidden) {
        [self showChooserView];
    }

HKWMentionsPlugin calls the state machine's fetchInitialMentions method which set's the searchType to Initial and make this check succeed initially and thus shows the chooser view.

I don't understand the logic completely in order to fix it or point where the issue is, but currently, I need to rollback to the previous version as this one is not production ready for our usage.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with HKWMentionsPlugin's fetchInitialMentions method and the chooser-state check shown in the issue, then compare the 6.0.1...7.1.0 change linked there. Reproduce the behavior when textView.becomeFirstResponder() runs; done means the chooser stays hidden initially while normal mention searching still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.