Skip to content

Conversation

dethan3
Copy link
Member

@dethan3 dethan3 commented Feb 24, 2025

PR-20 PR-20 PR-20 Powered by Pull Request Badge

Checklist(清单):

  • Labels
  • Assignees
  • Reviewers
  1. Add [Open Library],
  2. Use the documentation to quickly start operating Open Library.

Closes #15

@TechQuery TechQuery added the feature New feature or request label Jul 8, 2025
@TechQuery TechQuery self-requested a review July 8, 2025 18:20
Copy link
Member

@TechQuery TechQuery left a comment

Choose a reason for hiding this comment

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

  1. 很多问题在不同文件都有,不一一列举,但都要改
  2. 软件开发要一个一个模块来,代码量太大对开发者、reviewer、AI 都有巨大上下文负担,很容易跑偏、卡死
  3. 以后要在看板上多拆几个 issue,不要闷头搞很久后发一个差不多做完整个项目的巨大 PR……

donate_books: '捐赠书籍',
how_it_works: '运作方式',
how_it_works_description: '三个简单步骤借阅社区书籍',
step_1_find_book: '1. 寻找书籍',
Copy link
Member

Choose a reason for hiding this comment

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

数字序号放在 HTML 结构中用 <ol /> 实现。

available: '可借阅',
borrowed: '已借出',
reset_filters: '重置筛选',
showing_books: '显示 {0} 本书,共 {1} 本',
Copy link
Member

Choose a reason for hiding this comment

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

</Col>
<Col md={9}>
<h1>{book.title}</h1>
<h5 className="text-muted mb-3">by {book.author}</h5>
Copy link
Member

Choose a reason for hiding this comment

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

作者信息不是标题,一般用 <cite />https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/cite

Comment on lines +307 to +324
<Row className="mt-4">
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">ISBN</div>
<div>{book.isbn || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Publisher</div>
<div>{book.publisher || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Published</div>
<div>{book.publishYear || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Pages</div>
<div>{book.pageCount || 'N/A'}</div>
</Col>
</Row>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<Row className="mt-4">
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">ISBN</div>
<div>{book.isbn || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Publisher</div>
<div>{book.publisher || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Published</div>
<div>{book.publishYear || 'N/A'}</div>
</Col>
<Col sm={6} md={3} className="mb-3">
<div className="text-muted small">Pages</div>
<div>{book.pageCount || 'N/A'}</div>
</Col>
</Row>
<Row as="ul" className="list-unstyled mt-4 g-3" sm={2} md={4}>
<Col as="li">
<div className="text-muted small">ISBN</div>
<div>{book.isbn || 'N/A'}</div>
</Col>
<Col as="li">
<div className="text-muted small">Publisher</div>
<div>{book.publisher || 'N/A'}</div>
</Col>
<Col as="li">
<div className="text-muted small">Published</div>
<div>{book.publishYear || 'N/A'}</div>
</Col>
<Col as="li">
<div className="text-muted small">Pages</div>
<div>{book.pageCount || 'N/A'}</div>
</Col>
</Row>

Comment on lines +351 to +352
{book.reviews && book.reviews.length > 0 ? (
<div>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{book.reviews && book.reviews.length > 0 ? (
<div>
{book.reviews?.[0] ? (
<>

Comment on lines +404 to +405
<div className="table-responsive">
<table className="table table-hover">
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +419 to +421
{new Date(
history.borrowDate,
).toLocaleDateString()}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{new Date(
history.borrowDate,
).toLocaleDateString()}
{formatDate(history.borrowDate, 'YYYY-MM-DD')}
  1. 服务端地区设置和用户浏览器通常不同,toLocaleXXX() 的结果也会不同,会出现 SSR 报错
  2. https://web-cell.dev/web-utility/functions/formatDate.html

@TechQuery TechQuery added the enhancement Some improvements label Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvements feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] Open Library
2 participants