Skip to content

将数据库视图菜单中功能相同的「重命名」「设置」合并为「编辑视图」 #10956

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

Closed
wants to merge 2 commits into from

Conversation

TCOTC
Copy link
Contributor

@TCOTC TCOTC commented Apr 9, 2024

原来无论点击「重命名」还是「设置」,都会打开同一个浮窗,是相同的行为。

合并了会更直观,用户不需要思考点击哪一个,不需要做选择,直接点就行了。

原来的视觉路线:

  • 点击视图 → 看到重命名 → 我要重命名 → 点击重命名
  • 点击视图 → 看到重命名 → 我不是要重命名,我要…… → 看到设置 → 点击设置

修改之后:

  • 点击视图 → 看到编辑视图 → 我要重命名/…… → 点击编辑视图

image

关联 #10889

TCOTC added 2 commits April 9, 2024 18:22

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@TCOTC TCOTC changed the title 将数据库视图右键菜单「重命名」「设置」合并为「编辑视图」 将数据库视图菜单中功能相同的「重命名」「设置」合并为「编辑视图」 Apr 9, 2024
@TCOTC TCOTC marked this pull request as ready for review April 9, 2024 11:11
@TCOTC
Copy link
Contributor Author

TCOTC commented Apr 9, 2024

用了一晚上,感觉确实比原来舒服

@88250 88250 requested a review from Vanessa219 April 9, 2024 15:54
@Vanessa219
Copy link
Member

这个上次讨论了没说要改呀。这样用户可能找不到重命名的地方。

@TCOTC
Copy link
Contributor Author

TCOTC commented Apr 10, 2024

这个应该很直观啊,重命名的操作怎么想都肯定是点击编辑视图。

我在链滴发个投票看看:https://ld246.com/article/1712750829922

@TCOTC
Copy link
Contributor Author

TCOTC commented Apr 10, 2024

我在链滴发个投票看看:https://ld246.com/article/1712750829922

根据投票比例,想改的用户只能使用 CSS 代码片段实现了:

/* 将数据库视图菜单中功能相同的「重命名」「设置」合并为「编辑视图」 https://ld246.com/article/1712750829922?r=JeffreyChen */
#commonMenu[data-name="av-view"] > .b3-menu__items > .b3-menu__item:nth-child(1) > .b3-menu__label {
    position: relative; /* 让父元素相对定位 */
    color: #00000000; /* 原文本颜色变为透明 */
}
#commonMenu[data-name="av-view"] > .b3-menu__items > .b3-menu__item:nth-child(1) > .b3-menu__label::after {
    content: "编辑视图";
    position: absolute; /* 绝对定位 */
    left: 0;
    color: var(--b3-theme-on-background); /* 新文本颜色 */
    z-index: 1; /* 确保伪元素在原始文本之上 */
}
#commonMenu[data-name="av-view"] > .b3-menu__items > .b3-menu__item:nth-child(2),
#commonMenu[data-name="av-view"] > .b3-menu__items > .b3-menu__separator {
    display: none; /* 隐藏设置和分隔线 */
}

image

@TCOTC TCOTC closed this Apr 10, 2024
@Vanessa219
Copy link
Member

十分感谢

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.

None yet

2 participants