vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
12.46k stars 2.03k forks source link

Support centering members in VPTeamPage #3769

Open stevending1st opened 5 months ago

stevending1st commented 5 months ago

Describe the bug

Starting from version 1.0.0-rc.43, if there is only one member, the VPTeamMembers component will not be centered by default.

Reproduction

---
layout: home
---

<script setup>
import { withBase } from 'vitepress'
import {
  VPTeamPage,
  VPTeamPageTitle,
  VPTeamMembers,
  VPTeamPageSection
} from 'vitepress/theme'

const convener = [
    {
    avatar: withBase('./avatar.png'),
    name: 'Bob',
  },

]
</script>

<VPTeamPage>
  <VPTeamPageSection v-if="convener">
    <template #title>WHo</template>
    <template #members>
      <VPTeamMembers size="small" :members="convener" />
    </template>
  </VPTeamPageSection>
</VPTeamPage>

Expected behavior

image

System Info

System:
    OS: Windows 11
  Binaries:
    Node: 20.10.0
    Yarn: 1.22.19
    npm: 10.5.0
    pnpm: 8.15.5
  Browsers:
    Edge: Chromium (123.0.2420.81)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vitepress: 1.0.0-rc.43

Additional context

No response

Validations

brc-dd commented 5 months ago

I don't think it's ever centered, regardless of count of members.

stevending1st commented 5 months ago

I don't think it's ever centered, regardless of count of members.

Thank you for your reply, but this seems not to provide a configurable parameter for centering, and I believe it is a breaking change.

brc-dd commented 5 months ago

I believe it is a breaking change

It never provided any prop to adjust centering, nor it was ever centered. How is this a breaking change? It's a feature request at best. Moreover it uses grid and centering a row in grid is not possible. We would need to rewrite it using flex.

stevending1st commented 5 months ago

It never provided any prop to adjust centering, nor it was ever centered. How is this a breaking change? It's a feature request at best. Moreover it uses grid and centering a row in grid is not possible. We would need to rewrite it using flex.

Thank you again for your reply, and I now agree with what you said.