Skip to content
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

Improve data snapshot comparison #8081

Closed
Tracked by #8055
88250 opened this issue Apr 22, 2023 · 38 comments
Closed
Tracked by #8055

Improve data snapshot comparison #8081

88250 opened this issue Apr 22, 2023 · 38 comments
Assignees
Milestone

Comments

@88250
Copy link
Member

88250 commented Apr 22, 2023

https://ld246.com/article/1682148754416

  • Support switching direction
  • Improve comparison algorithm
  • Add detail latest modification time for each file
@88250 88250 added this to the 2.8.6 milestone Apr 22, 2023
@88250 88250 removed their assignment Apr 22, 2023
@Zuoqiu-Yingyi
Copy link
Contributor

我提一个具体的方案: 通过箭头与快照建立时间明确指示快照对比时所站的视角

视角 指示视角的文本 更新 添加 删除
对比内容(默认) 2023-04-21 01:00:00 => 2023-04-22 01:00:00 左侧为较旧的快照
右侧为较新的快照
仅存在于较新快照的内容 仅存在于较旧快照的内容
准备回滚 2023-04-22 01:00:00 => 2023-04-21 01:00:00 左侧为较新的快照
右侧为较旧的快照
仅存在于较旧快照的内容 仅存在于较新快照的内容

@88250
Copy link
Member Author

88250 commented Apr 22, 2023

先加切换吧,加了应该就够用了,顺便把默认改为左侧为较新时间。

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Apr 22, 2023

先加切换吧,加了应该就够用了,顺便把默认改为左侧为较新时间。

目标是为了解决问题, 不是为了够用呀

不明确提示出快照对比时所站的视角, 那么仅把默认改为左侧为较新时间会更加反直觉的

而且这个解决方案也是通过移动 DOM 元素就能轻易实现的

@88250
Copy link
Member Author

88250 commented Apr 22, 2023

你指的是在顶部增加这个标识吗?

image

@Zuoqiu-Yingyi
Copy link
Contributor

你指的是在顶部增加这个标识吗?

image

是的, 中间的箭头可以设置为一个按钮, 点一下切换方向

@88250
Copy link
Member Author

88250 commented Apr 22, 2023

好的。

@88250 88250 changed the title Data snapshot comparison supports switching direction Improve data snapshot comparison Apr 22, 2023
@88250 88250 self-assigned this Apr 22, 2023
Vanessa219 added a commit that referenced this issue Apr 22, 2023
Vanessa219 added a commit that referenced this issue Apr 22, 2023
@88250 88250 closed this as completed Apr 22, 2023
@Zuoqiu-Yingyi
Copy link
Contributor

  1. 根据 2.8.6-dev2 的效果来看, 添加删除 列表的内容好像还是颠倒的👀

2023-04-15 02:392023-04-17 12:31 应该表示从 2023-04-15 02:392023-04-17 12:31 这一段时间更新了哪些内容, 添加了哪些内容, 删除了哪些内容

2023-04-17 12:312023-04-15 02:39 应该表示若从 2023-04-17 12:31 回滚到 2023-04-15 02:39 将更新哪些内容, 添加哪些内容, 删除哪些内容

image

  1. 中间的 按钮最好可以鼠标悬浮提示 交换对比方向, 不然可能用户会认为是回滚按钮导致不敢点击

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

  1. 没有颠倒,是按左右对比的
  2. 稍后添加

@Zuoqiu-Yingyi
Copy link
Contributor

  1. 没有颠倒,是按左右对比的

那么目前箭头具体的语义是什么,有点不太理解👀

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

左边相较于右边的 add/update/remove 差异

@zxhd863943427
Copy link
Contributor

左边相较于右边的 add/update/remove 差异

这个解释是说的通的,但是与用户的第一直觉不符合。 a => b 的含义,在我作为用户的第一印象是从 a 更新到 b 产生的变化,而不是 a 相较于 b 的 add/update/remove 差异

还是希望D大改一下图标,这种功能达到了,但是就是与用户第一印象相悖的感觉真的很怪异。

我敢断言,如果不改,那就是增加了第三方主题的负担:一大堆自定义主题将会以修改这个图标为己任。:)

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

你指的是改啥图标……

@zxhd863943427
Copy link
Contributor

图片

把这个图标改成反过来的:)

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

image

这里没有歧义吧。

@Zuoqiu-Yingyi
Copy link
Contributor

左边相较于右边的 add/update/remove 差异

除了常用 git 的人,一般人真的想不到这一层,箭头在这里大多数人都会认为是快照变更的方向而非指示以哪个快照为基础

@zxhd863943427
Copy link
Contributor

当然最好还是把
图片
反过来,毕竟日常还是习惯从左边更新到右边的表示,改了图标后,从右边更新到左边并不符合习惯。

只是改图标是两害择其轻罢了。

@zxhd863943427
Copy link
Contributor

左边相较于右边的 add/update/remove 差异

除了常用 git 的人,一般人真的想不到这一层,箭头在这里大多数人都会认为是快照变更的方向而非指示以哪个快照为基础

我日常使用git,也只是觉得这个解释可以理解,但还是接受不能。

@Zuoqiu-Yingyi
Copy link
Contributor

image

这里没有歧义吧。

更新一直都没有,添加与删除才有

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

反过来,毕竟日常还是习惯从左边更新到右边的表示,改了图标后,从右边更新到左边并不符合习惯。

之前就是反过来的啊,你看下 https://ld246.com/article/1682148754416 的讨论。

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

更新一直都没有,添加与删除才有

image

显示的是删除的文件,也没有歧义嘛。

新增的情况:

image

@Zuoqiu-Yingyi
Copy link
Contributor

之前就是反过来的啊,你看下 https://ld246.com/article/1682148754416 的讨论。

之前也是说新增与删除列表内容的是反的,更新预览面板的左右布局一直都没有问题

@Zuoqiu-Yingyi
Copy link
Contributor

image

显示的是删除的文件,也没有歧义嘛。

瞅瞅这张图片

image

用户迷惑为什么从15号到17号删除了 2023-04-17 这个文件,明明是17号新增了这个文件

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

你把旧版放在左边的话就是这样的,旧版对比新版是删除。我上面的截图切换方向对比:

image

@Zuoqiu-Yingyi
Copy link
Contributor

你把旧版放在左边的话就是这样的,旧版对比新版是删除。

问题在于用户不知道箭头表示 基于 的意思,而是根据常识理解为 由...到... 的意思,这就是歧义

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

那就还是箭头的问题,改成 ...

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Apr 23, 2023

那就还是箭头的问题,改成 ...

那更糟了,这下用户都不知道是啥东西了
按我的说法,将新增与删除列表内容调换一下就可以,不要在 基于 这方面下功夫了,用户没有经验的话无论如何都是 get 不到 基于 这层意思的👀

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

调换以后图看上去不对啊,还是上面的例子:

image

本来是新版新增的,调换以后如果放在删除里面,那么就变成新版本 -> 旧版本是删除了。

@Zuoqiu-Yingyi
Copy link
Contributor

调换以后图看上去不对啊,还是上面的例子,本来是新版新增的,调换以后放在删除里面了。

image

哪里不对了,普通用户看来新版本旧版本会删除新添加的文件,这是顺理成章&符合实际的

不要去想 基于

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

那看来确实是图标的问题,会让人理解为 由...到...,而不是 对比

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

改成文字 对比:trollface: 这样就一目了然了,也不用反过来看,直接就是 aaa 对比 bbb,update/add/remove 就是对比的结果。

@Zuoqiu-Yingyi
Copy link
Contributor

Zuoqiu-Yingyi commented Apr 23, 2023

改成文字 对比:trollface:

不好,箭头本来还有方向性的语义,对比方向性直接没有了

@88250
Copy link
Member Author

88250 commented Apr 23, 2023 via email

@Zuoqiu-Yingyi
Copy link
Contributor

→还有个问题是用户不知道可以点,改成 点击切换对比方向 应该是最优解了。

不要想当然,在 更新 的预览界面本身也包含有方向的时序信息,不会因为把箭头移除了就能消歧

@zxhd863943427
Copy link
Contributor

别啊,我觉得方向箭头就是挺好的,实在不行换个箭头方向就行了。

无论如何,“基于”的概念是不符合大多数用户的体验的,换成对比后,只是改把有方向的信息变成更模糊的信息了。

@Zuoqiu-Yingyi
Copy link
Contributor

最好还是参考我上面那张表格,是我以普通用户视角全面考虑的结果👀

@zxhd863943427
Copy link
Contributor

最好还是参考我上面那张表格,是我以普通用户视角全面考虑的结果👀

确实,我也认为这个合理。

@Aiviokoo
Copy link

最好还是参考我上面那张表格,是我以普通用户视角全面考虑的结果👀

赞同,我认为很合理,D大要是不放心,我们可以考虑去社区发个投票。

@88250
Copy link
Member Author

88250 commented Apr 23, 2023

那好吧,既然大家都这样认为,等会我再改改看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants