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

feat(website): implement group topic page #113

Merged
merged 88 commits into from
Dec 1, 2022

Conversation

cokemine
Copy link
Contributor

@cokemine cokemine commented Aug 3, 2022

/group/topic/${topicId}

closes #112

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Base: 92.00% // Head: 92.46% // Increases project coverage by +0.46% 🎉

Coverage data is based on head (b38c505) compared to base (ac8b427).
Patch coverage: 96.52% of modified lines in pull request are covered.

❗ Current head b38c505 differs from pull request most recent head 4b156b8. Consider uploading reports for the commit 4b156b8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
+ Coverage   92.00%   92.46%   +0.46%     
==========================================
  Files          70       76       +6     
  Lines        3688     4006     +318     
  Branches      423      463      +40     
==========================================
+ Hits         3393     3704     +311     
- Misses        293      300       +7     
  Partials        2        2              
Impacted Files Coverage Δ
packages/utils/pages.ts 62.50% <ø> (ø)
.../pages/index/group/components/ClampableContent.tsx 71.08% <38.46%> (ø)
packages/utils/bbcode/convert.ts 94.63% <84.61%> (-0.27%) ⬇️
packages/client/topic.ts 93.75% <93.75%> (ø)
packages/design/components/Topic/Comment.tsx 99.45% <99.45%> (ø)
packages/client/common.ts 100.00% <100.00%> (ø)
packages/client/user.ts 92.85% <100.00%> (-1.27%) ⬇️
packages/design/components/Layout/index.tsx 100.00% <100.00%> (ø)
packages/design/components/Pagination/index.tsx 98.37% <100.00%> (+0.05%) ⬆️
packages/design/components/RichContent/index.tsx 100.00% <100.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@trim21
Copy link
Contributor

trim21 commented Nov 21, 2022

用post_id假装(

@trim21
Copy link
Contributor

trim21 commented Nov 21, 2022

https://pr-113-sites--bangumi-next.netlify.app/group/topic/371602#post_2092004 这个浏览器的定位效果好实现吗

@cokemine
Copy link
Contributor Author

cokemine commented Nov 21, 2022

https://pr-113-sites--bangumi-next.netlify.app/group/topic/371602#post_2092004 这个浏览器的定位效果好实现吗

应该只能 SSR 吧 @Ayase-252

  useEffect(() => {
    const anchor = window.location.hash.slice(1);
    document.getElementById(anchor)?.scrollIntoView(true);
  }, [topicDetail]);

这样可以,但是感觉会有点问题

@trim21
Copy link
Contributor

trim21 commented Nov 21, 2022

🤔 要不先review一下这个,然后用这个来发请求 #200

@trim21
Copy link
Contributor

trim21 commented Nov 27, 2022

除了定位到评论,其他的看起来ok。

我记得chrome有个非标的API scrollIntoViewIfNeeded可用

@Ayase-252
Copy link
Contributor

scrollIntoView 有啥问题吗?感觉定位缺个高亮的样式,可以先记个 issue 以后改

@cokemine
Copy link
Contributor Author

https://next.bgm.tv dev不了了,是后端改过什么东西吗 description : "bad referer, cross-site api request is not allowed"

@trim21
Copy link
Contributor

trim21 commented Nov 28, 2022

后端没改过什么东西。

vite的proxy倒是改过,是这个的问题?

@cokemine
Copy link
Contributor Author

应该不是。vite.config.ts 改过之后没有出现问题

@trim21
Copy link
Contributor

trim21 commented Nov 28, 2022

后端也没改什么东西,好久没打新tag了

@trim21
Copy link
Contributor

trim21 commented Nov 28, 2022

的确是vite配置错了

@Ayase-252
Copy link
Contributor

Screenshot 2022-11-29 at 22 23 23

未登录的情况下隐藏回复和 +1 按钮吧。

Copy link
Contributor

@Ayase-252 Ayase-252 left a comment

Choose a reason for hiding this comment

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

没其他问题

import React from 'react';

export interface LayoutProps {
type: 'alpha' | 'beta';
Copy link
Contributor

Choose a reason for hiding this comment

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

beta 好像没有用到?话说 alpha 是什么意思?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我看了看小组页面、小组主题帖、和搜索页面的布局是一样的。 条目具体信息会用另一套布局。应该不会有太多布局就放着复用了(

@trim21 trim21 merged commit bee42ce into bangumi:master Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

website: 小组讨论详情页
4 participants