Mayumi-Nakabayashi / withTone

2 stars 0 forks source link

Create content page #40

Closed y129may9th closed 1 year ago

y129may9th commented 1 year ago

FIgma

やったこと

やっていないこと

みてほしいです

キャプチャ

メモ

sodateya commented 1 year ago

PageViewではなくListViewを横にスライドしていくのはどうでしょうか?

 SizedBox(
            height: 195,
            child: ListView(
              scrollDirection: Axis.horizontal,
              children: articleList
                  .map(
                    (item) => ArticleCard(
                      imagePath: item['imagePath'],
                      title: item['title'],
                      timestamp: item['timestamp'],
                      width: MediaQuery.of(context).size.width * 0.4,
                    ),
                  )
                  .toList(),
            ),
          ),

class ArticleCard extends StatelessWidget {
  const ArticleCard(
      {super.key,
      required this.imagePath,
      required this.title,
      required this.timestamp,
      this.onPressed, // TODO: 遷移の実装はまだです
      required this.width});

  final String imagePath;
  final String title;
  final String timestamp;
  final VoidCallback? onPressed;
  final double width;

  @override
  Widget build(BuildContext context) {
    return Card(
      elevation: 0.1,
      child: SizedBox(
        width: width,
        child: Padding(
          padding: const EdgeInsets.only(
              right: 9.5, left: 9.5, top: 9.6, bottom: 7.7),

こんな感じにしして、ArticleCardに幅を指定して見るのはどうでしょう?
 ただこの方法だとPageViewみたいにコンテンツを見やすいように止めてくれないのでちょっと検討かもしれません...
 実現したいニュアンスと違いましたら申し訳ありません!

ken-ty commented 1 year ago

放置しちゃっていてごめんなさい! 🙏 今から見ますね!

y129may9th commented 1 year ago

https://github.com/Mayumi-Nakabayashi/withTone/pull/40#issuecomment-1714046723 @ken-ty いえいえー!ありがとうございます!ちょうどいま ListView の修正試しているとこでしたので、明日とかでも大丈夫ですので〜🙏🏻 また修正後のレビュー依頼を Slack で投げます!

ken-ty commented 1 year ago

全然後で対応すれば良いんですが、タグが多いと突き抜けてレンダリングエラーが発生しますね。 スクリーンショット 2023-09-12 8 18 25

TextOverflow.ellipsis などで解決しそうです。

ken-ty commented 1 year ago

次PR以降でフローティングボタンを配置した時、画面下半分のリストの見え方が気になりました。 このPRマージした後の定例MTGとかに @Mayumi-Nakabayashi とデザインの確認できればと 🙏 (今回の修正する箇所の指摘ではないです)

Mayumi-Nakabayashi commented 1 year ago

@ken-ty 承知いたしました!

y129may9th commented 1 year ago

https://github.com/Mayumi-Nakabayashi/withTone/pull/40#issuecomment-1714728513 @ken-ty ありがとうございます!TextOverflow.ellipsis で対応しました! fbd5acb

before after
Simulator Screenshot - iPhone 14 Pro - 2023-09-12 at 16 29 48 Simulator Screenshot - iPhone 14 Pro - 2023-09-12 at 16 27 40
y129may9th commented 1 year ago

https://github.com/Mayumi-Nakabayashi/withTone/pull/40#issuecomment-1714731509

次PR以降でフローティングボタンを配置した時、画面下半分のリストの見え方が気になりました。

@ken-ty たしかにですね〜ありがとうございます!

@Mayumi-Nakabayashi ちょっとボタン配置したバージョンを作ってみますので、それ見ながらご相談させてください!

Mayumi-Nakabayashi commented 1 year ago

@y129may9th 承知いたしました、ありがとう〜!

y129may9th commented 1 year ago

https://github.com/Mayumi-Nakabayashi/withTone/pull/40#issuecomment-1709350425 @sodateya アドバイスありがとうございましたー!ListView でできました🙌🏻 ede9216

yuuya-1205 commented 1 year ago

みんなとのやりとり見てるだけで勉強になるわー! コメントのやりとりパクりまーす!笑