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

fix: improve activity context menu behavior #206

Merged
merged 1 commit into from
Jun 28, 2021
Merged

fix: improve activity context menu behavior #206

merged 1 commit into from
Jun 28, 2021

Conversation

mortalYoung
Copy link
Collaborator

简介

  • 修复 activitybar 修改项目的 visibility 时,顺序会发生改变的问题
  • 修复 contextMenu 修改项目的 visibility 后,contextMenu 的状态不会发生改变的问题
  • 优化 contextMenu 弹出的交互效果

主要变更

  • 由于之前 toggle 的时候,是用 remove add 的方式来实现的,重构掉之后依靠新增属性 hidden 来隐藏和显示
  • toggleBar 的时候,也需要一起 toggleContextMenuCheckStatus
  • 优化 activitybar 的菜单弹出的方式,在观察 vscode 的弹出方式之后,目前逻辑如下:
    • 如果右键点击的位置是 item 的位置,则渲染菜单的位置在该 item 的右下方
    • 如果右键点击的位置是 item 的位置,则菜单项的首项新增一条当前 item 项目,并且与其他项目用分割线隔开
    • 如果右键点击的位置不是 item 的位置,则在点击位置渲染菜单

@wewoor wewoor merged commit 20c191d into main Jun 28, 2021
@wewoor wewoor deleted the fix/activity branch June 28, 2021 08:21
@wewoor wewoor added this to the 0.9.0-alpha.3 milestone Jun 28, 2021
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.

2 participants