Skip to content

refactor(diag): Simplify settings diagnostics implementation

Description

This MR does 3 closely related things:

  1. Refactors the implementation for the settings diagnostics page to get rid of inheritance that was making the code more difficult to read/understand.
  2. In the refactor, it made sense to add tests to the base settings diagnostics renderer to handle base testing (as a result the test from browser have been reduced since browsers renders only the base settings)
  3. Creates a settings_cofiguration test util file for the different renderers which makes all the tests a bit more readable without the large config

Related Issues

Resolves Replace inheritance with composition in Setting... (#1939 - closed)

How has this been tested?

Desktop WebIde
image image

To test in desktop:

  • Checkout this branch and run the extension locally
  • Trigger the diagnostics command from the STATUS button on the chat webview pane or by using the command palette.

To test this in the webide: If you have not set up the webide before, please refer to the following instructions:

The setup takes 5-10 minutes, but please reach out if you run into any issues.

Once the WebIde is running, check out this branch in the vscode-extension submodule and run yarn run start:example.

Run the GitLab: Diagnostics command from the command palette and the settings section will render.

Change settings and watch the diagnostics page change too!

  • If src/browser or src/common has been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE.
  • Consider an end-to-end test for significant new features that aren't covered by integration tests.

Screenshots (if appropriate)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Dylan Bernardi

Merge request reports

Loading