Slightly improve the media experience #452

已合併
elegaanz 將 5 次提交從 better-media 合併至 master 5 年前
elegaanz 已留言 5 年前 (已從 github.com 遷移)
  • Use a grid to display the list of media
  • Add icons for non-image media preview
  • Paginate the gallery
  • Add links to the gallery in the editor and in the profile settings to make it more discoverable when you need it

Here are some screenshots:

screenshot_2019-02-26 vos medias plume
screenshot_2019-02-26 nouvel article plume
screenshot_2019-02-26 modifier votre compte plume

Fixes #432

- Use a grid to display the list of media - Add icons for non-image media preview - Paginate the gallery - Add links to the gallery in the editor and in the profile settings to make it more discoverable when you need it Here are some screenshots: ![screenshot_2019-02-26 vos medias plume](https://user-images.githubusercontent.com/16254623/53444828-70a08800-3a0f-11e9-97ee-a7a265287623.png) ![screenshot_2019-02-26 nouvel article plume](https://user-images.githubusercontent.com/16254623/53444832-74cca580-3a0f-11e9-9f9a-29460480ec24.png) ![screenshot_2019-02-26 modifier votre compte plume](https://user-images.githubusercontent.com/16254623/53444842-7bf3b380-3a0f-11e9-82d9-fbfd06b3f753.png) Fixes #432
codecov[bot] 已留言 5 年前 (已從 github.com 遷移)

Codecov Report

Merging #452 into master will increase coverage by 1%.
The diff coverage is 19.64%.

@@            Coverage Diff            @@
##           master     #452     +/-   ##
=========================================
+ Coverage   25.73%   26.74%     +1%     
=========================================
  Files          63       64      +1     
  Lines        6150     7223   +1073     
=========================================
+ Hits         1583     1932    +349     
- Misses       4567     5291    +724
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/452?src=pr&el=h1) Report > Merging [#452](https://codecov.io/gh/Plume-org/Plume/pull/452?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/e28371bbe4bda5d338ae453a1fbe198f3dc74071?src=pr&el=desc) will **increase** coverage by `1%`. > The diff coverage is `19.64%`. ```diff @@ Coverage Diff @@ ## master #452 +/- ## ========================================= + Coverage 25.73% 26.74% +1% ========================================= Files 63 64 +1 Lines 6150 7223 +1073 ========================================= + Hits 1583 1932 +349 - Misses 4567 5291 +724 ```
trinity-1686a 已審核 5 年前
trinity-1686a 留下了回應
擁有者

It feel a bit odd there are nice pictures for non image files on /media, but not on /media/<id> , otherwise this is all good

It feel a bit odd there are nice pictures for non image files on `/media`, but not on `/media/<id>` , otherwise this is all good
trinity-1686a 已審核 5 年前
擁有者

I'm not a big fan off allowing custom class, peoples could inject div/a with the right classes to mess up the interface. I'd prefer maybe an "unsafe" (not necessary in the sens of rust's unsafe) builder for SafeString, with the contract that things put in it must already be trusted

I'm not a big fan off allowing custom class, peoples could inject div/a with the right classes to mess up the interface. I'd prefer maybe an "unsafe" (not necessary in the sens of rust's unsafe) builder for SafeString, with the contract that things put in it must already be trusted
trinity-1686a 已審核 5 年前
擁有者

the alt and title can't be trusted (and trusted is unnecessary here) they are actually escaped, but url might be partially untrusted

~~the alt and title can't be trusted (and trusted is unnecessary here)~~ they are actually escaped, but url might be partially untrusted
擁有者

title can't be trusted. I don't know how to handle this one. Maybe have some way of concatenating SafeString, and do concat(trusted("<div></div>"),new("<audio/>"))
title is actually escaped, but url might be partially untrusted atm

~~title can't be trusted. I don't know how to handle this one. Maybe have some way of concatenating SafeString, and do `concat(trusted("<div></div>"),new("<audio/>"))`~~ title is actually escaped, but url might be partially untrusted atm
擁有者

title can't be trusted (and would be unnecessary here if we keep video/audio allowed)
title is actually escaped, but url might be partially untrusted atm

~~title can't be trusted (and would be unnecessary here if we keep video/audio allowed)~~ title is actually escaped, but url might be partially untrusted atm
@ -22,3 +22,3 @@
.add_tags(iter::once("iframe"))
.add_tags(&[ "iframe", "video", "audio" ])
.id_prefix(Some("postcontent-"))
.url_relative(UrlRelative::Custom(Box::new(url_add_prefix)))
擁有者

I think we should keep video and audio tags, So that people can insert media content in their posts

I think we should keep video and audio tags, So that people can insert media content in their posts
trinity-1686a 核可了這些變更 5 年前
trinity-1686a 留下了回應
擁有者

👍

:+1:

審核者

trinity-1686a 核可了這些變更 5 年前
此合併請求已被合併為 eff2698664
您也可以查看命令列指南

第一步:

在您的儲存庫中切換到新分支並測試變更。
git checkout -b better-media master
git pull origin better-media

第二步:

合併變更並更新到 Forgejo。
git checkout master
git merge --no-ff better-media
git push origin master
登入 才能加入這對話。
沒有審核者
未選擇里程碑
沒有負責人
2 參與者
通知
截止日期
截止日期無效或超出範圍,請使用「yyyy-mm-dd」的格式。

未設定截止日期。

先決條件

未設定先決條件。

參考: Plume/Plume#452
載入中…
尚未有任何內容