Skip to content

Use a CSS class for the status legend footer instead of inline styles - #850

Open
TheWitness wants to merge 2 commits into
developfrom
feature/pin-legend-bottom
Open

TheWitness wants to merge 2 commits into
developfrom
feature/pin-legend-bottom

Conversation

@TheWitness

@TheWitness TheWitness commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Description

Originally each status legend was wrapped in an inline-styled, fixed-position container copied from MacTrack:

print '<div class="center" style="position:fixed;left:0;bottom:0;display:table;margin-left:auto;margin-right:auto;width:100%;">';

Per review, the inline style is replaced with a dedicated .tholdLegendFooter CSS class, and it now lays the legend out as a centered footer in normal document flow rather than position: fixed. Staying in flow means it reserves its own space and no longer overlays the final rows or the action dropdown/Go button — resolving the reviewer's overlay findings. MacTrack and the other legend plugins (Monitor/Servcheck/Syslog) are being updated the same way.

How

  • Add .tholdLegendFooter to every css/<theme>.css (Thold loads one theme stylesheet per page, each of which already defines .tholdLegend).
  • Swap the inline-styled wrappers in thold.php and thold_graph.php for <div class="center tholdLegendFooter">.

No change to the legend chip markup/styles themselves.

Types of changes

  • Improvement (non-breaking change which improves existing functionality)

Checklist

  • My code follows the code style of this project.
  • php -l clean on the changed files.

Wrap the thold, host and log legend renders in the same fixed-position footer container MacTrack uses, so the legend stays pinned to the bottom of the viewport instead of scrolling away with the list.
@TheWitness
TheWitness requested review from bmfmancini and xmacan and a balanced review from Copilot October 7, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The fixed legends can obscure final page content because their responsive height is not reserved in the document flow.

3 open findings
What changed in this PR

Pins threshold, device, and log status legends to the viewport bottom.

Changes:

  • Wraps four legends in fixed-position footer containers.
  • Mirrors MacTrack’s legend positioning.
File Description
thold.php Pins the threshold legend.
thold_graph.php Pins threshold, device, and log legends.

🧠 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 thold.php Outdated
Comment thread thold_graph.php Outdated
Comment thread thold_graph.php Outdated
cigamit
cigamit previously approved these changes Oct 7, 2026
Replace the inline fixed-position wrapper around the status legend with a
plugin-specific *LegendFooter class defined in the plugin's stylesheet. The
class lays the legend out as a centered footer in normal document flow, so it
no longer sits outside flow and overlay the final rows, pagination, or action
controls at the bottom of the page.
@TheWitness TheWitness changed the title Pin status legends to the bottom of the page (match MacTrack) Use a CSS class for the status legend footer instead of inline styles Oct 7, 2026
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.

4 participants