-
Notifications
You must be signed in to change notification settings - Fork 14
Search in chat #394
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
Search in chat #394
Conversation
josefinalliende
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool feature! Huge job! 🚀 I still have to try it locally but left some comments/doubts in the meantime
| visualState: AppButtonVisualState.secondary, | ||
| icon: const Text('Search Chat'), | ||
| label: SvgPicture.asset( | ||
| AssetsPaths.icSearch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a doubt.. there is a carbon icons package that has the same icons that Figma design. Is there a reason to have them downloaded as svgs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its seems confusing to me that the icon prop receives the text and that the label prop receives the icon...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because of the position of the icon and label. This is more of a discussion about app button widget. So I'll leave it as it is for now.
As for the SVG issue, I used the assets folder so that we could make changes to them from a single location in the future. I think @Quwaysim created the assets folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, should all CarbonIcons be replaced with SVGs from the assets folder? I like the CarbonIcons syntax, t’s easy to read and makes it simple to match icon names with Figma. That said, maybe SVGs work better in Flutter? Or are there any drawbacks to using CarbonIcons? Happy to chat more about it on Thursday to make sure we're on the same page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the app button widget .. Would it be okay if I open a small issue to suggest adding something like an iconPosition prop to the button? Just to make it clearer whether the icon is on the left or right—so we don't have to swap prop values like in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, It’d be good for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll open the issue then! 😄
Simplifies the loop for finding query matches in message content by using a single variable for match index and updating it within the loop. This improves readability and ensures correct handling of overlapping matches.
josefinalliende
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to help with the rebase due to the conflicts cause of my PR that renames components. Hope it helps!
| ], | ||
| ), | ||
| Gap(32.h), | ||
| AppFilledButton.icon( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to help with the rebase: this one is now called WnFilledButton
| ), | ||
| Gap(32.h), | ||
| AppFilledButton.icon( | ||
| size: AppButtonSize.small, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, to help with the rebase: this one is now called WnButtonVisualState
| ), | ||
|
|
||
| Gap(12.h), | ||
| AppFilledButton.icon( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, to help with the rebase: this one is now called WnFilledButton
|
|
||
| Gap(12.h), | ||
| AppFilledButton.icon( | ||
| size: AppButtonSize.small, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, to help with the rebase: this one is now called WnButtonSize
lib/ui/chat/chat_screen.dart
Outdated
| } | ||
| // Only show AppBar when search is not active | ||
| if (!searchState.isSearchActive) | ||
| CustomAppBar.sliver( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, to help with the rebase: this one is now called WnAppBar
josefinalliende
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it locally and loved it 😍 . Just a couple of small feedback (totally fine to address in a future PR—I just wanted to share them so we don’t forget):
- The color of the match count looks white, but in Figma it seems to be muted.
- Messages without a match don’t appear transparent—they look like regular messages. Not sure if that’s intentional, but I think adding some transparency might help make it clearer when a message doesn't contain a match.
| Without match on first message | ❓ With match in first message ✅ |
|---|---|
![]() |
![]() |
![]() |
![]() |




Description
The "Search in Chat" feature has been added in accordance with the designs.
Type of Change
Checklist
just precommitto ensure that formatting and linting are correctCHANGELOG.mdfile with your changes