Skip to content

Center content in SocialCard#416

Open
Copilot wants to merge 1 commit intomainfrom
copilot/center-content-social-card-infos
Open

Center content in SocialCard#416
Copilot wants to merge 1 commit intomainfrom
copilot/center-content-social-card-infos

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 8, 2026

Content in SocialCard appeared left-aligned despite horizontalAlignment = Alignment.CenterHorizontally on the inner Column, because the column was not filling the card width — centering had nothing to work against.

Change

Added fillMaxWidth() to the Column modifier inside SocialCard:

// Before
Column(
  modifier = Modifier.padding(16.dp),
  horizontalAlignment = Alignment.CenterHorizontally
)

// After
Column(
  modifier = Modifier.fillMaxWidth().padding(16.dp),
  horizontalAlignment = Alignment.CenterHorizontally
)

The column now spans the full card width, so the hashtag chip, section header, and social icon row are all properly centered.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes SocialCard content not centering as intended by ensuring the inner Column fills the card’s available width, allowing horizontalAlignment = Alignment.CenterHorizontally to take effect.

Changes:

  • Add Modifier.fillMaxWidth() to the Column inside SocialCard to enable proper horizontal centering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants