Skip to content

Varkopat/refactor/661/refactor clancard component to match newest figma design - #674

Merged
Rutjake merged 14 commits into
devfrom
Varkopat/refactor/661-refactor-clancard-component-to-match-newest-figma-design
Aug 29, 2026
Merged

Varkopat/refactor/661/refactor clancard component to match newest figma design#674
Rutjake merged 14 commits into
devfrom
Varkopat/refactor/661-refactor-clancard-component-to-match-newest-figma-design

Conversation

@Varkopat

@Varkopat Varkopat commented Jul 27, 2026

Copy link
Copy Markdown

📄 Pull Request Overview

Closes #661

🔧 Changes Made

  1. Refactored the clan card UI to better align with the latest Figma design, including updated title styling, metadata positioning, and improved card spacing for a more polished presentation.

  2. Improved responsiveness and layout consistency across mobile and modular card variants by adjusting image container sizing, media queries, and related styles for better behavior across breakpoints.

Refactoring / Cleanup

Simplified and consolidated clan card-related styling in the shared mobile and modular card components to make the implementation easier to maintain and more consistent.


Checklist Before Submission

  • Functionality: I have tested my code, and it works as expected.
  • JSDoc: I have added or updated JSDoc comments for all relevant code.
  • Debugging: No console.log() or other debugging statements are left.
  • Clean Code: Removed commented-out or unnecessary code.
  • Tests: Added new tests or updated existing ones for the changes made.
  • Documentation: Documentation has been updated (if applicable).

📝 Additional Information

  • Screenshot:
screenshot
  • Known Issues:

I don't know if this is an already known issue, but for some reason the clans page doesn't load on the build server. On dev server it works fine.

EDIT 29.7.2026: Like Sakari pointed out in his comment, I only needed to change the build server to use port 5173. Now it works on build server too.

Varkopat added 11 commits July 1, 2026 00:19
…ning with latest design specifications and improving layout for clan information display
…izes and media queries for improved responsiveness
…and align with Figma design, improving information display and visual consistency.

Updated MobileCard.module.scss so mobile clan cards now:

- allow ClanInfoBadges to wrap and use full width

- keep badge icons smaller and better spaced

- show ClanInfoStats in a flexible column instead of a cramped block

- let ClanInfoValue wrap cleanly on small screens

- render ClanLabels in a responsive row with smaller, pill-style chips

Validation:

Checked the updated stylesheet for errors: none found.
…ss and align with Figma design, improving visual consistency and information display.
… styles for improved layout and responsiveness
- Fix ClanCard layout flow and height constraints across mobile and tablet viewports
- Constrain image container max-height to stop clan logos from overlapping titles
- Apply primary color accent to clan titles with ellipsis text-overflow truncation
- Restructure stats and badge rows to stack vertically on narrow screens
…le so the title uses var(--primary-color) reliably.

Validation: checked the diff and selector location.

- Refactored media queries in MobileCard ClanCard.

- Polished the UI so it better matches Figma designs.
@Varkopat Varkopat linked an issue Jul 27, 2026 that may be closed by this pull request
5 tasks
@Skoivumaki

Copy link
Copy Markdown
Member

"I don't know if this is an already known issue, but for some reason the clans page doesn't load on the build server. On dev server it works fine."
Built next server uses port 3000 and gets CORS errors because of it. API only allows localhost:5173.
If you want to experiment with npm run start, change the port to 5173.

@Varkopat

Varkopat commented Jul 29, 2026

Copy link
Copy Markdown
Author

"I don't know if this is an already known issue, but for some reason the clans page doesn't load on the build server. On dev server it works fine." Built next server uses port 3000 and gets CORS errors because of it. API only allows localhost:5173. If you want to experiment with npm run start, change the port to 5173.

It works now, thanks for the tip!

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Visually everything looks good, but there are some functional issues.
It seems that you completely replaced the enums logic, that determined what badge the clan card was given in response.
You should only give a clan card the "only adults" badge when clan has ageRange set to Adults. Same goes for if the clan is isOpen: false it should render the lock badge.
From the issue: "Update the clanLabel, status icons, and tags inside the card to match the exact placement in the Figma design." this can be confusing, but we are only talking about the placement of badges, not when and if they should be rendered in that place.

Todo:

  • Fix badge rendering to be based off real backend data. Age, lock and language badges.
  • Change title font size from var(--font-sw-xxxl) to var(--font-sw-xxl) (you did as in Figma, but in reality the font got clamped way too high)
  • Add tooltips to badges, so user knows what they mean on hover (remember i18n)
  • Remove the star badge from the card. (I think its for the top 1 clan, but since the endpoint on the page doesnt return position data, we cant implement it yet.)

…anguage icons, and update styles for improved responsiveness
@Varkopat
Varkopat requested a review from Skoivumaki August 12, 2026 15:01
@Varkopat
Varkopat marked this pull request as draft August 14, 2026 19:46
@codecov-alt

codecov-alt Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ges/ClanPages/ui/ClanAllSubPage/ClanAllSubPage.tsx 0.00% 23 Missing ⚠️
...tion/src/entities/Clan/config/clanLanguageIcons.ts 0.00% 6 Missing ⚠️
Files with missing lines Coverage Δ
...tion/src/entities/Clan/config/clanLanguageIcons.ts 0.00% <0.00%> (ø)
...ges/ClanPages/ui/ClanAllSubPage/ClanAllSubPage.tsx 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Varkopat
Varkopat marked this pull request as ready for review August 16, 2026 15:23

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost perfect! The font is wrong for line "Members... etc" and remove position text since we are not using it. Also don't render the red lock at all. If clan is open, it doesn't need any badges etc. (the current clan closed badge is good as is)
Image

@Varkopat
Varkopat requested a review from Skoivumaki August 21, 2026 17:24

@Skoivumaki Skoivumaki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Requested changes done. The "members" text font was still wrong, but this might be a Next/browser issue for me with development runtime. I expect you checked the build version to look correct? @Varkopat

@Varkopat

Copy link
Copy Markdown
Author

Requested changes done. The "members" text font was still wrong, but this might be a Next/browser issue for me with development runtime. I expect you checked the build version to look correct? @Varkopat

Yes, I have checked the build version to look correct.

@Rutjake Rutjake left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work! Looks good to me.

@Rutjake
Rutjake merged commit 6feee13 into dev Aug 29, 2026
6 checks passed
@Rutjake
Rutjake deleted the Varkopat/refactor/661-refactor-clancard-component-to-match-newest-figma-design branch August 29, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor ClanCard Component to Match Newest Figma Design

3 participants