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

Extensions Base #1274

Merged
merged 29 commits into from
May 29, 2023
Merged

Extensions Base #1274

merged 29 commits into from
May 29, 2023

Conversation

Wouter01
Copy link
Member

@Wouter01 Wouter01 commented May 23, 2023

Description

This PR adds a start of the integration of ExtensionKit into the main app. It adds the following things:

  • Extension discovery system
  • Extension communication system
  • Auto-activation for extensions
  • A new Extensions window to manage extensions
  • Navigator & Inspector extensions
  • Output console for each extension (in status bar drawer)
  • "Extensions" menubar menu
  • Auto-reloading non-release extensions on change
  • An improved SegmentedControlV2, which supports a wider range of use cases and works like Picker

Additionally, some changes were made to make things work:

  • The inspector and sidebar tabs are now represented by enums instead of ints
  • Dragging for these tabs is disabled for now
  • Changes to the statusbar segmented control

See CodeEditApp/CodeEditKit#14 for CodeEditKit API

An example extension app (already compiled) and project can be found here:
ExampleExtension.zip

Note that the extension system is a WIP and is by no means done yet. Therefore, no docs will be added until the API gets stable. Limited docs are added to CodeEditKit's docC documentation to showcase how to create an extension.

Also note that a lot of these features aren't polished yet, but that isn't the goal of this PR. Instead, the goal is to have a base API and implementation that can be improved upon in the future.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

image image

Wouter01 added 16 commits March 23, 2023 23:41
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>

# Conflicts:
#	CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>

# Conflicts:
#	CodeEdit.xcodeproj/project.pbxproj
#	CodeEdit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	CodeEdit/Features/InspectorSidebar/InspectorSidebarToolbarTop.swift
#	CodeEdit/Features/InspectorSidebar/InspectorSidebarView.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01 Wouter01 changed the title Extensions Extensions Base May 23, 2023
Wouter01 added 8 commits May 23, 2023 04:42
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01 Wouter01 marked this pull request as ready for review May 25, 2023 18:05
CodeEdit/WorkspaceView.swift Outdated Show resolved Hide resolved
Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

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

Heya,

Sorry for the slight delay, it's a big PR.

It looks good to me, there are some points i want to address:

  • I suggested on some comments to add TODO: to make them more recognizable.
  • I'm wondering about some commented out code, will this ever be used again, or are they obsolete
  • 1 suggestion for an swiftlint:disable rule.

Great work!

Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
0xWDG
0xWDG previously approved these changes May 27, 2023
@Wouter01 Wouter01 added the enhancement New feature or request label May 27, 2023
@Wouter01 Wouter01 self-assigned this May 27, 2023
CodeEdit/Features/Extensions/Commands+ForEach.swift Outdated Show resolved Hide resolved
CodeEdit/Features/Extensions/ExtensionDiscovery.swift Outdated Show resolved Hide resolved
CodeEdit/Features/Extensions/ExtensionInfo.swift Outdated Show resolved Hide resolved
CodeEdit/Features/Extensions/ExtensionSceneView.swift Outdated Show resolved Hide resolved
CodeEdit/Features/Extensions/ExtensionSceneView.swift Outdated Show resolved Hide resolved
CodeEdit/Features/Extensions/ExtensionSceneView.swift Outdated Show resolved Hide resolved
CodeEdit/Features/InspectorSidebar/InspectorTab.swift Outdated Show resolved Hide resolved
CodeEdit/Features/NavigatorSidebar/NavigatorTab.swift Outdated Show resolved Hide resolved
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Wouter01 added 2 commits May 29, 2023 20:17
Signed-off-by: Wouter01 <wouterhennen@gmail.com>

# Conflicts:
#	CodeEdit/CodeEditApp.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
@Wouter01 Wouter01 merged commit eafcc6b into main May 29, 2023
@Wouter01 Wouter01 deleted the extensions-v2 branch May 29, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏁 Complete
Development

Successfully merging this pull request may close these issues.

5 participants