Add some feedback when performing some actions #552

マージ済み
elegaanz が 7 個のコミットを action-feedback から master へマージ 5年前
elegaanz がコメント 5年前 (github.comから移行)

Here is an example of what it looks like (this is just a test, in reality you can only have one of these messages at the same time):

Screenshot_2019-04-27 Plume unu ⋅ Plume

I don't know if there is a simpler way to do it. Also, I added msg: Option<FlashMessage> to almost all routes to be sure that if a message was present it would be rendered, but maybe it is not necessary and only make the code harder to read? And maybe msg should go in PlumeRocket as it is used almost everywhere?

Fixes #468

Here is an example of what it looks like (this is just a test, in reality you can only have one of these messages at the same time): ![Screenshot_2019-04-27 Plume unu ⋅ Plume](https://user-images.githubusercontent.com/16254623/56852089-77178700-690e-11e9-88fc-acb089b58fef.png) I don't know if there is a simpler way to do it. Also, I added `msg: Option<FlashMessage>` to almost all routes to be sure that if a message was present it would be rendered, but maybe it is not necessary and only make the code harder to read? And maybe `msg` should go in `PlumeRocket` as it is used almost everywhere? Fixes #468
codecov[bot] がコメント 5年前 (github.comから移行)

Codecov Report

Merging #552 into master will increase coverage by 0.02%.
The diff coverage is 5.12%.

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
+ Coverage   44.08%   44.11%   +0.02%     
==========================================
  Files          68       68              
  Lines        7937     7984      +47     
==========================================
+ Hits         3499     3522      +23     
- Misses       4438     4462      +24
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/552?src=pr&el=h1) Report > Merging [#552](https://codecov.io/gh/Plume-org/Plume/pull/552?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/787eb7f3992e43e7a149288f3378c90dd4fe4bf8?src=pr&el=desc) will **increase** coverage by `0.02%`. > The diff coverage is `5.12%`. ```diff @@ Coverage Diff @@ ## master #552 +/- ## ========================================== + Coverage 44.08% 44.11% +0.02% ========================================== Files 68 68 Lines 7937 7984 +47 ========================================== + Hits 3499 3522 +23 - Misses 4438 4462 +24 ```
trinity-1686a がコメント 5年前
オーナー

And maybe msg should go in PlumeRocket as it is used almost everywhere?

Considering how it must be everywhere, I think it can go in PlumeRocket, as well as in template BaseContext. Also BaseContext could implement From<PlumeRocket> so it is easier to build and reduce duplication

> And maybe `msg` should go in `PlumeRocket` as it is used almost everywhere? Considering how it must be everywhere, I think it can go in `PlumeRocket`, as well as in template `BaseContext`. Also `BaseContext` could implement `From<PlumeRocket>` so it is easier to build and reduce duplication
igalic (github.comから移行) がレビュー 5年前
igalic (github.comから移行) がコメント

maybe we should hold on committing the translations in such prs?

do then regularly elsewhere

maybe we should hold on committing the translations in such prs? do then regularly elsewhere
igalic (github.comから移行) がコメント 5年前

this is supposed to be

Ti nisi autor ovog(a?) bloga

but i just realised that fuzzy means it was auto translated…

this is supposed to be > Ti nisi autor ovog(a?) bloga but i just realised that fuzzy means it was auto translated…
elegaanz がコメント 5年前 (github.comから移行)

@igalic I don't really know… it is true it pollutes a little bit the diff, but at the same time it makes sense to have them with the change in the interface.

@igalic I don't really know… it is true it pollutes a little bit the diff, but at the same time it makes sense to have them with the change in the interface.
elegaanz (github.comから移行) がレビュー 5年前
elegaanz (github.comから移行) がコメント 5年前

Yes, it was auto-translated. Once it will be on Crowdin, you will be able to fix it. 😉

Yes, it was auto-translated. Once it will be on Crowdin, you will be able to fix it. :wink:
trinity-1686a がコメント 5年前
オーナー

I'd be to not pollute pr with this, and have something that autocommit the changes once a week, or after each merge

I'd be to not pollute pr with this, and have something that autocommit the changes once a week, or after each merge
trinity-1686a がレビュー 5年前
trinity-1686a がコメント
オーナー

👀

:eyes:
@ -17,0 +27,4 @@
&Connection,
&Catalog,
Option<User>,
Option<(String, String)>,
trinity-1686a がコメント 5年前
オーナー

why not implementing From<PlumeRocket> for Context? It will auto implement Into<Context> for PlumeRocket, and you should be able to use into() with no need to import this trait everywhere

why not implementing `From<PlumeRocket>` for Context? It will auto implement `Into<Context>` for PlumeRocket, and you should be able to use `into()` with no need to import this trait everywhere
elegaanz (github.comから移行) がレビュー 5年前
@ -17,0 +27,4 @@
&Connection,
&Catalog,
Option<User>,
Option<(String, String)>,
elegaanz (github.comから移行) がコメント 5年前

Because Rust is complaining about the fact that all the parameters of the trait comes from another crate, and that it could cause conflicts, while I don't think it can? 🤷‍♀️ But yeah, I tried it, and it doesn't work.

Because Rust is complaining about the fact that all the parameters of the trait comes from another crate, and that it could cause conflicts, while I don't think it can? :woman_shrugging: But yeah, I tried it, and it doesn't work.
trinity-1686a がレビュー 5年前
@ -17,0 +27,4 @@
&Connection,
&Catalog,
Option<User>,
Option<(String, String)>,
trinity-1686a がコメント 5年前
オーナー

ho, it's because BaseContext is not a true struct but a typedef to a tuple of basic types (in theory it could cause conflict, because the exact same trait can be implemented in plume-model, thus creating a conflict). This mean we can either convert BaseContext to be a true type, or implement Into in plume-models. I've tried the first one, but it requires some small but ugly changes so I'm not sure it would be better (you can take a look at the patch here)

ho, it's because BaseContext is not a true struct but a typedef to a tuple of basic types (in theory it could cause conflict, because the exact same trait can be implemented in plume-model, thus creating a conflict). This mean we can either convert BaseContext to be a true type, or implement Into in plume-models. I've tried the first one, but it requires some small but ugly changes so I'm not sure it would be better (you can take a look at the patch [here](https://framadrop.org/r/aXcBuKkLEW#rzbPsNSdq+XCFboTnRLdY8Qt3RNqqUYGgrnA8bfUoQQ=))
trinity-1686a が変更を承認 5年前
trinity-1686a がコメント
オーナー

👍

:+1:
elegaanz がコメント 5年前 (github.comから移行)

Do you want me to apply your patch before merging?

Do you want me to apply your patch before merging?
trinity-1686a がコメント 5年前
オーナー

It was just to show what I came up with, but having &(&rockets).into() everywhere is definitely worse than importing a trait

It was just to show what I came up with, but having `&(&rockets).into()` everywhere is definitely worse than importing a trait

レビューア

trinity-1686a が変更を承認 5年前
プルリクエストは 8f1ab3485e でマージされています。
コマンドラインの手順も確認できます。

ステップ 1:

あなたのプロジェクトリポジトリで新しいブランチをチェックアウトし、変更内容をテストします。
git checkout -b action-feedback master
git pull origin action-feedback

ステップ 2:

変更内容をマージして、Forgejoに反映します。
git checkout master
git merge --no-ff action-feedback
git push origin master
サインインしてこの会話に参加。
レビューアなし
マイルストーンなし
担当者なし
2 人の参加者
通知
期日
期日が正しくないか範囲を超えています。 'yyyy-mm-dd' の形式で入力してください。

期日は未設定です。

依存関係

依存関係が設定されていません。

リファレンス: Plume/Plume#552
読み込み中…
まだ内容がありません