Skip to content

Fixes for FeatureCardsContainer component#664

Merged
Miexil merged 5 commits into
masterfrom
mb/feature-card-fixes
May 5, 2026
Merged

Fixes for FeatureCardsContainer component#664
Miexil merged 5 commits into
masterfrom
mb/feature-card-fixes

Conversation

@Miexil
Copy link
Copy Markdown
Member

@Miexil Miexil commented May 4, 2026

What does this PR do?

  • Uses OOP pattern and migrates function to private methods inside the component class.
  • Removes unreachable assertions in the code (see comment directly in the file)
  • Removes unwanted comments in the less file + applies prettier formatting
  • Finally, fixes a misalignment when only two cards are used:

Before fix (misaligned top corners):
Screenshot 2026-05-04 at 11 17 58

After fix:
Screenshot 2026-05-04 at 11 39 36

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation with Figma design link. Don't forget to replace "design" by "file" in the URL. For example https://www.figma.com/file/example
  • Migrated touched components to Glimmer Components
  • Properly labeled


if (cardsCount === 2 || cardsCount === 3) return index === 0 ? 'blue' : 'yellow';

assert('[OSS::FeatureCardsContainer] Internal layout configuration mismatch', false);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed assertion here and on line 27 as we already check in the constructor if we have 1,2 or 3 cards. This code is unreachable.

@@ -1 +1 @@
@import url('https://fonts.googleapis.com/css?family=Reddit+Sans:wght@400&family=Open+Sans:400,400i,600,600i,700,700i&display=swap&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese');
@import url('https://fonts.googleapis.com/css?family=Reddit+Sans:wght@400,600&family=Open+Sans:400,400i,600,600i,700,700i&display=swap&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese'); No newline at end of file
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note for reviewers, this is out of scope, just to help out a Vela teammate in need 😇

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.

❤️

@Miexil Miexil merged commit 18a3643 into master May 5, 2026
3 checks passed
@Miexil Miexil deleted the mb/feature-card-fixes branch May 5, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants