Code Monkey home page Code Monkey logo

s2's Issues

框选的逻辑是不是可以优化下

image

image

鼠标拖动框选多个cell时,这样计算会比较耗费性能,最好是计算startCell和endCell的index,然后再处理数据。

另外selectedCells是不是用二维数组表示更好

组件层改造

  • 组件层抽离到单独的 子包 @s2/react

    • 交叉表
    • 明细表
  • core 层 透出 event 整理, 是否需要全量透出到 组件层?

  • 组件层公共hook抽取

v 0.1.0 TODO List

💥 基础第一版本交叉表 (due:2021/03/31)

------------------ todo list -----------------------------

  • ✨ feat: AntV主题官网接入 @缨缨

  • 🔧 chore: 工程化(升级webpack5)@缨缨

  • 🔧 chore: 升级g4.0 @哦豁

  • ♻️ refactor: tooltip重构 @蒺藜

  • ♻️ refactor: interaction重构 @茂松

  • ✨ feat: Scrollbar整体优化 @卿珂

  • ✨ feat: 高清屏模糊优化 (多屏切换, 页面缩放) @卿珂

✨ feat: 列宽的适配规则(自适应+计算方式) @卿珂

  • ✨ feat: 做减法 - 去掉自定义行头的设计(后续版本考虑) @哦豁

  • ✨ feat: 下钻组件 @缨缨

  • ✨ feat: 导出组件 @缨缨

  • ✨ feat: 分页组件 @缨缨

去除standardData相关逻辑和参数

image

目前的数据转化逻辑存在standardTransform和multiValueTransform两种模式。理论上来说底表只需要确定好一种规范,让使用者遵守即可,需要看下是否有必要保留两种情况,如果无可以将相关逻辑和参数都移除

明细表 Select 交互需求和实现讨论

目前明细表(Dataphin)这边有几个需求,和 Cell 选中态相关:

  1. 通过 API 设置某个格子为选中态
  2. 如果格子不在可视区,可以移动滚动位置让格子可见,类似一个 focus 的效果。
  3. 选中全部格子的能力(常用的 Command + A 然后 Command + C 复制的交互)
  4. 进阶需求:选中一个格子之后按住 Command 多选,全选后按住 Command 反选
  5. 选中不可见区域格子的能力,比如现在冻结行的情况下,滚动一段,然后从冻结的行往下框选,中间一段不可见的行是不会被选中的

这些零碎的需求,总结一下,对能力上的要求有两方面:

  • Select 状态下,可以指定任意的格子被选中,不管是否可见
  • 新增一个 Select All 的状态,可以指定哪些格子不被选中(因为全选情况下去存储不选中的格子空间占用更小)

这都要求目前 InteractionStateInfo 中增加一个表示 被选中/未选中 Cell Id 的数组。和现在直接存储 Cell 实例相比,存储 id 让当前不可见,没有 Cell 实例的格子也可以被选中。

在 Cell 的 update 方法中,在 Select 状态下,可以用 id 去匹配是否被选中。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.