PR

自分の前後のランキングを表示(天下無双) #687

iwamoto opened this at 2021-03-22T18:31:20; closed

Description

opened by iwamoto at 2021-03-22T18:31:20; updated 2024-03-19T14:50:51

[天下無双]自分の前後のランキングを表示 #670

iwamoto change_title at 2021-03-24T18:41:22: [WIP]自分の前後のランキングを表示(天下無双) 自分の前後のランキングを表示(天下無双)

Comment

#9941 by iwamoto at 2021-03-25T12:08:05; updated 2021-03-25T12:08:05

@kouho @wada

コードレビューをお願い致します。
レイアウトに関してはあくまで仮になります。

iwamoto add_label at 2021-03-25T12:08:16: レビュー待ち

Comment

#9950 by wada at 2021-03-25T13:24:08; updated 2021-03-25T13:24:08

@iwamoto
ランキングデータ作成する時って
・user_event_pt
・user_info
にデータを入れて、event_ranking_event_battle.incを実行してら良い?

Comment

#9951 by iwamoto at 2021-03-25T13:39:09; updated 2021-03-25T13:39:09

@wada
あ、すみません
そのあたり記載なかったですね。

はい、それで大丈夫です

Comment

#9954 by wada at 2021-03-25T15:04:01; updated 2021-03-25T15:04:01

@iwamoto
確認しました。動作は問題なさそうです。
自分の色は、他のランキングと同じ黄色の背景色が良いかなと思います。※スクショ参照
background-image:-webkit-gradient(linear,left top,left bottom,from(#ffef99),to(#ffd700));

上位

!スクリーンショット 2021-03-25 14

51位以降

!スクリーンショット 2021-03-25 14

Comment

#9955 by iwamoto at 2021-03-25T15:33:05; updated 2021-03-25T15:33:05

@wada
承知しました。そちらで修正対応を行います。

Comment

#9964 by kouho at 2021-03-25T16:37:09; updated 2021-03-25T16:37:09

@iwamoto @wada
すみません、いまいちよく分からずどういった動作になれば正と判断できるのでしょうか?

Comment

#9965 by wada at 2021-03-25T16:44:37; updated 2021-03-25T16:49:24

@kouho
僕の試した方法ですが、

1. 前回の天下無双のイベントptデータとユーザデータをローカルのdbにinsert(自分のuser_noとバッティングしないように注意)
user_event_pt.sql
user_info.sql
2. 自分のuser_event_pt.event_ptを確認したい順位あたりのポイント数量に変更
3. ランキングバッチを実行
ランキングデータが入り、自分の順位が圏外でなければ自分の順位ボタンが表示されます。

docker-compose exec web bash
cd /home/web/jr-web/lib/exec
ENVIRONMENT=develop PF=yamada HTTP_HOST=127.0.0.1 IS_DOCKER=true php event_ranking_event_battle.inc

4. 1ページ目の順位、ヘッダーの変わっている順位、51位以降の順位をそれぞれ確認
(目的の順位に応じてuser_even_pt.event_ptを調整)
UIや自分の順位、TOPへ戻るボタンの挙動などを確認

これで、自分の順位ボタンから自分が表示されているページへ飛べて、自分の順位の上下に他のユーザーがいれば要件は満たしていると思います。

Comment

#9966 by kouho at 2021-03-25T16:50:35; updated 2021-03-25T16:50:35

@wada
共有ありがとうございます。試してみます。

Comment

#9970 by kouho at 2021-03-25T17:27:01; updated 2021-03-25T17:27:01

@iwamoto
こちらでも確認しました。動作上の問題はないかと思います。

Comment

#9971 by wada at 2021-03-25T17:38:40; updated 2021-03-25T17:38:40

@iwamoto
使い勝手の問題ですが、以下は時間があれば対応お願いしたいです。
・ランキングTOPのリンクは、自分の順位関係なく、2ページ以降常に表示して欲しい
・自分の順位ページに遷移した後、ページャーのボタンで戻ると上位ページが見えなくなることがある(自分の順位ページに遷移するとページングの位置がずれるため)

Comment

#9981 by iwamoto at 2021-03-25T19:41:35; updated 2021-03-25T19:41:35

@wada
・自分の背景色変更
・TOPリンクの修正
こちらは対応しました。

ページャーの件は承知しています。
ページャーで戻る先が20位より下の場合は戻れなくなります。
ただ、20位より下はランキングTOPより確認できます。
(TOPリンクを修正したので、大丈夫ではないかとも考えますが…)

Comment

#9984 by wada at 2021-03-26T10:05:19; updated 2021-03-26T10:05:19

@iwamoto
修正内容確認しました。OKです。
ページャーはこのままでも大丈夫です。

実装前に仕様を固めてなかったのが問題でしたね。すんません。

wada add_label at 2021-03-26T10:05:23: 和田 LGTM
kouho add_label at 2021-03-26T10:16:50: 岩本 LGTM
kouho delete_label at 2021-03-26T10:17:13: 岩本 LGTM
kouho add_label at 2021-03-26T10:17:14: 皇甫 LGTM
iwamoto merge at 2021-03-26T11:16:28: 自分の前後のランキングを表示(天下無双)
iwamoto close at 2021-03-26T11:16:28: Close

Commit range

base4f745faf7379525299595a2368818a1e3b86c9f6
head3de8fa1840b790ad8796c1fac4d750bf430ef969
base branchjolly/jr-web:develop
head branchjolly/jr-web:battle_ranking_670

View commits

Commit details are loaded from Git when a dynamic archive server is running, or can be embedded with --include-commits.
Files changed2 filesView patch
statusfile
modifiedlib/public/Ranking-Event.inc
modifiedpublic_html/template/Ranking-Event.tpl
Patch body is stored as a separate file to keep this page lightweight.