Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
499fa4a
refresh button added to title
goodhumored Jun 10, 2023
de976fd
eslint rules updated
goodhumored Jun 11, 2023
087e1ec
singleton to DI; folder structure
goodhumored Jun 11, 2023
13a76a5
wpStatus enum
goodhumored Jun 11, 2023
120e1f6
eslint rules updated
goodhumored Jun 11, 2023
398ce57
webpack config fixed
goodhumored Jun 11, 2023
46def73
vscode mock extended
goodhumored Jun 11, 2023
724a699
authorizeClientCommand refactored
goodhumored Jun 11, 2023
b93e8e3
client update
goodhumored Jun 11, 2023
5b72326
logger updated
goodhumored Jun 11, 2023
6d55d15
project repository; WP repository
goodhumored Jun 11, 2023
65258e6
tree data provider refactored
goodhumored Jun 11, 2023
403d9d5
getIconPathByStatus tests fixed
goodhumored Jun 11, 2023
0ab21ec
WPs filters implemented
goodhumored Jun 11, 2023
2e76907
setup filters command
goodhumored Jun 12, 2023
5767604
setupFilters empty filter on unfocus fixed
goodhumored Jun 12, 2023
6a854af
project filter moved and filters projects, not wps
goodhumored Jun 12, 2023
e63ff51
no author title case tested
goodhumored Jun 12, 2023
5c8405b
filtering moved from repository to treeDataProvider
goodhumored Jun 12, 2023
9c7f069
sorter removed temporarily
goodhumored Jun 12, 2023
878a9eb
filter and refresh icons replaced with built in
goodhumored Jun 12, 2023
0e7bcbb
no undef off eslint
goodhumored Jun 13, 2023
1e4d51e
wp status and project quick picks moved to their own files
goodhumored Jun 13, 2023
e8ec1dd
project quick pick item import fixed
goodhumored Jun 13, 2023
01c398b
user get name way changed
goodhumored Jun 18, 2023
4fd71e6
getting statuses from openproject by api with status repository
goodhumored Jun 18, 2023
689ff4e
status opClient methods
goodhumored Jun 18, 2023
c00e547
projectQuickPick redundant setPickedProjects signature removed
goodhumored Jun 18, 2023
918a82c
openProjectTreeDataProvider
goodhumored Jun 18, 2023
a87736b
treeView interface renamed import fixed
goodhumored Jun 18, 2023
59dbcf4
openProject client interface status methods
goodhumored Jun 18, 2023
d7b4816
wp tree item code cleanup
goodhumored Jun 18, 2023
20e3560
wp repository save command
goodhumored Jun 18, 2023
7fff2ee
set wp status command
goodhumored Jun 18, 2023
50561ea
changelog updated
goodhumored Jun 18, 2023
4f20f67
readme updated
goodhumored Jun 18, 2023
a6de338
package json version updated
goodhumored Jun 18, 2023
00691a1
readme feature images added
goodhumored Jun 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
{
"files": [
"**/*.spec.ts",
"**/*.mock.ts"
"**/*.mock.ts",
"**/__mocks__/**/*.ts"
],
"env": {
"jest": true
},
"rules": {
"import/first": "off",
"max-lines-per-function": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/dot-notation": "off",
Expand All @@ -48,14 +48,12 @@
"jsdoc"
],
"rules": {
"import/no-extraneous-dependencies": "off",
"quotes": [
"error",
"double"
],
"semi": [
"warn",
"always"
],
"semi": "off",
"import/extensions": [
"error",
"never"
Expand Down Expand Up @@ -111,8 +109,12 @@
"warn",
{
"ignore": [
-1,
0,
1
1,
2,
5,
10
]
}
],
Expand Down Expand Up @@ -260,6 +262,9 @@
"@typescript-eslint/brace-style": "off",
"jsdoc/require-jsdoc": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn"
"@typescript-eslint/no-unused-vars": "warn",
"import/no-cycle": "off",
"no-shadow": "off",
"no-undef": "off"
}
}
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.0.0] - 25-05-2023

### Added

- extension icon

### Fixed

- extension version
- Readme image
- Readme image

## [2.0.0] - 19-06-2023

### Added

- projects in the workpackage view
- filters:
- text filter
- project filter
- status filter
- setup filters command
- set work package status command
- dependency injection
- refresh wp view button
- "collapse all" wp view button

### Changed

- file structure
- class structure
- singletons removed, now using dependency injection
- some ESLint rules
- vscode mock updated
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

Extension for [OpenProject](https://www.openproject.org/) - project management system.

![picture](pictures/work_packages.png)
![work packages](pictures/work_packages.png)

## Features

- Authorization.
- Getting list of your work packages.
- Filtering your work packages.
![status filter](pictures/status_filter.png)
![project filter](pictures/project_filter.png)
![text filter](pictures/text_filter.png)
- Setting a new status for a work package.
![set wp status image](pictures/new_wp_status.png)

## Requirements

Expand All @@ -23,10 +28,16 @@ This extension contributes the following settings:

## Release Notes

Users appreciate release notes as you update your extension.

### 1.0.0

Initial release of OpenProject VSCode extension

### 2.0.0

- Complete refactoring;
- Filtering;
- Set Work Package status command and button;
- Refresh button;
- "Collapse All" button;

**Enjoy!**
58 changes: 53 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publisher": "bitswar",
"displayName": "OpenProject",
"description": "OpenProject extension for VSCode",
"version": "1.0.0",
"version": "2.0.0",
"icon": "pictures/icon.png",
"engines": {
"vscode": "^1.78.0"
Expand All @@ -19,14 +19,60 @@
{
"command": "openproject.auth",
"title": "Authorize",
"shortTitle": "Auth"
"shortTitle": "Auth",
"icon": "$(account)"
},
{
"command": "openproject.refresh",
"title": "Refresh work packages",
"shortTitle": "Refresh"
"shortTitle": "Refresh",
"icon": "$(sync)"
},
{
"command": "openproject.setupFilter",
"title": "Filter work packages",
"shortTitle": "Filter",
"icon": "$(filter)"
},
{
"command": "openproject.wp.setStatus",
"title": "Set workspace status",
"shortTitle": "Set status",
"icon": "$(tasklist)"
},
{
"command": "workbench.actions.treeView.openproject-workspaces.collapseAll",
"title": "Collapse all",
"shortTitle": "Collapse",
"icon": "$(collapse-all)"
}
],
"menus": {
"view/title": [
{
"command": "openproject.refresh",
"group": "navigation",
"when": "view == openproject-workspaces"
},
{
"command": "openproject.setupFilter",
"group": "navigation",
"when": "view == openproject-workspaces"
},
{
"command": "workbench.actions.treeView.openproject-workspaces.collapseAll",
"group": "navigation",
"when": "view == openproject-workspaces"
}
],
"view/item/context": [
{
"command": "openproject.wp.setStatus",
"group": "inline",
"when": "view == openproject-workspaces"
}
]
},
"viewsContainers": {
"activitybar": [
{
Expand Down Expand Up @@ -113,7 +159,9 @@
"dependencies": {
"axios": "^1.4.0",
"client-oauth2": "^4.3.3",
"op-client": "^1.4.2"
"inversify": "^6.0.1",
"op-client": "^1.4.2",
"reflect-metadata": "^0.1.13"
},
"jest": {
"moduleFileExtensions": [
Expand All @@ -131,4 +179,4 @@
],
"coverageDirectory": "../coverage"
}
}
}
Binary file added pictures/new_wp_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/project_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/status_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/text_filter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pictures/work_packages.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions src/DI/container.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import { Container } from "inversify";
import "reflect-metadata";
import AuthorizeClientCommandImpl from "../application/commands/authorize/authorizeClient.command";
import AuthorizeClientCommand from "../application/commands/authorize/authorizeClientCommand.interface";
import SetupFiltersCommandImpl from "../application/commands/filter/setupFilters.command";
import SetupFiltersCommand from "../application/commands/filter/setupFilters.command.interface";
import RefreshWPsCommandImpl from "../application/commands/refresh/refreshWPs.command";
import RefreshWPsCommand from "../application/commands/refresh/refreshWPsCommand.interface";
import SetWPStatusCommandImpl from "../application/commands/setWpStatus/setWPStatus.command";
import SetWPStatusCommand from "../application/commands/setWpStatus/setWPStatus.command.interface";
import OpenProjectTreeDataProviderImpl from "../application/views/openProject.treeDataProvider";
import OpenProjectTreeDataProvider from "../application/views/openProject.treeDataProvider.interface";
import CompositeWPsFilterImpl from "../core/filter/composite/composite.wpsFilter";
import CompositeWPsFilter from "../core/filter/composite/composite.wpsFilter.interface";
import ProjectsFilterImpl from "../core/filter/project/project.filter";
import ProjectsFilter from "../core/filter/project/project.filter.interface";
import StatusWPsFilterImpl from "../core/filter/status/status.wpsFilter";
import StatusWPsFilter from "../core/filter/status/status.wpsFilter.interface";
import TextWPsFilterImpl from "../core/filter/text/text.wpsFilter";
import TextWPsFilter from "../core/filter/text/text.wpsFilter.interface";
import ConsoleLogger from "../infrastructure/logger/logger";
import Logger from "../infrastructure/logger/logger.interface";
import OpenProjectClientImpl from "../infrastructure/openProject/openProject.client";
import OpenProjectClient from "../infrastructure/openProject/openProject.client.interface";
import ProjectRepositoryImpl from "../infrastructure/project/project.repository";
import ProjectRepository from "../infrastructure/project/project.repository.interface";
import WPRepositoryImpl from "../infrastructure/workPackage/wp.repository";
import WPRepository from "../infrastructure/workPackage/wp.repository.interface";
import TOKENS from "./tokens";
import StatusRepository from "../infrastructure/status/status.repository.interface";
import StatusRepositoryImpl from "../infrastructure/status/status.repository";

const container = new Container();

container
.bind<AuthorizeClientCommand>(TOKENS.authorizeCommand)
.to(AuthorizeClientCommandImpl)
.inSingletonScope();

container
.bind<OpenProjectClient>(TOKENS.opClient)
.to(OpenProjectClientImpl)
.inSingletonScope();

container
.bind<OpenProjectTreeDataProvider>(TOKENS.opTreeView)
.to(OpenProjectTreeDataProviderImpl)
.inSingletonScope();

container
.bind<RefreshWPsCommand>(TOKENS.refreshWPsCommand)
.to(RefreshWPsCommandImpl)
.inSingletonScope();

container
.bind<TextWPsFilter>(TOKENS.textFilter)
.to(TextWPsFilterImpl)
.inSingletonScope();

container
.bind<ProjectsFilter>(TOKENS.projectFilter)
.to(ProjectsFilterImpl)
.inSingletonScope();

container
.bind<StatusWPsFilter>(TOKENS.statusFilter)
.to(StatusWPsFilterImpl)
.inSingletonScope();

container
.bind<CompositeWPsFilter>(TOKENS.compositeFilter)
.to(CompositeWPsFilterImpl)
.inSingletonScope();

container
.bind<WPRepository>(TOKENS.wpRepository)
.to(WPRepositoryImpl)
.inSingletonScope();

container
.bind<ProjectRepository>(TOKENS.projectRepository)
.to(ProjectRepositoryImpl)
.inSingletonScope();

container
.bind<StatusRepository>(TOKENS.statusRepository)
.to(StatusRepositoryImpl)
.inSingletonScope();

container
.bind<SetupFiltersCommand>(TOKENS.setupFiltersCommand)
.to(SetupFiltersCommandImpl)
.inSingletonScope();

container
.bind<SetWPStatusCommand>(TOKENS.setWPStatusCommand)
.to(SetWPStatusCommandImpl)
.inSingletonScope();

container.bind<Logger>(TOKENS.logger).to(ConsoleLogger).inSingletonScope();

export default container;
31 changes: 31 additions & 0 deletions src/DI/tokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const repositoryTokens = {
wpRepository: Symbol.for("WPRepository"),
projectRepository: Symbol.for("ProjectRepository"),
statusRepository: Symbol.for("StatusRepository"),
};

const comandTokens = {
refreshWPsCommand: Symbol.for("RefreshWPsCommand"),
authorizeCommand: Symbol.for("AuthorizeClientCommand"),
setupFiltersCommand: Symbol.for("FilterWPsCommand"),
setWPStatusCommand: Symbol.for("SetWPStatusCommand"),
};

const filterTokens = {
filter: Symbol.for("filter"),
textFilter: Symbol.for("TextWPsFilter"),
projectFilter: Symbol.for("ProjectWPsFilter"),
statusFilter: Symbol.for("StatusWPsFilter"),
compositeFilter: Symbol.for("CompositeWPsFilter"),
};

const TOKENS = {
opTreeView: Symbol.for("OpenProjectTreeDataProvider"),
opClient: Symbol.for("OpenProjectClient"),
logger: Symbol.for("Logger"),
...comandTokens,
...repositoryTokens,
...filterTokens,
};

export default TOKENS;
Loading