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 vscode bicep UI packages #14584

Merged
merged 5 commits into from
Jul 23, 2024
Merged

Add vscode bicep UI packages #14584

merged 5 commits into from
Jul 23, 2024

Conversation

shenglol
Copy link
Contributor

@shenglol shenglol commented Jul 18, 2024

I'd like to add a new folder src/vscode-bicep-ui to house (React) UI applications and shared packages for reuse in the Bicep extension webviews, such as the deployment pane and the WYSIWYG visual designer (WIP).

The folder is set up with npm workspaces, vite and turborepo to simplify npm dependency management and improves development experience.

This PR introduces two packages, components and messaging, both with comprehensive test coverage. The components package includes various React components like AzureIcon and Codicon, while the messaging package provides a WebviewMessageChannel and related React hooks to simplify communication between a VS Code webview and the UI app managed by the webview.

Currently, the apps folder contains only placeholders. Actual implementations will be added in the future, as there is still a lot to do (which is the main reason I want to check in these changes now - to save progress and avoid creating a gigantic all-in-one PR).

It's also worth noting that CI is not enabled yet. It will be set up once the deployment pane is updated to utilize these packages, which will be addressed in my next PR.

To preview the components, go to src/vscode-bicep-ui/packages/component, run npm install and npm run dev.

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Jul 18, 2024

Test this change out locally with the following install scripts (Action run 10063326350)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 10063326350
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 10063326350"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 10063326350
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 10063326350"

Copy link
Contributor

github-actions bot commented Jul 18, 2024

Dotnet Test Results

    71 files   -     37      71 suites   - 37   22m 52s ⏱️ - 9m 12s
10 966 tests  -      9  10 966 ✅  -      9  0 💤 ±0  0 ❌ ±0 
25 812 runs   - 12 893  25 812 ✅  - 12 893  0 💤 ±0  0 ❌ ±0 

Results for commit 336091a. ± Comparison against base commit ac8392e.

♻️ This comment has been updated with latest results.

@shenglol shenglol mentioned this pull request Jul 19, 2024
shenglol added a commit that referenced this pull request Jul 19, 2024
Once #14584 is merged we should
consider merging `vscode-bicep-ui` and `vscode-bicep` and configure it
with npm workspaces. The PR cleans up the `vscode-bicep` project to make
sure we have consistent linter rules and formatter settings to make it
easier to merge the folders.

Changes:
- Consolidated TypeScript config files.
- Updated ESLint rules.
  - Made rules less strict overall.
  - Removed the annoying Prettier formatting related rules.
- ⭐**No more yellow or red squiggly line related to formatting
violations**.
  - Cleaned up all stale linter rule disabling comments.
- Updated prettier configuration
- Changed printWidth from `80` to `120` since we all have modern
high-resolution and ultra-wide monitors :p
  - Added a plugin for automatically sort imports.
- ❗**Formatted all code under vscode-bicep, which accounts for 99% of
the file changes**.
- Fixed a critical Webpack bundling circular dependency warning.
- Added CI steps for formatting the `vscode-bicep` folder.
Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for making this change!

@shenglol shenglol merged commit 011433b into main Jul 23, 2024
44 checks passed
@shenglol shenglol deleted the shenglol/vscode-bicep-ui-packages branch July 23, 2024 17:13
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.

2 participants