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

Review the Services #182

Closed
wewoor opened this issue Jun 17, 2021 · 2 comments
Closed

Review the Services #182

wewoor opened this issue Jun 17, 2021 · 2 comments
Assignees
Milestone

Comments

@wewoor
Copy link
Collaborator

wewoor commented Jun 17, 2021

我觉得这个讨论是有提醒到我的,#176 (comment)

togglePanelMaximized 本身更倾向是对 事件(Action) 本身对一种响应, Service 里面还是偏主动操作的抽象比较好;

我看了下,其他 Service 也有这种命名。后面统一再 Review 下 Service吧

Originally posted by @wewoor in #176 (comment)

@wewoor wewoor changed the title Service 方法 Review Review the Services Jun 22, 2021
@wewoor wewoor self-assigned this Jul 21, 2021
@wewoor wewoor added this to the 0.9.0-alpha.4 milestone Jul 22, 2021
@wewoor wewoor mentioned this issue Jul 23, 2021
9 tasks
@wewoor
Copy link
Collaborator Author

wewoor commented Jul 26, 2021

Services

Useless methods or the naming refactoring:

IActivityBarService #289

  • addBar -> add (支持单个/数组类型)
  • toggleContextMenuCheckStatus

ISidebarService

  • addPane -> add

IExplorerService #291

  • editPanel -> updatePanels

IFolderTreeService

  • getFileIconByExtensionName (useless?)
  • getRootFolderByRootId 如果是明确的 getRootFolder 接口,应该是不需要后面这段话的
  • onUpdateFileContent (useless?)
  • initTree (useless?)

IMenuBarService

  • addRootMenu 和 initiMenu 重叠,且命名 initiMenu -> initiMenus

INotificationService

  • showHideNotifications -> toggleNotification

IProblemsService

showHideProblems -> toggleProblems
移除常规增删改查方法的 Problems 后缀

ISearchService

  • 声明 Properties 成方法(Function)
  • 方法名重构

IStatusBarService

  • 重构 append 方法 (隐藏 left/right 逻辑)
  • 重构 remove 逻辑
  • updateItem -> update

参考

@mortalYoung
Copy link
Collaborator

IExplorerService

  1. deletePanel -> removePanel
  2. updateRender 不确定这个需不需要

IMenuBarService

有一个多余的 getState 方法声明

INotificationService

这个不考虑改成 add remove update

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

No branches or pull requests

2 participants