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

feat: support launch editor UI #2574

Merged
merged 16 commits into from
Jun 6, 2023
Merged

feat: support launch editor UI #2574

merged 16 commits into from
Jun 6, 2023

Conversation

Ricbet
Copy link
Member

@Ricbet Ricbet commented Apr 11, 2023

Types

  • 🎉 New Features

Background or solution

🤖 Generated by Copilot at 80e38a7

  • Rename debug-schema-updater module to debug-schema-manager and make update method public (link, link, link, link, link)
  • Add launchDefaultSchemaUri and launchExtensionSchemaUri constants for different debug scenarios and use them instead of string literals (link, link, link, link, link)
  • Remove unused launchSchemaUri import from debug-contribution module (link)
  • Add LaunchResourceProvider class to provide custom resource for launch view editor component (link)
  • Add LaunchPreferencesContribution class to implement preference contribution, configuration, and editor contribution interfaces and register resource provider and editor component for launch view (link)
  • Add LaunchViewContainer component and subcomponents to render launch view editor with split panel, debug configuration list, and configuration details (link)
  • Add launch.module.less module to define styles for launch view editor and subcomponents (link)
  • Modify uri parameter of workbenchEditorService.open method call in DebugConfigurationManager class to use custom scheme launch_view_scheme for launch view editor (link)
  • Replace more prop with menu prop for Button component and add visible prop to Dropdown component (link)
  • Add moreVisible and placement props to MoreActionProps interface and pass them to Dropdown component inside Button component (link, link)
  • Import Placement type from dropdown component and export it from button component (link, link)
  • Add LabelMenuItemNode class to represent menu item with label only (link)
  • Modify registerDebuggers method of DebuggersContributionPoint class to use debugSchemaManager.update method instead of debugSchemaUpdater.update method (link, link, link)

image

Changelog

🤖 Generated by Copilot at 80e38a7

This pull request adds a new feature to the Button component to support a dropdown menu, and improves the schema management and editor for the debug component. It renames and refactors the debug-schema-updater module to debug-schema-manager, and introduces new modules for the launch view editor component, the launch schema URIs, and the label menu item node. It also updates the references and styles for the affected modules.

@Ricbet Ricbet requested review from hacke2, erha19 and bytemain April 11, 2023 11:56
@Ricbet Ricbet self-assigned this Apr 11, 2023
@Ricbet Ricbet changed the title feat: implement the base launch UI WIP: feat: implement the base launch UI Apr 11, 2023
@opensumi opensumi bot added 🎨 feature feature required ⚙️ refactor Refactor code 💄 style change labels Apr 11, 2023
@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Patch coverage: 29.62% and project coverage change: -0.07 ⚠️

Comparison is base (a7d5605) 57.75% compared to head (5fd9394) 57.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2574      +/-   ##
==========================================
- Coverage   57.75%   57.69%   -0.07%     
==========================================
  Files        1330     1333       +3     
  Lines       83682    83820     +138     
  Branches    17396    17413      +17     
==========================================
+ Hits        48333    48362      +29     
- Misses      32128    32228     +100     
- Partials     3221     3230       +9     
Flag Coverage Δ
jsdom 52.71% <29.62%> (-0.06%) ⬇️
node 16.76% <1.23%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-browser/src/common/common.command.ts 100.00% <ø> (ø)
packages/editor/src/browser/types.ts 100.00% <ø> (ø)
packages/i18n/src/common/en-US.lang.ts 100.00% <ø> (ø)
packages/i18n/src/common/zh-CN.lang.ts 100.00% <ø> (ø)
...es/debug/src/browser/preferences/launch.service.ts 11.76% <11.76%> (ø)
packages/core-browser/src/utils/schema.ts 16.66% <16.66%> (ø)
...c/browser/preferences/model/configuration-items.ts 20.00% <20.00%> (ø)
packages/debug/src/browser/debugUtils.ts 47.45% <22.22%> (-4.55%) ⬇️
...s/debug/src/browser/debug-configuration-manager.ts 65.98% <41.66%> (-5.67%) ⬇️
...kages/core-browser/src/menu/next/menu.interface.ts 66.26% <50.00%> (-0.83%) ⬇️
... and 8 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Ricbet Ricbet force-pushed the feat/implement-launch-ui branch from c815dfc to dd5a240 Compare April 19, 2023 07:29
@Ricbet Ricbet force-pushed the feat/implement-launch-ui branch 2 times, most recently from c7b04dc to 12ac09f Compare May 19, 2023 02:34
@Ricbet Ricbet force-pushed the feat/implement-launch-ui branch from b749363 to 86cc7cf Compare May 25, 2023 08:01
@Ricbet Ricbet changed the title WIP: feat: implement the base launch UI feat: support launch editor UI Jun 1, 2023
@Ricbet Ricbet force-pushed the feat/implement-launch-ui branch 3 times, most recently from 8e4b2ae to 03c2928 Compare June 3, 2023 05:03
@erha19
Copy link
Member

erha19 commented Jun 5, 2023

@Ricbet 几个可以优化的地方,看是否要在这个提交里一起实现:

  1. 初次打开时,可以默认选中一下配置第一项,这样不会出现 NoConfigurations 的情况
image
  1. 样式上:
    • No Configurations 左侧可以适当加一点左边距
    • “Add Configuration” 按钮底部可以适当增加下边距
    • 右侧编辑表单列表同上,底部可增加下边距
    • 打开编辑内容左侧按钮无 “选中态”
image
  1. 可能的优化点
  • 对于 variables 后续可以在这里直接帮用户展示出来,一些用户也会疑惑具体指代内容
  • 如:[变量 Variable Selection] [文件 Input] ,然后在下面一行展示具体指代文本路径
  • image

@Ricbet
Copy link
Member Author

Ricbet commented Jun 5, 2023

1、2 我优化一下,3 后续再优化

@Ricbet
Copy link
Member Author

Ricbet commented Jun 5, 2023

image

  • 默认选中第一个配置
  • 新增选中态
  • 优化部分样式(No Configurations 左侧增加边距,Add Configurations 底部增加边距,右侧add configurations item 底部增加边距)

Ricbet added 6 commits June 6, 2023 10:32
* feat: support json and launch editor data linkage

* feat: implement add configuration

* fix: typo
* fix: enter keyboard remove array field

* fix: additional template code

* feat: implement configuration items data linkage

* fix: array field undefined
@Ricbet Ricbet force-pushed the feat/implement-launch-ui branch from 44276b1 to 5fd9394 Compare June 6, 2023 02:54
Copy link
Member

@erha19 erha19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ricbet Ricbet merged commit 889806f into main Jun 6, 2023
@Ricbet Ricbet deleted the feat/implement-launch-ui branch June 6, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants