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

[MM-60405] Crossteam search #8411

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

[MM-60405] Crossteam search #8411

wants to merge 16 commits into from

Conversation

JulienTant
Copy link
Member

@JulienTant JulienTant commented Dec 12, 2024

Summary

This PR changes to design to have the new team selector in the search and result views, and adds a new "All teams" option only if the correct feature flag is set on the server.

Tickets Link

https://mattermost.atlassian.net/browse/MM-60405
https://mattermost.atlassian.net/browse/MM-60410
https://mattermost.atlassian.net/browse/MM-60411

Blocked by

mattermost/mattermost#29389

Checklist

  • Added or updated unit tests (required for all new features)
  • Has UI changes
  • Includes text changes and localization file updates
  • Have tested against the 5 core themes to ensure consistency between them.
  • Have run E2E tests by adding label E2E iOS tests for PR.

Device Information

This PR was tested on: iOS Emulator, Android emulator, iPad emulator

Screenshots

New team selector in the search page
Simulator Screenshot - iPhone 16 Pro - 2024-12-16 at 16 18 20

The team bottom sheet contains "All Teams" (FF is on)
Simulator Screenshot - iPhone 16 Pro - 2024-12-16 at 16 18 07

New team selector in the result page
Simulator Screenshot - iPhone 16 Pro - 2024-12-16 at 16 18 53

Release Note

NONE

@JulienTant JulienTant added the Work In Progress Not yet ready for review label Dec 12, 2024
@JulienTant JulienTant marked this pull request as ready for review December 12, 2024 20:03
@amyblais amyblais added this to the v2.25.0 milestone Dec 13, 2024
@JulienTant JulienTant added 2: Dev Review Requires review by a core commiter and removed Work In Progress Not yet ready for review labels Dec 16, 2024
@JulienTant JulienTant added the E2E iOS tests for PR Run iOS E2E Detox tests label Dec 16, 2024
@github-actions github-actions bot removed the E2E iOS tests for PR Run iOS E2E Detox tests label Dec 17, 2024
@enahum
Copy link
Contributor

enahum commented Dec 17, 2024

Before I even begin reviewing this, did you check Android and iPad?

@JulienTant JulienTant added the Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) label Dec 17, 2024
@JulienTant
Copy link
Member Author

Before I even begin reviewing this, did you check Android and iPad?

Yep, I tried them both in their respective emulators.

@enahum
Copy link
Contributor

enahum commented Dec 19, 2024

Before I even begin reviewing this, did you check Android and iPad?

Yep, I tried them both in their respective emulators.

that is nice, can you share screenshots or video captures for UX reference?

Copy link
Contributor

Choose a reason for hiding this comment

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

what % of code is being covered with this tests? if 80% or more then OK, if not, let's try and bring it to 80%+ please.

Copy link
Member Author

@JulienTant JulienTant Dec 19, 2024

Choose a reason for hiding this comment

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

We should be good, jest --coverage app/components/team_list/index.test.tsx --collectCoverageFrom=app/components/team_list/index.tsx gave me

Statements   : 100% ( 16/16 )
Branches     : 91.66% ( 11/12 )
Functions    : 100% ( 5/5 )
Lines        : 100% ( 14/14 )

I had to change the jest.config.js which is set to not report coverage on our components or screens.

app/components/team_list/index.test.tsx Outdated Show resolved Hide resolved
@@ -20,6 +20,7 @@ type Props = {
iconBackgroundColor?: string;
selectedTeamId?: string;
onPress: (teamId: string) => void;
hideIcon?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we hiding the icon? I could not find any reference to this in the tickets nor a figma attached

Copy link
Member Author

Choose a reason for hiding this comment

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

The new design calls for no icons in the team selector for search, from Figma:

image

testID={`${teamListItemTestId}.team_icon`}
/>
</View>
}
<Text
style={[styles.text, Boolean(textColor) && {color: textColor}]}
numberOfLines={1}
Copy link
Contributor

Choose a reason for hiding this comment

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

for long names, should we add an ellipsis ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's already handled!
image

};
});

export const ALL_TEAMS_ID = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps this should be moved to a constants file.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't notice the constants folder! Thanks, I moved it there!

marginBottom: 12,
paddingHorizontal: 12,
flexDirection: 'row',
justifyContent: 'space-between',
Copy link
Contributor

Choose a reason for hiding this comment

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

please show how is this modifying the UI and the impact, I know we spend a long time making this right, so I want to avoid changes here if they don't match the UI unless the UI changes for this are expected.

Copy link
Member Author

Choose a reason for hiding this comment

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

I made a screenshot on iOS and Android, and here's the link to Figma: https://www.figma.com/design/afCozEMCPeyfomstQfyp61/Search-Across-Teams?node-id=4274-35733&p=f&t=tlOZueT4DGgmwuhq-0

iPhone:
Simulator Screenshot - iPhone 16 Pro - 2024-12-19 at 10 50 28
Android:

Screenshot_1734630717

</View>
<View style={{flex: 1}}>
<Text
id={selectedTeam.id}
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we add an ellipsis here? also why are we removing the icon?

Copy link
Member Author

Choose a reason for hiding this comment

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

The ellipsis is handled:

Screenshot_1734631074

And the icon removal is part of the new design

smallText={true}
/>
</View>
<View style={{flex: 1}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

move to a stylesheet

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

<CompassIcon
color={changeOpacity(theme.centerChannelColor, 0.56)}
style={styles.compass}
Copy link
Contributor

Choose a reason for hiding this comment

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

why remove?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was not necessary anymore

Copy link
Contributor

Choose a reason for hiding this comment

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

revert the changes to this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core commiter Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants