Open eosti opened 9 months ago
🤖
Hello @eosti,
Nice to meet you! I'm Dosu, an automated bot here to help you with your issues and inquiries related to the tree-visualizer repository. While waiting for a human maintainer, I'll be here to assist you. Rest assured, I'm currently looking into your issue and will provide you with a detailed answer shortly.
🤖
Hello @eosti,
Nice to meet you! I'm Dosu, an AI bot here to assist with bugs, answer your questions, and guide you on becoming an effective contributor. While we're waiting for a human maintainer, I'm here to help. Let's get started with your issue!
Sure, it's possible to implement a feature to automatically filter out requirements with no name in the tree-visualizer. This can be achieved by modifying the ngOnChanges
method in the OrgChartComponent
class to also check if the node's title is not empty. Here's a sample code snippet:
ngOnChanges(changes: SimpleChanges) {
const visibleList = changes["visibleList"].currentValue;
this.diagram.nodes.each(node => {
node.visible = visibleList.includes(node.data.id) && node.data.title !== '';
})
}
In this code, node.data.title !== ''
checks if the title of the node is not empty. If it is empty, the node will not be visible. This will effectively filter out any requirements with no name.
As for the current method used to display the nodes, the tree-visualizer uses the GoJS library. The nodes are displayed using a Diagram object from GoJS, which is assigned to the diagram
property of the OrgChartComponent
class. The diagram
object's model
property is set to the model
input property of the OrgChartComponent
class, which is of type go.GraphLinksModel
. This model represents the nodes and links of the diagram.
You can find more details about this in the OrgChartComponent file in the repository.
Please let me know if you need further assistance or clarification.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
It's very easy to accidentally create and then lose empty requirements requirements, and there's a number of them in the database right now. The "proper" fix would be removing them from the requirements database entirely, but it'd be nice to automatically filter out requirements with no name.