Skip to content

Sticky footer headerfooter background#29

Merged
jasperf merged 6 commits into
mainfrom
sticky-footer-headerfooter-background
Jun 4, 2025
Merged

Sticky footer headerfooter background#29
jasperf merged 6 commits into
mainfrom
sticky-footer-headerfooter-background

Conversation

@jasperf

@jasperf jasperf commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces several new features, enhancements, and bug fixes to the iwz-banner-container-plugin. The most notable updates include the addition of sticky footer banners, customizable wrapper background colors for header and footer banners, and improvements to the plugin's UI and user experience. The changes also include updates to CSS for responsive design and sticky positioning, as well as modifications to the plugin's codebase to support these new functionalities.

New Features and Enhancements:

  • Added sticky footer banner support, allowing banners to remain fixed at the bottom of the viewport with responsive behavior. (includes/class-iwz-banner-container-settings.php [1] includes/class-iwz-banner-container.php [2] public/css/iwz-banner-container-public.css [3]
  • Introduced customizable wrapper background colors for header and footer banners, with default values (#ffffff for header, #161515 for footer). (includes/class-iwz-banner-container-settings.php [1] includes/class-iwz-banner-container.php [2] public/css/iwz-banner-container-public.css [3]
  • Enhanced the admin interface with color picker inputs for wrapper background colors and a sticky footer option. (includes/class-iwz-banner-container-settings.php includes/class-iwz-banner-container-settings.phpR739-R780)

Bug Fixes:

  • Fixed the sticky footer banner toggle to work as intended. (CHANGELOG.md CHANGELOG.mdR5-R23)
  • Corrected default background color loading for header and footer banner wrappers. (CHANGELOG.md CHANGELOG.mdR5-R23)

UI and UX Improvements:

  • Improved settings page layout by moving header and footer banner sections to the bottom for better organization. (CHANGELOG.md CHANGELOG.mdR5-R23)
  • Updated the description of banner locations for better clarity in documentation and UI. (DEVELOPMENT.md [1] README.md [2] includes/class-iwz-banner-container-welcome.php [3]

Codebase Updates:

  • Refactored the wrap_banner_html method to include new parameters for sticky banners and background colors. (includes/class-iwz-banner-container.php [1] [2]
  • Updated plugin version to 1.9.5 to reflect the new features and fixes. (iwz-banner-container-plugin.php [1] [2]

@jasperf jasperf requested a review from Copilot June 4, 2025 02:31

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.

Pull Request Overview

This PR adds sticky footer functionality and customizable wrapper background colors for header and footer banners, including corresponding admin UI updates and CSS enhancements.

  • Enhanced CSS to support sticky footer banners and default header/footer wrapper backgrounds.
  • Updated PHP to register wrapper_bg_color and sticky settings, wrap banners with inline background styles, and bump version to 1.9.5.
  • Improved admin interface with color picker inputs and a sticky checkbox, plus documentation and changelog updates.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
public/css/iwz-banner-container-public.css Added CSS rules for sticky footer banners and wrapper background color support
iwz-banner-container-plugin.php Updated plugin version constant to 1.9.5
includes/class-iwz-banner-container.php Extended wrap_banner_html to accept sticky and wrapper_bg_color, updated display methods
includes/class-iwz-banner-container-welcome.php Updated welcome page to mention background color and sticky options for header/footer
includes/class-iwz-banner-container-settings.php Registered new wrapper_bg_color and sticky settings, added UI controls in settings page
README.md Reflected new header naming convention
DEVELOPMENT.md Clarified header location description in development guide
CHANGELOG.md Documented new features and fixes in version 1.9.5
Comments suppressed due to low confidence (3)

includes/class-iwz-banner-container-settings.php:171

  • Consider adding automated tests to cover the new wrapper background color setting registration to ensure defaults and sanitization behave as expected.
register_setting(
    'iwz_banner_container_settings',
    'iwz_banner_' . $location_key . '_wrapper_bg_color',

DEVELOPMENT.md:145

  • [nitpick] The nested parentheses make this line hard to read; consider rephrasing to avoid multiple nested parentheses, e.g., 'Header (Top of page after <body> tag)'.
1. **wp_head** - Header (Top of page (after `<body>` tag))

public/css/iwz-banner-container-public.css:101

  • The position declaration inside the media query duplicates the base rule; removing this redundant line can simplify maintenance.
position: fixed !important;

Comment thread public/css/iwz-banner-container-public.css Outdated
Comment thread includes/class-iwz-banner-container-settings.php
@jasperf jasperf merged commit 82f3b5f into main Jun 4, 2025
5 checks passed
@jasperf jasperf deleted the sticky-footer-headerfooter-background branch June 4, 2025 02:54
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.

2 participants