-
Notifications
You must be signed in to change notification settings - Fork 121
feat(teams): enhance TeamCard with repository display and improved styling #640
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
Conversation
WalkthroughThe pull request introduces a new function, Changes
Sequence Diagram(s)sequenceDiagram
participant TeamCard
participant renderVisibleRepos
participant AvatarGroup
participant Avatar
TeamCard->>renderVisibleRepos: Invoke renderVisibleRepos()
renderVisibleRepos->>AvatarGroup: Construct avatar container
AvatarGroup->>Avatar: Render each repository's avatar
renderVisibleRepos->>TeamCard: Return constructed layout with avatars and repository names
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
web-server/src/components/TeamsList.tsx (1)
212-240
: Well-structured repository visualization componentThe new
renderVisibleRepos
function effectively implements the repository display feature as mentioned in the PR objectives. The implementation is clean and follows React best practices.Consider these minor improvements:
- The GitHub avatar URL uses
size=20
but displays at 28x28px, which might reduce image quality- Consider adding a fallback for missing repository avatars
- src={`https://github.com/${repo.org_name}.png?size=20`} + src={`https://github.com/${repo.org_name}.png?size=28`} + alt={`${repo.name} repository`} + sx={{ + bgcolor: 'grey.200' + }}- {visibleReposName.map((repo, index) => ( - <span key={repo.id || repo.name}> - {repo.name}{index < visibleReposName.length - 1 ? ', ' : ''} - </span> - ))} + {visibleReposName.map(repo => repo.name).join(', ')}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
web-server/src/components/TeamsList.tsx
(3 hunks)
🔇 Additional comments (6)
web-server/src/components/TeamsList.tsx (6)
7-8
: Clean addition of UI componentsGood job adding the
Avatar
andAvatarGroup
components from Material-UI. These are appropriate choices for displaying repository avatars as required by the PR objectives.
256-265
: Enhanced card styling for better visual appealThe styling improvements to the
TeamCard
component are excellent. The increased padding, defined minimum height, rounded corners, and subtle shadow effects create a more polished and modern UI. The hover state enhancement provides good interactive feedback.The box-shadow transitions nicely between states, which improves the user experience.
267-282
: Well-organized header section with improved typographyThe team name header is now properly emphasized with the primary dark color, and the layout provides good separation between the title and action buttons.
284-292
: Clear visual hierarchy with effective separatorGood use of the
Divider
component to create visual separation between sections. The repository count is now clearly emphasized with appropriate typography styling.
294-315
: Excellent implementation of repository list with progressive disclosureThe implementation shows the visible repositories with avatars and names, while providing a "+X more" indicator for additional repositories. This pattern follows good UX principles for progressive disclosure of information.
The tooltip for showing additional repository names is a thoughtful addition that enhances usability without cluttering the UI.
318-327
: Well-positioned call-to-action buttonThe "View DORA Metrics" button is appropriately placed at the bottom of the card, making it a clear call-to-action. The full-width styling and inclusion of the icon enhance its visibility and usability.
@Ayyanaruto This is a very minute detail. Could you please move +2 to next to repo names, as shown in the second screenshot? ![]() ![]() |
{Boolean(assignedReposToTeam.length) && ( | ||
<FlexBox col gap={1}> | ||
{renderVisibleRepos} | ||
|
||
{assignedReposToTeam.length > VISIBLE_REPOS_COUNT && ( | ||
<FlexBox | ||
inline | ||
sx={{ | ||
userSelect: 'none', | ||
ml: 1 | ||
}} | ||
title={<FlexBox maxWidth={'250px'}>{tooltipRepos}</FlexBox>} | ||
> | ||
<Line info> | ||
+{assignedReposToTeam.length - VISIBLE_REPOS_COUNT} more | ||
</Line> | ||
</FlexBox> | ||
</> | ||
)} | ||
</FlexBox> | ||
</FlexBox> | ||
</FlexBox> | ||
<FlexBox col justifyBetween minHeight={'70px'} alignCenter> | ||
<FlexBox | ||
title={'View Dora Metrics'} | ||
centered | ||
width={'1.2em'} | ||
maxWidth={'1.2em'} | ||
pointer | ||
onClick={() => onView(team)} | ||
> | ||
<DoraIcon /> | ||
)} | ||
</FlexBox> | ||
)} |
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.
Can we make the requested changes?
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.
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.
Hey @dreamerchandra I have made requested changes Sorry for taking this much time ,Let me know if the submitted code works for you or there is a better way to do it
Thanks man |
awesome @Ayyanaruto |
@Ayyanaruto linters are failing, could you take a look? |
Sure , But I did ran |
…causing lint-erros
thanks @Ayyanaruto |
resolves #639
This pull request enhances the
TeamsList
component in theweb-server
project by improving the UI and adding new features for better user experience. The most significant changes include the addition ofAvatar
andAvatarGroup
components, UI styling updates, and the introduction of therenderVisibleRepos
function.UI Enhancements:
web-server/src/components/TeamsList.tsx
: AddedAvatar
andAvatarGroup
components to display repository avatars in theTeamsList
component. [1] [2]web-server/src/components/TeamsList.tsx
: UpdatedTeamCard
component styling, including changes to padding, minimum height, border radius, box shadow, and hover effects.New Features:
web-server/src/components/TeamsList.tsx
: Introduced therenderVisibleRepos
function to render visible repositories with avatars and names in theTeamCard
component.Summary by CodeRabbit
New Features
Style