The PeerWalk app is designed to enable rapid ad hoc peer code reviews. A feature of the app allows user to tag a defect from a list. The taxonomy of this list (tree) is publicly scrutable. This allows customers to give feedback, suggest or fix the defect tag tree. This xcode project is imported into the PeerWalk app via Swift Package Manager (SPM). In addition to just the data tree, this repo gives back to the community the SwiftUI code for the entire tagging UI within PeerWalk.
https://github.com/giiiita/TagLayoutView
The data structure for all the defect tags is a JSON file located here: tags.json. Please give feedback and suggestions either via the Issues tab or with Pull Requests. Parent tags (or categories) required to end with a forward slash (e.g. "Architecture/"), usable (child) tags must not (e.g. "Architecture/Patterns/Creational/Builder"). For example:
[
"Architecture/",
"Architecture/Patterns/",
"Architecture/Patterns/Creational/",
"Architecture/Patterns/Creational/Abstract factory",
"Architecture/Patterns/Creational/Builder",
]
- Install via SPM - File -> Add Packages... -> https://github.com/elprl/TDTagSearch .
- Add a tags.json file to your project in the format mentioned above.
- Observe the view model for changes.
import TDTagSearch
struct ContentView: View {
@StateObject var viewModel: TDTagSearchViewModel
let myTags = Bundle.main.path(forResource: "tags", ofType: "json")
var body: some View {
TDTagSearchRouter().build(viewModel: viewModel, tagFilePath: myTags)
.onChange(of: viewModel.hasFinished) { hasFinished in
debugPrint(viewModel.filteredTags)
debugPrint(viewModel.selectedTags)
debugPrint(hasFinished)
}
}
}