Skip to content
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

Support centering members in VPTeamPage #3769

Open
4 tasks done
stevending1st opened this issue Apr 9, 2024 · 4 comments · May be fixed by #3796
Open
4 tasks done

Support centering members in VPTeamPage #3769

stevending1st opened this issue Apr 9, 2024 · 4 comments · May be fixed by #3796
Labels
enhancement New feature or request stale theme Related to the theme

Comments

@stevending1st
Copy link

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

@stevending1st stevending1st added the bug: pending triage Maybe a bug, waiting for confirmation label Apr 9, 2024
@brc-dd
Copy link
Member

brc-dd commented Apr 9, 2024

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

@stevending1st
Copy link
Author

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
Copy link
Member

brc-dd commented Apr 9, 2024

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.

@brc-dd brc-dd removed the bug: pending triage Maybe a bug, waiting for confirmation label Apr 9, 2024
@stevending1st
Copy link
Author

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.

@brc-dd brc-dd added enhancement New feature or request theme Related to the theme labels Apr 9, 2024
@brc-dd brc-dd changed the title If there is only one member, VPTeamMembers, it does not center by default. Support centering members in VPTeamPage Apr 9, 2024
@github-actions github-actions bot added the stale label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale theme Related to the theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants