MaibornWolff / MaibornWolff/codecharta

Link cc.json to the source code

Open
#686 2 comments 0 reactions 0 assignees View on GitHub
feature javascript pr-visualization pr-visualization-desktop priority:medium
Dominant language
TypeScript
Stars
529
Forks
56
Avg merge
7h 17m
Merged PRs (30d)
34

Description

# Feature request

Currently it's hard to check out the SourceCode of an interesting building. Suppose I find a building which I want to evaluate qualitatively. I first have to remember the complete path (*Service.java classes are probably in all the packages) and then open that file in my editor of choice.

If I have generated my cc.json from Sonar, every building has an url which I can open by double-clicking the building. While that is a great solution for many cases, it has problems when Sonar is no longer available. We could have created a temporary Sonar instance just for code analyis. Or the Sonar is only accessible from certain VPNs. And even if Sonar is available, the web code view is not great for exploring a codebase. I cannot jump to definiton and other IDE features.

## Description

If CodeCharta knows the source code location, a double-click on a building "foo/Bar.js" in the desktop Version of CodeCharta should do the equivalent of `open foo/Bar.js`. Supplying the source code is done in the Desktop version when loading new maps. This has to work even when loading multiple maps.

We won't store the link in the cc.json for now and wait for user feedback.

### Linking
**When** I load one or multiple maps
**Then** a modal opens that allows me to pick the source code location for each cc.json
**and** this model has the same style as the file export model.

**When** I have linked cc.jsons to their source code
**Then** a small code icon to the right of the cc.json name shows me code was linked. We can show this inside the file dropdown.

### Behavior
**Given** a map has been linked to its source code
**When** I double-click the building
**Then** the default editor opens that shows me the source code

**Given** a map has been linked to its source code
**and** I have selected a building
**When** I look at the file attribute bar
**Then** I can see a clickable Open button directly under the url attribute

**Given** a map has NOT been linked to its source code
**When** I double-click a building
**and** the building has an url field
**Then** my default browser opens the url

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the desktop version by locating the file export modal, file dropdown, file attribute bar, and building double-click handling. Implement source-code folder selection for each loaded cc.json, including multiple maps, and preserve browser fallback for unlinked maps. Done means linked maps can open the selected building in the default editor and show the code-link indicator and Open button.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.