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

Fix/2762/Set loaded files via url to multiple mode by default #2769

Merged
merged 6 commits into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

## [unreleased] (Added 🚀 | Changed | Removed 🗑 | Fixed 🐞 | Chore 👨‍💻 👩‍💻)

### Fixed 🐞

- Set files loaded via URL to multiple mode by default when delta mode is not selected [#2769](https://github.com/MaibornWolff/codecharta/pull/2769)

## [1.95.1] - 2022-04-01

### Changed
Expand Down
6 changes: 2 additions & 4 deletions visualization/app/codeCharta/codeCharta.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { StoreService } from "./state/store.service"
import { setAppSettings } from "./state/store/appSettings/appSettings.actions"
import { setIsLoadingFile } from "./state/store/appSettings/isLoadingFile/isLoadingFile.actions"
import packageJson from "../../package.json"
import { setDelta, setMultiple, setSingle } from "./state/store/files/files.actions"
import { setDelta, setMultiple } from "./state/store/files/files.actions"
import { getCCFiles } from "./model/files/files.helper"
import sample1 from "./assets/sample1.cc.json"
import sample2 from "./assets/sample2.cc.json"
Expand Down Expand Up @@ -84,10 +84,8 @@ export class CodeChartaController {

if (renderState === "Delta" && files.length >= 2) {
this.storeService.dispatch(setDelta(files[0], files[1]))
} else if (renderState === "Multiple") {
this.storeService.dispatch(setMultiple(files))
} else {
this.storeService.dispatch(setSingle(files[0]))
this.storeService.dispatch(setMultiple(files))
}
}

Expand Down
1 change: 0 additions & 1 deletion visualization/app/codeCharta/e2e/url.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ describe("codecharta", () => {
it("should load data when file parameters in url are valid", async () => {
await mockResponses()
await goto(`${CC_URL}?file=fileOne.json&file=fileTwo.json`)
await checkSelectedFileName("Sample Project with Edges")
Hall-Ma marked this conversation as resolved.
Show resolved Hide resolved
await checkAllFileNames(["Sample Project with Edges", "Sample Project"])
})

Expand Down