Skip to content

Shorten 'Add to QuickTree' graph button title to 'Add to Quicktree' - #44

Merged
TheWitness merged 2 commits into
mainfrom
fix/shorten-quicktree-graph-button-title
Oct 12, 2026
Merged

TheWitness merged 2 commits into
mainfrom
fix/shorten-quicktree-graph-button-title

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Cacti core now renders each graph drilldown action icon's title as a visible text label in the hamburger action menu (Cacti PR #8316). This plugin's graph button title Add this graph to QuickTree reads awkwardly as a menu label, so shorten it to Add to Quicktree.

Changes

  • setup.php — quicktree_graph_buttons(): title __esc('Add this graph to QuickTree', 'quicktree') → __esc('Add to Quicktree', 'quicktree') (and the matching docblock line).
  • locales/po/cacti.pot — regenerated for the changed string (via locales/build_gettext.sh); only the template is committed, the per-language .po/.mo are left to the normal translation workflow.

No behavioural change — the icon, its quicktreeAdd/quicktreeAddLink classes, data attributes and delegated click binding are unchanged, so tests/Unit/QuicktreeGraphButtonsTest.php (which asserts those classes) still passes.

@TheWitness
TheWitness requested review from bmfmancini and xmacan and a balanced review from Copilot October 12, 2026 18:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The diff contains broken tests, compatibility regressions, missing coverage, and substantial undocumented behavior beyond the stated title-only change.

6 open findings
What changed in this PR

Shortens the graph action label, but the diff also introduces extensive runtime, compatibility, security, styling, upgrade, and CI changes beyond the stated scope.

Changes:

  • Renames the graph action to “Add to Quicktree” and updates gettext.
  • Refactors plugin UI, assets, database access, redirects, upgrades, and compatibility.
  • Adds Pest tests, security checks, manifest validation, and CI workflows.
File Description
tests/​Unit/​QuicktreeVersionTest.php Tests plugin metadata parsing.
tests/​Unit/​QuicktreeShowTabTest.php Tests tab visibility and URL generation.
tests/​Unit/​QuicktreeSetupTableTest.php Tests page-style defaults.
tests/​Unit/​QuicktreePageLocationTest.php Tests location selection.
tests/​Unit/​QuicktreePageHeadTest.php Tests asset inclusion.
tests/​Unit/​QuicktreeLifecycleTest.php Tests lifecycle hooks.
tests/​Unit/​QuicktreeGraphButtonsTest.php Tests graph action markup.
tests/​Unit/​QuicktreeConfigSettingsAndArraysTest.php Tests settings and menus.
tests/​Unit/​QuicktreeCheckUpgradeTest.php Adds upgrade tests, currently not parsed as PHP.
tests/​Unit/​PruneFilesTest.php Tests upgrade pruning.
tests/​Unit/​LocationNormalizationTest.php Tests location allowlisting.
tests/​Unit/​FormWrapperTest.php Tests form helpers.
tests/​Unit/​CspNonceTest.php Tests CSP nonce handling.
tests/​Security/​SetupStructureTest.php Checks setup structure.
tests/​Security/​RedirectSafetyTest.php Checks redirect termination.
tests/​Security/​PreparedStatementsMigrationTest.php Checks prepared-query migration.
tests/​Security/​PreparedStatementConsistencyTest.php Checks database helper usage.
tests/​Security/​PhpCompatibilityTest.php Checks selected PHP features.
tests/​Security/​OutputEscapingTest.php Checks output escaping.
tests/​Security/​AuthGuardTest.php Checks authentication and ID validation.
tests/​Pest.php Documents Pest configuration.
tests/​Integration/​QuicktreeRedirectSafetyTest.php Checks redirect wiring.
tests/​Integration/​QuicktreeInstallHooksTest.php Tests hook installation.
tests/​E2E/​QuicktreeNoDebugHeaderTest.php Guards against debug headers.
tests/​bootstrap-unit.php Adds the test harness and Cacti stubs.
tests/​bin/​validate-manifest.php Validates manifest contents.
tests/​bin/​patch-coverage.php Adds changed-line coverage enforcement.
tests/​bin/​check-i18n-pot.php Checks gettext-template updates.
tests/​.cacti-version Selects Cacti 1.2.x for tests.
setup.php Refactors hooks, assets, upgrades, and graph actions.
README.md Documents Cancel-button compatibility.
quicktree.php Refactors UI, queries, redirects, and CSP handling.
phpunit.xml Configures Pest/PHPUnit.
manifest.json Defines shipped and obsolete paths.
locales/​po/​index.php Updates copyright metadata.
locales/​po/​cacti.pot Regenerates translations.
locales/​LC_MESSAGES/​index.php Updates copyright metadata.
locales/​index.php Updates header and PHP style.
locales/​build_gettext.sh Changes gettext generation.
js/​quicktree.js Adds delegated graph-action handling.
INFO Raises compatibility and updates metadata.
index.php Updates copyright metadata.
includes/​security.php Adds location normalization.
includes/​helpers.php Adds action-form helpers.
css/​sunrise.css Adds theme-specific glyph colors.
css/​quicktree.css Adds default glyph colors.
css/​paw.css Adds theme-specific glyph colors.
css/​paper-plane.css Adds theme-specific glyph colors.
css/​modern.css Adds theme-specific glyph colors.
css/​midwinter.css Adds theme-specific glyph colors.
css/​deepness.css Adds theme-specific glyph colors.
css/​dark.css Adds theme-specific glyph colors.
css/​classic.css Adds theme-specific glyph colors.
CHANGELOG.md Documents broad feature and security changes.
.gitignore Ignores generated translations and dependencies.
.github/​workflows/​plugin-ci-workflow.yml Adds integration and test CI.
.github/​workflows/​codeql.yml Adds JavaScript CodeQL analysis.
.github/​PULL_REQUEST_TEMPLATE.md Adds a pull-request template.
.github/​ISSUE_TEMPLATE/​feature_request.md Adds a feature template.
.github/​ISSUE_TEMPLATE/​bug_report.md Adds a bug template.
.github/​instructions/​php.instructions.md Adds PHP contribution guidance.
.github/​dependabot.yml Configures Actions updates.
.github/​copilot-instructions.md Adds repository development rules.
.gitattributes Enforces LF line endings.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread INFO
Comment thread tests/Unit/QuicktreeCheckUpgradeTest.php
Comment thread setup.php
Comment thread setup.php
Comment thread setup.php
Comment thread tests/Unit/QuicktreeGraphButtonsTest.php
@TheWitness
TheWitness changed the base branch from develop to main October 12, 2026 18:55
@TheWitness TheWitness closed this Oct 12, 2026
@TheWitness TheWitness reopened this Oct 12, 2026
…cktree'

The graph drilldown action icons now render their title as a visible menu label in Cacti core; shorten this plugin's icon title from 'Add this graph to QuickTree' to 'Add to Quicktree' so it reads cleanly there. Regenerated locales/po/cacti.pot for the changed string.
@TheWitness
TheWitness force-pushed the fix/shorten-quicktree-graph-button-title branch from bba9042 to d3b40df Compare October 12, 2026 20:01
Adds the missing assertion for this PR's sole behavior (the new visible action label) and refreshes the stale docblock reference.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread tests/Unit/QuicktreeGraphButtonsTest.php

@somethingwithproof somethingwithproof left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Approved.

@TheWitness
TheWitness merged commit 6d7b298 into main Oct 12, 2026
6 of 7 checks passed
Copilot stopped work on behalf of TheWitness due to an error October 12, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants