Skip to content

Fix mobile sidebar filter toggle when View As is disabled - #3043

Merged
Armanul46 merged 2 commits into
sovware:developmentfrom
RabbiIslamRony:fix/mobile-sidebar-filter-toggle
Sep 28, 2026
Merged

Armanul46 merged 2 commits into
sovware:developmentfrom
RabbiIslamRony:fix/mobile-sidebar-filter-toggle

Conversation

@RabbiIslamRony

Copy link
Copy Markdown
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

When a listings or search-result archive uses a left/right sidebar and View As is disabled, the sidebar becomes an off-canvas panel on narrower viewports but its Filter toggle is not rendered. The only toggle currently lives inside the View As template.

This change renders the existing sidebar toggle independently when a sidebar is configured and View As is disabled. The existing View As path is unchanged, so it still renders one toggle alongside the view controls.

How to reproduce the issue or how to test the changes

  1. Configure the search-result layout with a left or right sidebar and disable View As.
  2. Open a page containing [directorist_search_result] at a viewport below 1368px. Before this change, the sidebar is hidden off-canvas with no way to open it.
  3. Confirm the Filter button is now present and opens/closes the sidebar. Re-enable View As and confirm there is still only one Filter button.

Validation performed:

  • PHP syntax check passed.
  • PHPCS passed for the changed file.
  • Browser test at 390×844 confirmed the toggle count changes from 0 to 1, the sidebar opens from x=-360 to x=0, and the page has no horizontal overflow.
  • View As enabled regression check confirmed one Filter toggle and three view links.

Before/after screenshots are attached in the PR evidence comment.

Any linked issues

TeamSync: https://team.sovware.com/support/directorist/413

Checklist

@RabbiIslamRony

Copy link
Copy Markdown
Member Author

Browser evidence (390 × 844)

Before: with a sidebar configured and View As disabled, the sidebar is positioned off-canvas and no Filter toggle is rendered.

Before: mobile search result without Filter toggle

After: the Filter toggle is visible; selecting it opens the existing sidebar at x=0 with the overlay active and no horizontal overflow.

After: open mobile filter sidebar

Regression check: enabling View As still renders exactly one Filter toggle plus the configured view links.

@RabbiIslamRony RabbiIslamRony added this to the 8.10 milestone Sep 28, 2026
@RabbiIslamRony
RabbiIslamRony changed the base branch from trunk to development September 28, 2026 08:45
@Armanul46
Armanul46 merged commit 0c03ecf into sovware:development Sep 28, 2026
1 check passed
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