NativeScript / NativeScript/plugins

[nativescript-ui-listview] Upgrade from 10.0.0.1 to 14.2.4 breaks my list

未关闭
#355 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
206
派生
123
平均合并
2 天 1 小时
30 天内合并 PR
1

描述

This only happens on iOS. Android is fine. Items overlap after the upgrade.

On v10:
image

On v14
image

and the relevant code (note the issue occurs in the "pot" template):

<lv:RadListView class='event-list' row="1" height="100%" items="{{ list }}" itemTemplateSelector="{{ templateSelector }}">
        <lv:RadListView.listViewLayout>
          <lv:ListViewLinearLayout scrollDirection="Vertical" />
        </lv:RadListView.listViewLayout>
        <lv:RadListView.itemTemplates>
          <template key="promotion">
            <StackLayout class='promotion'>
              <Label text="{{  title  }}" class='title' textWrap='true' />
              <Label text="{{  description  }}" class='description' textWrap='true' />
            </StackLayout>
          </template>
          <template key="event">
            <StackLayout class="event">
              <Label col="1" class="event-name" textWrap="true">
                <FormattedString>
                  <Span text="{{name}}" />
                  <Span text=" - " />
                  <Span text="{{ humanDate(date) }}" />
                </FormattedString>
              </Label>
              <Label text="{{ 'Caller: ' + caller}}" class="event-caller" textWrap="true" />
              <Label text="{{times}}" class="event-times" textWrap="true" />
              <Label text="{{ other }}" class="event-other" visibility="{{ other ? 'visible' : 'collapsed' }}" textWrap="true" />
            </StackLayout>
          </template>
          <template key="pot">
            <StackLayout class="pot">
              <Label text="{{name}}" textWrap="true" />
              <Label class="playoff" textWrap="true" visibility="{{ playoffDate ? 'visible' : 'collapsed' }}">
                <FormattedString>
                  <span text="Playoff: " />
                  <span text="{{ humanDate(playoffDate) }}" />
                  <span text="{{ ' ' + playoffEvent }}" />
                  <span text="{{ formatPlayoffPrize(playoffPrize) }}" />
                </FormattedString>
              </Label>
              <Label class="info" text="{{info}}" textWrap="true" visibility="{{ info ? 'visible' : 'collapsed' }}" />
              <FlexboxLayout flexDirection="row" width="100%" justifyContent="space-between">
                <Repeater items="{{balls}}">
                  <Repeater.itemsLayout>
                    <StackLayout orientation="horizontal" />
                  </Repeater.itemsLayout>
                  <Repeater.itemTemplate>
                    <Image src="{{ `~/assets/images/balls-lettered/` + $value + `.png` }}" margin="10" height="50" visibility="{{ $value != '0' ? 'visible' : 'collapsed' }}" />
                  </Repeater.itemTemplate>
                </Repeater>
                <Label textAlignment="right" verticalAlignment="bottom" textWrap="true">
                  <FormattedString>
                    <Span text="{{numbers ? 'in ' + numbers + '#s or less ': ''}}" textWrap="true" textAlignment="right" />
                    <Span text="{{formatPrize(prize)}}" textAlignment="right" />
                  </FormattedString>
                </Label>
              </FlexboxLayout>
            </StackLayout>
          </template>
        </lv:RadListView.itemTemplates>


      </lv:RadListView>

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从提供的 RadListView 标记和 pot item template 开始,然后在比较 10.0.0.1 和 14.2.4 版本的同时,在 iOS 上重现重叠问题。跟踪列表布局和项目尺寸调整行为;当 pot items 在 iOS 上不再重叠,同时现有的 Android 行为保持不变时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios, typescript
领域
frontend, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。