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 showBreakpointsInOverviewRuler #2902

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Ricbet
Copy link
Member

@Ricbet Ricbet commented Jul 18, 2023

Types

  • 🎉 New Features

Background or solution

🤖 Generated by Copilot at fc89f5f

  • Add a new preference for showing breakpoints in the overview ruler (link, link, link)
  • Define a preference schema with a boolean type, a default value, and a localized description in core-preferences.ts (link)
  • Add a property to the CoreConfiguration interface with the same id and type as the preference schema in core-preferences.ts (link)
  • Register the preference id and the localization key in the preference settings service in preference-settings.service.ts (link)
  • Add a new color token for breakpoint icons in the theme package (link)
    • Register a color with an id, a default value, and a description in debug.ts (link)
  • Use the preference value and the color token to create overview ruler decorations for breakpoints in the debug model (link, link, link, link)
    • Import the IThemeService and the color token from the theme package in debug-model.ts (link)
    • Inject the IThemeService as a dependency to the DebugModel class in debug-model.ts (link)
    • Check the preference value and create an overview ruler decoration with the color token in the getBreakpointDecoration method in debug-model.ts (link)
    • Add the overview ruler decoration to the monaco editor decoration options in the getBreakpointDecoration method in debug-model.ts (link)
  • Add localization entries for the preference description in English and Chinese (link, link)
    • Add a key-value pair of the preference id and the description in English in en-US.lang.ts (link)
    • Add a key-value pair of the preference id and the description in Chinese in zh-CN.lang.ts (link)

image

  • 新增 showBreakpointsInOverviewRuler 配置项,默认关闭

Changelog

🤖 Generated by Copilot at fc89f5f

This pull request adds a new feature to show breakpoints in the overview ruler of the editor, which can be enabled or disabled by a user preference. It also adds the necessary color token, localization, and preference settings for this feature. The main files affected are core-preferences.ts, debug-model.ts, and preference-settings.service.ts.

@Ricbet Ricbet requested review from pipiiiiii, erha19 and bytemain July 18, 2023 02:43
@Ricbet Ricbet self-assigned this Jul 18, 2023
@opensumi opensumi bot added the 🎨 feature feature required label Jul 18, 2023
@Ricbet Ricbet linked an issue Jul 18, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: -0.01 ⚠️

Comparison is base (606f46b) 57.63% compared to head (fc89f5f) 57.63%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2902      +/-   ##
==========================================
- Coverage   57.63%   57.63%   -0.01%     
==========================================
  Files        1337     1337              
  Lines       84116    84123       +7     
  Branches    17482    17483       +1     
==========================================
+ Hits        48479    48482       +3     
- Misses      32387    32391       +4     
  Partials     3250     3250              
Flag Coverage Δ
jsdom 52.64% <85.71%> (-0.01%) ⬇️
node 16.78% <14.28%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
packages/core-browser/src/core-preferences.ts 92.85% <ø> (ø)
packages/i18n/src/common/en-US.lang.ts 100.00% <ø> (ø)
packages/i18n/src/common/zh-CN.lang.ts 100.00% <ø> (ø)
...erences/src/browser/preference-settings.service.ts 71.54% <ø> (ø)
packages/debug/src/browser/editor/debug-model.ts 51.48% <83.33%> (+0.48%) ⬆️
packages/theme/src/common/color-tokens/debug.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@erha19 erha19 merged commit 5cbe9c1 into main Jul 18, 2023
@erha19 erha19 deleted the feat/support-showBreakpointsInOverviewRuler branch July 18, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 feature feature required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] 支持 debug.showBreakpointsInOverviewRuler 配置项
2 participants