Article cover #299

Birleştirildi
elegaanz 6 yıl önce article-cover içindeki 8 işlemeyi master ile birleştirdi
elegaanz 6 yıl önce yorum yaptı (github.com konumundan göç edildi)

Screenshots:

On the article page

On the home page

Fixes #236

Screenshots: ![On the article page](https://social.wxcafe.net/system/media_attachments/files/001/270/277/original/2cd574456e31d710.png?1540982197) ![On the home page](https://social.wxcafe.net/system/media_attachments/files/001/270/278/original/adaec1bcbc0ff751.png?1540982220) Fixes #236
elegaanz 6 yıl önce yorum yaptı (github.com konumundan göç edildi)

I'm not 100% satisfied with the cover selector (a <select> field listing your media) but if we want to have a JavaScript-free implementation and to avoid duplicating the media upload form, I don't see any better solution. 🤷‍♀️

I'm not 100% satisfied with the cover selector (a `<select>` field listing your media) but if we want to have a JavaScript-free implementation and to avoid duplicating the media upload form, I don't see any better solution. :woman_shrugging:
trinity-1686a 6 yıl önce incelendi
trinity-1686a bir yorum yaptı
Sahibi

I'm getting an error when accessing the page to create a new post, however only when I have at least one media uploaded with that account, and there is no issue with /~/<blog>/<slug>/edit

GET /~/Yoloswagg/new/ text/html:
    => Matched: GET /~/<blog>/new (new)
    => Error: Error rendering Tera template 'posts/new'.
    => Error: Failed to render 'posts/new'
    => Error: Variable `form.cover` not found in context while rendering 'posts/new'
    => Error: Template 'posts/new' failed to render.
    => Outcome: Failure
    => Warning: Responding with 500 Internal Server Error catcher.
    => Response succeeded.

About the cover selector, to be frank I don't really like how medias works currently, it feels strange to go to /medias/ to change your avatar. It feels strange too to upload medias on a page different than the one where you write your posts (which will hopefully be better when we start working on a rich text editor), and choosing from a <select> what media will be the cover feels the same, maybe even worth for peoples having a lot of uploaded medias as the time goes. It can stay like that for the moment, but we will need to address this in the future.
Also make me through of one thing : while it's using a <select>, you should filter to only show images, not audio content for example (actually the same goes for peoples avatar, currently they can be an audio file)

I'm getting an error when accessing the page to create a new post, however only when I have at least one media uploaded with that account, and there is no issue with `/~/<blog>/<slug>/edit` ``` GET /~/Yoloswagg/new/ text/html: => Matched: GET /~/<blog>/new (new) => Error: Error rendering Tera template 'posts/new'. => Error: Failed to render 'posts/new' => Error: Variable `form.cover` not found in context while rendering 'posts/new' => Error: Template 'posts/new' failed to render. => Outcome: Failure => Warning: Responding with 500 Internal Server Error catcher. => Response succeeded. ``` About the cover selector, to be frank I don't really like how medias works currently, it feels strange to go to /medias/<id> to change your avatar. It feels strange too to upload medias on a page different than the one where you write your posts (which will hopefully be better when we start working on a rich text editor), and choosing from a `<select>` what media will be the cover feels the same, maybe even worth for peoples having a lot of uploaded medias as the time goes. It can stay like that for the moment, but we will need to address this in the future. Also make me through of one thing : while it's using a `<select>`, you should filter to only show images, not audio content for example (actually the same goes for peoples avatar, currently they can be an audio file)
@ -633,0 +633,4 @@
#, fuzzy
msgid "Illustration"
msgstr "Administration"
Sahibi

wow fuzzy translation is so wrong

wow fuzzy translation is so wrong
elegaanz 6 yıl önce yorum yaptı (github.com konumundan göç edildi)

Yes, I agree the way media are currently working is not ideal. I think we can change it once will we will switch to a new editor, by adding the possibility to upload an avatar directly from the profile edition page, and to add any other media directly from the editor.

Yes, I agree the way media are currently working is not ideal. I think we can change it once will we will switch to a new editor, by adding the possibility to upload an avatar directly from the profile edition page, and to add any other media directly from the editor.
Sahibi

Anyway changing how we handle medias is neither the goal nor in the scope of this pr, so even if it's less than ideal, it shouldn't affect how we merge this pr (and actually making sure people are not using a song as a picture is not that important as in the end how they select those will be totally changed latter on)

Anyway changing how we handle medias is neither the goal nor in the scope of this pr, so even if it's less than ideal, it shouldn't affect how we merge this pr (and actually making sure people are not using a song as a picture is not that important as in the end how they select those will be totally changed latter on)
trinity-1686a 6 yıl önce incelendi
Sahibi

This is the exact line that is failing. I think you can't compare form.cover because form is null when creating a new article. if not form.cover (2 lines above) is legal as it verify the existence of the field, and its "nullness", but a compare only make sense if the field exist, it being null or not

This is the exact line that is failing. I think you can't compare `form.cover` because `form` is `null` when creating a new article. `if not form.cover` (2 lines above) is legal as it verify the existence of the field, and its "nullness", but a compare only make sense if the field exist, it being null or not
trinity-1686a 6 yıl önce incelendi
Sahibi

Those 3 println! were for debug only I guess, so they should be removed

Those 3 `println!` were for debug only I guess, so they should be removed
elegaanz (github.com konumundan göç edildi) 6 yıl önce incelendi
elegaanz (github.com konumundan göç edildi) 6 yıl önce yorum yaptı

Oops, you're right. 😬

Oops, you're right. :grimacing:
trinity-1686a 6 yıl önce bu değişiklikleri onayladı

Gözden Geçirenler

trinity-1686a 6 yıl önce bu değişiklikleri onayladı
Değişiklik isteği 25b7399e7f olarak birleştirildi.
komut satırı talimatlarını da görüntüleyebilirsiniz.

1. Adım:

Proje deponuzdan yeni bir dala göz atın ve değişiklikleri test edin.
git checkout -b article-cover master
git pull origin article-cover

2. Adım:

Forgejo'daki değişiklikleri ve güncellemeleri birleştirin.
git checkout master
git merge --no-ff article-cover
git push origin master
Bu konuşmaya katılmak için oturum aç.
Değerlendirici yok
Kilometre Taşı Yok
Atanan Kişi Yok
2 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: Plume/Plume#299
Yükleniyor…
Henüz bir içerik yok.