Closed Bug 955658 Opened 10 years ago Closed 10 years ago

Match channels without insisting on the prefix and treat whitespace as AND in the awesometab

Categories

(Instantbird Graveyard :: Other, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: aleth)

References

Details

Attachments

(1 file, 3 obsolete files)

*** Original post on bio 2213 at 2013-10-10 21:57:00 UTC ***

*** Due to BzAPI limitations, the initial description is in comment 1 ***
Blocks: 955013
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2213 as attmnt 2937 at 2013-10-10 21:57:00 UTC ***

A small tweak to the current newtab search to return e.g. "#instantbird" when filtering on "instant", as a stopgap until bug 955585 (bio 2146). Also makes some minor performance improvements.
Attachment #8354714 - Flags: review?(nhnt11)
*** Original post on bio 2213 at 2013-10-10 21:59:24 UTC ***

Do you think we should replace the substring(1) by a specific check for channel prefixes?
*** Original post on bio 2213 at 2013-10-10 22:02:56 UTC ***

What about just using contains?
*** Original post on bio 2213 at 2013-10-10 22:07:53 UTC ***

What about splitting on word boundaries instead of \s+?
Comment on attachment 8354714 [details] [diff] [review]
Patch

*** Original change on bio 2213 attmnt 2937 at 2013-10-10 22:10:25 UTC ***

I'll tweak this tomorrow.
Attachment #8354714 - Flags: review?(nhnt11) → review-
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2213 as attmnt 2938 at 2013-10-11 14:53:00 UTC ***

Uses a short hardcoded list of special characters that will be ignored. I don't think we need do anything more elaborate until we improve search in general (and match all substrings, but rank differently when the match is at the beginning of the string, etc similar to the awesomebar).
Attachment #8354715 - Flags: review?(nhnt11)
Comment on attachment 8354714 [details] [diff] [review]
Patch

*** Original change on bio 2213 attmnt 2937 at 2013-10-11 14:53:47 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354714 - Attachment is obsolete: true
Assignee: nobody → aleth
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 2213 as attmnt 2939 at 2013-10-11 15:47:00 UTC ***

Flo wanted to keep the \s due to the possibility of unbreakable spaces. 

He explained to me that the reason for the extra "c.lowerCaseName.startsWith(aFilterStr) ||" check in the existing code was to match search strings containing spaces. This seems to me like a workaround for a proper AND so I implemented that instead.
Attachment #8354717 - Flags: review?(nhnt11)
Comment on attachment 8354715 [details] [diff] [review]
Patch

*** Original change on bio 2213 attmnt 2938 at 2013-10-11 15:47:45 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354715 - Attachment is obsolete: true
Attachment #8354715 - Flags: review?(nhnt11)
OS: Linux → All
Hardware: x86 → All
Summary: Allow searching for IRC channels without typing the prefix → Match channels without insisting on the prefix and treat whitespace as AND in the awesometab
Attached patch PatchSplinter Review
*** Original post on bio 2213 as attmnt 2940 at 2013-10-11 15:59:00 UTC ***

Saves one line.
Attachment #8354718 - Flags: review?(nhnt11)
Comment on attachment 8354717 [details] [diff] [review]
Patch

*** Original change on bio 2213 attmnt 2939 at 2013-10-11 15:59:43 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354717 - Attachment is obsolete: true
Attachment #8354717 - Flags: review?(nhnt11)
*** Original post on bio 2213 at 2013-10-11 19:07:43 UTC ***

Comment on attachment 8354718 [details] [diff] [review] (bio-attmnt 2940)
Patch

Thanks!
Comment on attachment 8354718 [details] [diff] [review]
Patch

*** Original change on bio 2213 attmnt 2940 at 2013-10-11 19:07:52 UTC ***

Thanks!
Attachment #8354718 - Flags: review?(nhnt11) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 2213 at 2013-10-11 22:54:11 UTC ***

http://hg.instantbird.org/instantbird/rev/fa948dbd76bf
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.5
You need to log in before you can comment on or make changes to this bug.