-
Notifications
You must be signed in to change notification settings - Fork 29
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
User profile page for community #975
Conversation
Skipping CI for Draft Pull Request. |
Recommend to use together with [`useQuery`](@/utils/exception) hook. | ||
--> | ||
|
||
<script setup lang="ts" generic="T extends unknown[] | ByPage<unknown>"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我最近在尝试对新增的 component 的内容采用 1) script 2) template 3) style 的顺序去组织,我是看到之前实训营的同学这么写过,我觉得挺合理的,考虑
- 从逻辑上说 template 往往会依赖 script 中定义的变量、函数等,所以放在后边合理一些
- style 的编写经常对应 template 中的 class name 和 HTML 结构,这俩靠得近些会更方便
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
component 的内容采用 1) script 2) template 3) style 的顺序去组织
https://vuejs.org/style-guide/rules-recommended.html#single-file-component-top-level-element-order
嗯 vue 官方推荐里虽然没有写明,但 examples 里基本都是这种顺序,明显是更偏好这种
This PR has been deployed to the preview environment. You can explore it using the preview URL. Warning Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team. |
<template #title> | ||
{{ | ||
$t({ | ||
// TODO: "my" or "your"? (consistency) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
关于【第一人称 vs 第二人称】的问题,我很久以前也和别人讨论过,但发现并没有“最佳选择”,最终我们是参考了竞品 No.1 的风格😂
感觉其实只要在自己的产品中保持风格一致就够了,苹果和谷歌的设计指南里也差不多是这么说的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,做到这里的时候发现原型图上的人称是不一致的(主要是首页跟 user profile 页),要统一的话不少文案可能要重新想一下,所以先记个 TODO
目前计划是统一为第二人称,这样在 home 页就是“your ...”,而在 user profile 页就是“my ...”
<div>Followers</div> | ||
<UserContent class="user-likes"> | ||
<template #title> | ||
{{ $t({ en: 'Followers', zh: '被关注' }) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉把 Followers
翻译成被关注
有点奇怪,叫粉丝
或者关注者
、追随者
会不会更好?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯现在的“被关注”跟“关注”比较生硬,我跟着上边提到的人称一起调整下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,那先 approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
<div>Following</div> | ||
<UserContent class="user-likes"> | ||
<template #title> | ||
{{ $t({ en: 'Following', zh: '关注' }) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
关注
是个动词了不太合适吧?正在关注
好一些
close #945