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: Revive attachment-refs with remark #7597
feat: Revive attachment-refs with remark #7597
Conversation
* 1. when 'fileFormat' is image, render Attachment as an image | ||
* 2. when 'fileFormat' is not image, render Attachment as an Attachment component | ||
*/ | ||
// TODO: implement image carousel modal without using react-images |
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.
react-images が今は開発されておらず、今の環境だと動かなくなってしまいました。
react-images の README では
https://www.npmjs.com/package/react-responsive-carousel
がお勧めされていましたが、react-images と異なり modal ではないので少し追加実装が必要そうなのと、react-responsive-carousel もメンテナンスがされていないため、自前実装という方針もあると思っています。
そもそも carousel が必要かどうかの検討も必要かもですが、carousel の実装は、別ストーリーに切り出した方が良いと思っています。
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.
@yuki-takei ご判断お願いします。
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.
この PR からはスコープは外して別ストーリーでよいです。
イメージを小さく表示すると carousel ほしいなあって思うはず…
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.
了解です。
https://redmine.weseek.co.jp/issues/121095
ストーリー作成し、README の carousel の説明部分をコメントアウトしました。
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.
検討の結果もし Image Carousel 廃止する場合は README の更新もお願いします。
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.
GROWI 内のコードには、IAttachment & HasObjectId と書かれている箇所があるから、IAttachmentHasIdを使用するように改修します。
ただし、それは別のストーリーでほかの誰かにやってもらいます。
let message; | ||
|
||
if (refsContext.options?.prefix != null) { | ||
message = `${refsContext.options.prefix} and descendant pages have no attachments`; | ||
} | ||
else { | ||
message = `${refsContext.pagePath} has no attachments`; | ||
} |
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.
条件演算子を使ってもいいと思いました。例えば、
const message = refsContext.options?.prefix != null ? `${refsContext.options.prefix} and descendant pages have no attachments` : `${refsContext.pagePath} has no attachments`
* 1. when 'fileFormat' is image, render Attachment as an image | ||
* 2. when 'fileFormat' is not image, render Attachment as an Attachment component | ||
*/ | ||
// TODO: implement image carousel modal without using react-images |
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.
@yuki-takei ご判断お願いします。
* 1. when 'fileFormat' is image, render Attachment as an image | ||
* 2. when 'fileFormat' is not image, render Attachment as an Attachment component | ||
*/ | ||
// TODO: implement image carousel modal without using react-images |
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.
この PR からはスコープは外して別ストーリーでよいです。
イメージを小さく表示すると carousel ほしいなあって思うはず…
reg-suit detected visual differences. Check this report, and review them. 🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴 🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵 What do the circles mean?The number of circles represent the number of changed images.🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items How can I change the check status?If reviewers approve this PR, the reg context status will be green automatically. |
review task
https://redmine.weseek.co.jp/issues/120918
概要
plugin-attachment-refs を以下のように実装し直し
備考