Skip to content

モバイル版のDojo一覧を地域ごとにアコーディオンにまとめるようにする #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 10, 2017

Conversation

zephiransas
Copy link
Contributor

close #174

@@ -33,6 +33,8 @@ gem 'faraday_middleware', '0.10'

gem 'koala'

gem 'rack-user_agent'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ページを参照している端末が、スマホかそうでないかの判定に使用します

</li>
<% end %>
</ul>
<% if request.from_smartphone? %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここでUA判定をおこない、スマホのときはアコーディオンで表示。そうでない場合は従来と同じviewをrenderします。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/coderdojo-japan/coderdojo.jp/pull/188/files#diff-55c5b7aecfb519d0e4880eaf2788eb6eR22

request.variantを設定しているので、こちらを使ってテンプレートの出し分けをするほうがシンプルかなと思いましたがどうでしょうか?
cf: https://railsguides.jp/4_1_release_notes.html#action-pack-variant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

つまりhome.html.erbを、PC用とスマホ用の2つ準備するイメージでしょうか? 🤔
今のところ一部だけなので、そこまでの切り分けは不要かなーと考えています。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nalabjp
あー・・・なんとなくわかりました 😅
ifで分けるのではなく、_dojos.html+phone.erb_dojo.html.erbにするイメージでしょうか?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ifで分けるのではなく、_dojos.html+phone.erbと_dojo.html.erbにするイメージでしょうか?

👍
はい、partialで分けてしまうと条件判定が不要になるのでテンプレート的にも良さそうかなと思いました😌(なるべくviewにはロジックを置きたくないなーと)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

断然その通りですねー! 😄
修正します!

@yasulab
Copy link
Member

yasulab commented Nov 7, 2017

おぉ...!! 素早いPRありがとうございます 😸
後ほど拝見しますね 👀

@yasulab yasulab requested review from yasulab and nalabjp November 7, 2017 06:58
@@ -9,7 +9,7 @@
</section>

<section class="introduction text-center list">
<p>CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では<%= Dojo::NUM_OF_COUNTRIES %>カ国・<%= Dojo::NUM_OF_WHOLE_DOJOS %>の道場、日本では全国に<b><%= @dojos.count %></b>以上の道場があります。これまでに<b><%= Dojo::NUM_OF_WHOLE_EVENTS %></b>回以上のイベントが開催されました。</p>
<p>CoderDojo は7〜17歳の子どもを対象にしたプログラミング道場です。2011年にアイルランドで始まり、世界では<%= Dojo::NUM_OF_COUNTRIES %>カ国・<%= Dojo::NUM_OF_WHOLE_DOJOS %>の道場、日本では全国に<b><%= @dojo_count %></b>以上の道場があります。これまでに<b><%= Dojo::NUM_OF_WHOLE_EVENTS %></b>回以上のイベントが開催されました。</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dojo.count -> @dojo_count 👍

Copy link
Member

@nalabjp nalabjp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UI変更のbefore -> afterを確認したいですね。(スクショ比較)
デザイン的な確認と、pc版のオーダーが変わっていないかどうか、あたりを 👀

@zephiransas
Copy link
Contributor Author

UI変更のbefore -> afterを確認したいですね。(スクショ比較)

PC版

変えていないので、従来のままですー
screen shot 2017-11-07 at 16 57 56

モバイル版

before

screen shot 2017-11-07 at 16 58 55

after

screen shot 2017-11-07 at 16 56 18

screen shot 2017-11-07 at 16 56 35

@yasulab
Copy link
Member

yasulab commented Nov 7, 2017

おー、スクリーンショットありがとうございます! 😸 ✨

「ここはタップできるよ!」という演出 (ボタンっぽさの演出?) がなにか出せると良いのかなぁと考えているんですが、何かアイデアありませんか? 🤔💭 > @himajin315 @nanophate

screen shot 2017-11-07 at 17 10 47

@himajin315
Copy link

ぱっと思いついたのは>を追加することですかね。
group 2

@zephiransas
Copy link
Contributor Author

「ここはタップできるよ!」という演出 (ボタンっぽさの演出?) がなんとか出せると良いのかなぁと考えているんですが、何かアイデアありませんか?

自分もキャレットを追加するのがいいかなと思いました。

ref: https://www.bootply.com/89084

これはプラスマイナスですが、格納時には右向きキャレット、展開時は下向きキャレットのイメージです。

@himajin315
Copy link

あとは単純にボタンっぽくにするとかですかね。
group_bottom

@yasulab
Copy link
Member

yasulab commented Nov 7, 2017

.oO(himajin315さんの仕事が早い...!! 💨 ✨)

@yasulab
Copy link
Member

yasulab commented Nov 7, 2017

文言に関してはちょっと考えたいですね。短い文言で伝えられたらなと考えています。例えば「四国 - 2 Dojos」や「四国 - 2 道場」のような感じです🤔💭

@nanophate
Copy link
Member

nanophate commented Nov 7, 2017

badgeを利用すると件数を書かなくてもても伝わりそうですね。
でも、これだとaccordionよりかはボタンよりになりそう💦
screen shot 2017-11-07 at 17 47 42

https://propeller.in/components/badge.php

@zephiransas
Copy link
Contributor Author

以下の変更をおこないました 😸

  • キャレットを追加
  • 「Dojoがあります」 -> 「Dojos」に変更

screen shot 2017-11-09 at 11 23 36

screen shot 2017-11-09 at 11 23 48

@yasulab
Copy link
Member

yasulab commented Nov 10, 2017

おー、PRの修正ありがとうございます! 😸 まずはこちらのキャレット案でデプロイしてみましょう! 🚀 ✨

マージしちゃいますね ;) 🔧 💨

@yasulab yasulab merged commit 667ebe7 into coderdojo-japan:master Nov 10, 2017
@yasulab
Copy link
Member

yasulab commented Nov 10, 2017

あ、マージした後に気づいたんですが、アコーディオンを開いた後にといると、下線が残ってしまいますね >< 💦 こちらは別の Issue にまとめておきました! #196

「近畿」を開いて閉じた結果

img_8761

@togazo
Copy link
Contributor

togazo commented Nov 16, 2017

すみません。あまり技術的なこととは関係がないのですが…これ、なんで中部が関東より先なんでしょう…いえ、なんとなく政府が出している統計データなども踏まえて一般的に北海道・東北・関東・中部…の順では…というところで、関東と中部の情報を見ようとして上下逆で迷子になりまして…

@zephiransas zephiransas deleted the feature-accordion branch November 16, 2017 13:39
@yasulab
Copy link
Member

yasulab commented Nov 17, 2017

@togazo お、たぶん僕が適当に並べちゃっていて、 zephiransas さんはそれに合わせていただいた感じですね 😅 この Issue/PR とは関係ないトピックなので、別の Issue として書き出してもらって良いですか? 🤔

@nalabjp
Copy link
Member

nalabjp commented Nov 18, 2017

#201 に書き出しておきました😉

@yasulab
Copy link
Member

yasulab commented Nov 18, 2017

ありがとうございます! 😸

@togazo
Copy link
Contributor

togazo commented Nov 19, 2017

@yasulab @nalabjp ありがとうございます!

@yasulab yasulab mentioned this pull request Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

モバイル版の「全国の道場」の表示方法を改善する
6 participants