• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

haidaraM / ansible-playbook-grapher / 15097748826
96%
master: 95%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 18 May 2025 04:11PM UTC
Jobs 6
Files 11
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

18 May 2025 04:11PM UTC coverage: 95.641% (+0.01%) from 95.63%
15097748826

push

github

web-flow
feat(svg): Add collapsible nodes for roles, plays, and blocks in SVG output (#247)

## Summary

This PR implements collapsible nodes in the SVG output for the Ansible
Playbook Grapher, addressing [issue
#77](https://github.com/haidaraM/ansible-playbook-grapher/issues/77).

## Feature Details
- Adds a collapse/expand button to all role, play, and block nodes in
the SVG output.
- Clicking the button hides or shows all descendant nodes and edges
recursively, making large graphs easier to navigate.
- The button is always visible for the current node, so users can always
expand collapsed nodes.
- The implementation uses the existing `<link>` structure in the SVG to
determine which nodes and edges to hide/show, with no extra attributes
required.
- The code is generalized for all node types (role, play, block).
- Added a new CLI flag `--collapsible-nodes` to make this feature
optional (disabled by default).

## Usage
- Generate an SVG with the `--collapsible-nodes` flag:
`ansibleplaybookgrapher my_playbook.yml --collapsible-nodes`
- Open it in a browser and use the +/- buttons on plays, roles, and
blocks to expand/collapse sections of the graph.

## Screenshots
- When using the flag, each play, block, and role node has a
collapse/expand button.
- Clicking the button toggles visibility of all descendant nodes and
edges recursively.
- The button's text changes from "-" to "+" when collapsed and back to
"-" when expanded.


![node-collapsing](https://github.com/user-attachments/assets/8fc83d89-7e6b-4e93-85f2-47476a783e75)

1141 of 1193 relevant lines covered (95.64%)

5.74 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
97.96
0.02% /home/runner/work/ansible-playbook-grapher/ansible-playbook-grapher/ansibleplaybookgrapher/renderer/graphviz/__init__.py
7
94.44
-0.59% /home/runner/work/ansible-playbook-grapher/ansible-playbook-grapher/ansibleplaybookgrapher/cli.py
Jobs
ID Job ID Ran Files Coverage
1 py3.10-ansible2.17.* - 15097748826.1 18 May 2025 04:13PM UTC 11
95.56
GitHub Action Run
2 py3.11-ansible2.17.* - 15097748826.2 18 May 2025 04:13PM UTC 11
95.56
GitHub Action Run
3 py3.11-ansible2.16.* - 15097748826.3 18 May 2025 04:13PM UTC 11
95.64
GitHub Action Run
4 py3.10-ansible2.16.* - 15097748826.4 18 May 2025 04:13PM UTC 11
95.64
GitHub Action Run
5 py3.11-ansible2.18.* - 15097748826.5 18 May 2025 04:13PM UTC 11
95.56
GitHub Action Run
6 py3.12-ansible2.18.* - 15097748826.6 18 May 2025 04:13PM UTC 11
95.56
GitHub Action Run
Source Files on build 15097748826
  • Tree
  • List 11
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 119bb928 on github
  • Prev Build on main (#15089500575)
  • Next Build on main (#15173509935)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc