Slightly improve the media experience #452

Unito
elegaanz ha unito 5 commit da better-media a master 5 anni fa
elegaanz 5 anni fa ha commentato (Migrato da 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 anni fa ha commentato (Migrato da 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 revisionato 5 anni fa
trinity-1686a lascia un commento
Proprietario

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 revisionato 5 anni fa
trinity-1686a 5 anni fa ha commentato
Proprietario

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 revisionato 5 anni fa
trinity-1686a 5 anni fa ha commentato
Proprietario

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
trinity-1686a 5 anni fa ha commentato
Proprietario

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
trinity-1686a 5 anni fa ha commentato
Proprietario

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)))
trinity-1686a 5 anni fa ha commentato
Proprietario

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 hanno approvato queste modifiche 5 anni fa
trinity-1686a lascia un commento
Proprietario

👍

:+1:

Revisori

trinity-1686a hanno approvato queste modifiche 5 anni fa
La pull request è stata unita come eff2698664.
Puoi anche visualizzare le istruzioni da riga di comando.

Passo 1:

Dal repository del tuo progetto, fai il check out di un nuovo branch e verifica le modifiche.
git checkout -b better-media master
git pull origin better-media

Passo 2:

Fai il merge delle modifiche e aggiorna su Forgejo.
git checkout master
git merge --no-ff better-media
git push origin master
Effettua l'accesso per partecipare alla conversazione.
Nessun revisore
Nessuna milestone
Nessuna assegnatario
2 Partecipanti
Notifiche
Data di scadenza
La data di scadenza non è valida o fuori intervallo. Si prega di utilizzare il formato 'aaaa-mm-dd'.

Nessuna data di scadenza impostata.

Dipendenze

Nessuna dipendenza impostata.

Riferimento: Plume/Plume#452
Caricamento…
Non ci sono ancora contenuti.