microsoft / microsoft/azure-devops-extension-sdk

How to control extension's build result tab visibility

Open
#85 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
159
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am developing an extension that adds a tab for business specific reports in the build result page

{
      "id": "<contribution_id>",
      "description": "Tab Description",
      "type": "ms.vss-build-web.build-results-tab",
      "targets": [
        "ms.vss-build-web.build-results-view"
      ],
      "properties":
      {
        "uri": "<path-to-html>.html",
        "name": "<name>",
        "dynamic": true,
        "supportsTasks": ["<Task_ID>"]
      }
    }
]

and opened an issue in the documentation repository but after a day of research, it doesn't look like that tab's visibility (like the test result tab does, so apparently technically possible), can be controlled since the contribution's uri / html file is only included after the user clicked on the tab, giving the extension a chance to call register at that moment, and the SDK doesn't seem to care about the registered object for tabs anyway.

The best "supported" solution I could come up with so far is adding the constraint on the build task generating the reports, but that's not sufficient since it only checks for the task in the build definition and I would like to show the tab only if reports are actually generated (again, like the test results tabs is doing)

What I ended up doing to satisfy my client is controlling it via a preview feature and reloading the page after checking that the tab should be available, but that solution is far from ideal. Can you confirm what I'm trying to achieve is not possible via the SDK?

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the build-results-tab contribution configuration in the issue and the SDK's registration behavior for extension tabs. Determine whether visibility can depend on generated reports rather than task presence, and document the supported limitation or entry point for controlling it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.