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

[plug-in] Implement 'viewsContainers' contribution point #2505

Closed
evidolob opened this issue Aug 3, 2018 · 2 comments
Closed

[plug-in] Implement 'viewsContainers' contribution point #2505

evidolob opened this issue Aug 3, 2018 · 2 comments
Labels
plug-in system issues related to the plug-in system Team: Che-Editors issues regarding the che-editors team

Comments

@evidolob
Copy link
Contributor

evidolob commented Aug 3, 2018

Configuration example:

"contributes": {
        "viewsContainers": {
            "activitybar": [
                {
                    "id": "files",
                    "title": "Files",
                    "icon": "resources/files.svg"
                }
            ]
        }
}

VS Code sample:
vscode

Also add possibility to point in what part of Theia layout viewsContainers can be added:

"contributes": {
        "viewsContainers": {
            "activitybar": [
                {
                    "id": "files",
                    "title": "Files",
                    "icon": "resources/files.svg",
                    "position": "left" | "bottom" | "right" 
                }
            ]
        }
  }

Implementation should use current Theia layout system:
theia

VSCode documentation

@evidolob evidolob added plug-in system issues related to the plug-in system Team: Che-Editors issues regarding the che-editors team labels Aug 3, 2018
@evidolob evidolob changed the title [plug-in] Implement 'views' and 'viewsContainers' contribution points [plug-in] Implement 'viewsContainers' contribution point Aug 3, 2018
@vitaliy-guliy
Copy link
Contributor

I suppose it's better to give up using "position": "left" | "bottom" | "right" and use named targets for the view containers.
Let's use names "left" | "activitybar" for the left part, "right" for the right and "bottom" for the bottom.
We must support "activitybar" target to have some support of VSCode plugins.

"contributes": {
        "viewsContainers": {
            "activitybar": [
                {
                    "id": "files",
                    "title": "Files",
                    "icon": "resources/files.svg"
                }
            ],
            "right": [
                {
                    "id": "pull-request",
                    "title": "Pull Request",
                    "icon": "resources/pull.svg"
                }
            ]
        }
  }

@vitaliy-guliy
Copy link
Contributor

To test views and views containers add following section to package.json of plugin in contributes section

        "viewsContainers": {
            "activitybar": [
                {
                    "id": "debug",
                    "title": "Debug",
                    "icon": "resources/debug.svg"
                }
            ],
            "left": [
                {
                    "id": "package-explorer",
                    "title": "Package Explorer",
                    "icon": "resources/package-explorer.svg"
                }
            ],
            "right": [
                {
                    "id": "comments",
                    "title": "Comments",
                    "icon": "resources/comments.svg"
                }
            ],
            "bottom": [
                {
                    "id": "remote",
                    "title": "Remote",
                    "icon": "resources/remote.svg"
                }
            ]
        },
        "views": {
            "package-explorer": [
                {
                    "id": "package-dependencies",
                    "name": "Package Dependencies"
                },
                {
                    "id": "package-outline",
                    "name": "Package Outline"
                }
            ],
            "comments": [
                {
                    "id": "ann-comments",
                    "name": "Anna's Comments"
                },
                {
                    "id": "sun-comments",
                    "name": "Sun's Comments"
                },
                {
                    "id": "yevhen-comments",
                    "name": "Yevhen's Comments"
                }
            ],
            "remote": [
                {
                    "id": "remote-terminal",
                    "name": "Remote terminal"
                }
            ]
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system Team: Che-Editors issues regarding the che-editors team
Projects
None yet
Development

No branches or pull requests

2 participants