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

Add documentation for extension system #10067

Closed

Conversation

pascalwengerter
Copy link
Contributor

@pascalwengerter pascalwengerter commented Nov 26, 2023

First iteration, let's get it in quickly and then iterate as the extension system evolves

Copy link

sonarcloud bot commented Jan 23, 2024

type: 'search',
scopes?: ExtensionScope[],
searchProvider: {
id: string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should either go for example values or a type here, not a mix 😅 my bad!

@pascalwengerter pascalwengerter marked this pull request as ready for review January 24, 2024 09:16
@kulmann kulmann mentioned this pull request Jan 24, 2024
7 tasks
@kulmann
Copy link
Member

kulmann commented Jan 24, 2024

Superseded by #10400 (too dumb to work with branch protection in the fork and force-with-lease pushes)

@kulmann kulmann closed this Jan 24, 2024

### Distinction between Apps and Extensions

An Application in the context of ownCloud Web is an artifact which can be distributed to and installed by an ownCloud admin.
Copy link
Member

Choose a reason for hiding this comment

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

distributed to ... an admin? kinda odd to my ears

Copy link
Member

Choose a reason for hiding this comment

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

Maybe An Application in the context of ownCloud Web is an artifact which can be installed in an ownCloud Infinite Scale instance.?

An Application in the context of ownCloud Web is an artifact which can be distributed to and installed by an ownCloud admin.
It serves two main purposes:
1. It makes the full app viewport (everything below the top bar) available to the application developer for any custom
application code. This includes the ability to define views with routes, navigation items for the left side bar, and more.
Copy link
Member

Choose a reason for hiding this comment

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

Don't really agree with this, this is no property of an "app" - it's just that an app can register routes which are rendered in the full viewport.

Copy link
Member

Choose a reason for hiding this comment

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

hm... I'd like to hint to what is possible, not only the most basic functionality.

1. It makes the full app viewport (everything below the top bar) available to the application developer for any custom
application code. This includes the ability to define views with routes, navigation items for the left side bar, and more.
2. Through the `extensions` key in the application interface the developer can register extensions of any extension type.
Those extensions will become available in standardized extension points and for being queried from the extension registry
Copy link
Member

Choose a reason for hiding this comment

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

... and will be queried?

I assume you mean they will become available for being queried - but that doesn't work well with the two parts of the sentence imho

Copy link
Member

Choose a reason for hiding this comment

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

Changed the paragraph to Through the extensions key in the application interface you can register extensions of any extension type. Those extensions are then available in standardized extension points. Additionally, they can be queried from the extension registry for your own purposes.. How about that?

application code. This includes the ability to define views with routes, navigation items for the left side bar, and more.
2. Through the `extensions` key in the application interface the developer can register extensions of any extension type.
Those extensions will become available in standardized extension points and for being queried from the extension registry
for custom use.
Copy link
Member

Choose a reason for hiding this comment

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

what is custom use?

Copy link
Member

Choose a reason for hiding this comment

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

your own purposes - whatever you want to do, go wild.

docs/extension-system/_index.md Show resolved Hide resolved
docs/extension-system/_index.md Show resolved Hide resolved
docs/extension-system/_index.md Show resolved Hide resolved

### Extensions

In contrast to applications, extensions usually have a rather small scope and dedicated functionality.
Copy link
Member

Choose a reason for hiding this comment

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

I find it odd to say that tbh

Copy link
Member

Choose a reason for hiding this comment

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

Do you have a different idea? 😇

docs/extension-system/_index.md Show resolved Hide resolved
Any extension is required to define at least an `id` and a `type`.

The `id` is supposed to be unique throughout the ownCloud Web ecosystem. In order to keep `id`s readable for humans we didn't want to enforce uniqueness through e.g. uuids.
Instead, we chose to use dot-formatted namespaces like e.g. `com.github.owncloud.web.files.search`. We'd like to encourage you to follow the same format for your own extensions.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe worth dropping a line why we require it (basically to be able to disable specific extensions via global config)

Copy link
Member

Choose a reason for hiding this comment

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

Since the whole config is a mess and subject to change, I'd like to not go into detail

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

Successfully merging this pull request may close these issues.

3 participants