mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-01 19:15:52 +01:00
codify extension points docs (#1947)
This pull request converts the current incomplete textual documentation of the available frontend extension points to in-code definitions that act both as documentation and as type helpers for improving overall code quality. All extension points available in the SCM-Manager core are now available, but no plugin was updated and only those parts of the core codebase had the new types added that did not require runtime changes. The only exception to this is the breadcrumbs, which was a simple change that is fully backwards-compatible.
This commit is contained in:
committed by
GitHub
parent
5006e9b821
commit
4d203ff36f
@@ -22,7 +22,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
import { binder } from "@scm-manager/ui-extensions";
|
||||
import { binder, extensionPoints } from "@scm-manager/ui-extensions";
|
||||
import ProtocolInformation from "./ProtocolInformation";
|
||||
import GitAvatar from "./GitAvatar";
|
||||
|
||||
@@ -40,9 +40,18 @@ export const gitPredicate = (props: any) => {
|
||||
return !!(props && props.repository && props.repository.type === "git");
|
||||
};
|
||||
|
||||
binder.bind("repos.repository-details.information", ProtocolInformation, gitPredicate);
|
||||
binder.bind<extensionPoints.RepositoryDetailsInformation>(
|
||||
"repos.repository-details.information",
|
||||
ProtocolInformation,
|
||||
gitPredicate
|
||||
);
|
||||
binder.bind("repos.branch-details.information", GitBranchInformation, { priority: 100, predicate: gitPredicate });
|
||||
binder.bind("repos.tag-details.information", GitTagInformation, gitPredicate);
|
||||
|
||||
binder.bind<extensionPoints.RepositoryTagDetailsInformation>(
|
||||
"repos.tag-details.information",
|
||||
GitTagInformation,
|
||||
gitPredicate
|
||||
);
|
||||
binder.bind("repos.repository-merge.information", GitMergeInformation, gitPredicate);
|
||||
binder.bind("repos.repository-avatar", GitAvatar, gitPredicate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user