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

Improve Folder Structure for Better Maintainability #5140

Closed
19 tasks done
thewahome opened this issue Aug 13, 2024 · 0 comments · Fixed by #5596
Closed
19 tasks done

Improve Folder Structure for Better Maintainability #5140

thewahome opened this issue Aug 13, 2024 · 0 comments · Fixed by #5596
Assignees
Labels
vscode-extension Work related to the vscode-extension WIP

Comments

@thewahome
Copy link
Contributor

thewahome commented Aug 13, 2024

Problem

The VsCode extension code is centered around one file extensions.ts as more commands are added the file grows.

The file is meant to handle
activation: - actions when the extension is loaded
deactivate: - actions when the extension is unloaded
command registration: - registration of the commands when the extension is loaded

It is currently handling all the above plus the definition and implementations of the commands making it hard to navigate

Proposed Solution

To enhance the maintainability and scalability of our VS Code extension, we should adopt a more organized structure. This structure should help in managing commands, utilities, and other components more effectively. It also makes it easier to add new features and commands without cluttering the main files.

For example:

  • Have each command on its own file, making the codebase easier to navigate and maintain and have Separation of Concerns.
  • Group related files together to promote modularity and reusability.
  • Follow a consistent folder structure across the extension project to reduce confusion and streamline development as more people contribute.

Folder Visualisation

vscode/microsoft-kiota
├── .vscode/
├── src/
│ ├── commands/
│ │ ├── searchLockStepsCommand.ts
│ │ ├── searchApiDescriptionCommand.ts
│ │ ├── openInstallationInstructionsCommand.ts
│ │ └── selectLockCommand.ts
│ ├── handlers/
│ │ └── uriHandler.ts
│ ├── providers/
│ │ ├── dependenciesInfoProvider.ts
│ │ └── openApiTreeProvider.ts
│ ├── extension.ts
│ └── types.ts
├── node_modules/
├── ...
├── package.json
└── README.md

Tasks

  1. vscode-extension
    thewahome
  2. vscode-extension
    thewahome
  3. vscode-extension
    thewahome
  4. vscode-extension
    thewahome
  5. vscode-extension
    thewahome
  6. vscode-extension
    thewahome
  7. vscode-extension
    thewahome
  8. vscode-extension
    thewahome
  9. vscode-extension
    thewahome
  10. vscode-extension
    thewahome
@thewahome thewahome added the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Aug 13, 2024
@andrueastman andrueastman added vscode-extension Work related to the vscode-extension and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode-extension Work related to the vscode-extension WIP
Projects
Status: Done ✔️
Development

Successfully merging a pull request may close this issue.

2 participants