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: add editor top side bar support #3026

Merged
merged 4 commits into from
Aug 31, 2023

Conversation

MilkWangStudio
Copy link
Contributor

@MilkWangStudio MilkWangStudio commented Aug 29, 2023

Types

  • πŸŽ‰ New Features
  • πŸ› Bug Fixes
  • πŸ“š Documentation Changes
  • πŸ’„ Code Style Changes
  • πŸ’„ Style Changes
  • πŸͺš Refactors
  • πŸš€ Performance Improvements
  • πŸ—οΈ Build System
  • ⏱ Tests
  • 🧹 Chores
  • Other Changes

Background or solution

πŸ€– Generated by Copilot at 3d21ef2

  • Extend the EditorSide type to include 'top' as a valid value (link)
  • Update the registerEditorSideWidget method comment to reflect the new option (link)
  • Add a new property top to the EditorComponentRegistryImpl class to store the registered widgets (link)
  • Add a new CSS class .kt_editor_side_widgets_top to style the top widgets (link)
  • Add a new JSX element <EditorSideView> to the EditorGroupBody component to render the top widgets for the current resource (link)
  • Add an example top widget component to the startup package (link, link, link)
    • Define a new React component ExampleEditorTopWidget in the editor-top-example.tsx file that displays the file URI (link)
    • Import the component to the startup.contribution.ts file (link)
    • Register the component as a top side widget for file resources in the registerEditorComponents method (link)
    • Add the side property to the existing registration of the ExampleEditorBottomWidget component (link)

Changelog

πŸ€– Generated by Copilot at 3d21ef2

This pull request adds a new feature to the editor that allows displaying custom widgets on the top side of the editor area. It implements an example widget that shows the file URI of the current resource, and updates the existing bottom widget registration to use the new EditorSide type.

@CLAassistant
Copy link

CLAassistant commented Aug 29, 2023

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (a120d5e) 57.62% compared to head (10240cb) 57.62%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3026   +/-   ##
=======================================
  Coverage   57.62%   57.62%           
=======================================
  Files        1339     1339           
  Lines       84290    84290           
  Branches    17518    17518           
=======================================
  Hits        48575    48575           
  Misses      32459    32459           
  Partials     3256     3256           
Flag Coverage Ξ”
jsdom 52.64% <ΓΈ> (ΓΈ)
node 16.78% <ΓΈ> (ΓΈ)

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

Files Changed Coverage Ξ”
packages/editor/src/browser/component.ts 87.37% <ΓΈ> (ΓΈ)
packages/editor/src/browser/types.ts 100.00% <ΓΈ> (ΓΈ)

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@erha19
Copy link
Member

erha19 commented Aug 29, 2023

@MilkWangStudio ζ„Ÿθ°’ζδΊ€οΌŒη¨ζ™šζˆ‘ιͺŒθ―δΈ€δΈ‹εŠŸθƒ½ ~

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
image

@erha19 erha19 merged commit 1333888 into opensumi:main Aug 31, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants