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: Add license field to fetchLatestPageVersionWithTranslations query #131

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

ttizze
Copy link
Owner

@ttizze ttizze commented Jul 30, 2024

Summary by CodeRabbit

## リリースノート

### New Feature
- `page_versions`テーブルに新しいカラム`license`が追加され、デフォルト値として`'unknown'`が設定されました。
- `fetchLatestPageVersionWithTranslations`関数に`license`フィールドが追加されました。
- `ReaderView`コンポーネントで`pageData.license`を表示するための<p>タグが追加されました。

### Refactor
- `LatestPageVersionWithTranslations`インターフェースに新しいフィールド`license`が追加されました。
- `PageVersion`モデルに新しいフィールド`license`が追加され、デフォルト値は"unknown"に設定されました。

Copy link

render bot commented Jul 30, 2024

Your Render PR Server URL is https://eveeve-pr-131.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cqkg21tds78s73fde390.

Copy link

github-actions bot commented Jul 30, 2024

Image description CodeRabbit

## ウォークスルー
この変更は、`page_versions`テーブルに新しいカラム`license`を追加し、関連するTypeScriptインターフェースとReactコンポーネントでそのフィールドを使用するように更新しています。これにより、ページのライセンス情報が表示されるようになります。

## 変更点
| ファイル | 要約 |
| --- | --- |
| web/app/routes/reader.$encodedUrl/functions/queries.server.ts | `fetchLatestPageVersionWithTranslations` 関数に `license` フィールドを追加 |
| web/app/routes/reader.$encodedUrl/route.tsx | `ReaderView`コンポーネントに `<p>` タグで `pageData.license` を表示 |
| web/app/routes/reader.$encodedUrl/types.ts | `LatestPageVersionWithTranslations` インターフェースに `license` フィールドを追加 |
| web/prisma/migrations/20240730150103_/migration.sql, web/prisma/schema.prisma | `page_versions` テーブルと `PageVersion` モデルに `license` カラムを追加、デフォルト値は `'unknown'` |

Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

@ttizze ttizze merged commit ef4a50b into main Jul 30, 2024
4 checks passed
@ttizze ttizze deleted the feature/license branch July 30, 2024 15:05
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 2262fe2 and b460cbe commits.
Files selected (5)
  • web/app/routes/reader.$encodedUrl/functions/queries.server.ts (2)
  • web/app/routes/reader.$encodedUrl/route.tsx (1)
  • web/app/routes/reader.$encodedUrl/types.ts (1)
  • web/prisma/migrations/20240730150103_/migration.sql (1)
  • web/prisma/schema.prisma (2)
Review comments generated (7)
  • Review: 0
  • LGTM: 7

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant