-
Notifications
You must be signed in to change notification settings - Fork 37
refactor(37943) Combine the search and layout toolbars #1256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Coverage Report
|
There was a problem hiding this comment.
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 implements a comprehensive toolbar consolidation feature that combines the layout controls and search/filter toolbars into a single unified, collapsible, responsive toolbar. The implementation includes full accessibility support, extensive testing updates, and removal of a feature flag (WORKSPACE_AUTO_LAYOUT). The work spans multiple subtasks including ARIA attribute additions, toolbar integration, test updates, responsive design implementation, and E2E test adjustments.
Key Changes:
- Unified toolbar combining search/filter and layout controls into a single collapsible component at top-left
- Removed
WORKSPACE_AUTO_LAYOUTfeature flag - layout features are now always enabled - Added comprehensive responsive design with mobile-first approach (breakpoints at 768px and 1280px)
- Updated all layout-related E2E tests to expand toolbar before accessing controls
- Simplified manual layout algorithm tests to remove unnecessary parameter testing
Reviewed Changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| manual-layout.spec.ts | Simplified test suite removing redundant options/constraints parameter tests |
| useWorkspaceStore.ts | Removed feature flag check for persisting layout config |
| LayoutSelector.tsx | Removed feature flag conditional rendering |
| LayoutSelector.spec.cy.tsx | Removed feature flag setup from tests |
| LayoutPresetsManager.tsx | Wrapped MenuList in Portal for better rendering |
| LayoutPresetsManager.spec.cy.tsx | Removed feature flag setup |
| LayoutOptionsDrawer.spec.cy.tsx | Removed feature flag setup |
| ApplyLayoutButton.tsx | Removed feature flag check and added minWidth style |
| ApplyLayoutButton.spec.cy.tsx | Removed feature flag setup |
| DrawerFilterToolbox.tsx | Removed margin styling |
| LayoutControlsPanel.tsx | File deleted (merged into CanvasToolbar) |
| LayoutControlsPanel.spec.cy.tsx | File deleted (tests moved to CanvasToolbar) |
| CanvasToolbar.tsx | Major refactor: moved to top-left, added layout controls, responsive design |
| CanvasToolbar.spec.cy.tsx | Added 9 new tests, updated wrapper to include EdgeFlowProvider |
| ReactFlowWrapper.tsx | Removed LayoutControlsPanel import and usage |
| config/index.ts | Removed WORKSPACE_AUTO_LAYOUT feature flag |
| WorkspacePage.ts | Added canvasToolbar page object with expand/collapse buttons |
| workspace-layout-*.spec.cy.ts | Added toolbar expand step to all layout E2E tests (5 files) |
| TESTING_GUIDELINES.md | Added critical rule about never declaring test work complete without running tests |
| AUTONOMY_TEMPLATE.md | Added critical rule about test-related subtask completion |
| ACTIVE_TASKS.md | Added task 37943 documentation |
| Task documentation files | Created comprehensive documentation for the task (15+ new files) |
Comments suppressed due to low confidence (1)
hivemq-edge-frontend/src/modules/Workspace/components/controls/CanvasToolbar.tsx:1
- These commented-out responsive width properties suggest uncertainty about the final implementation. Either uncomment and use them if they're needed, or remove the comments entirely to keep the code clean. Dead code should not be committed.
import type { FC } from 'react'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pull Request: Unified Responsive Toolbar with Search & Layout Controls
Kanban Ticket: https://hivemq.kanbanize.com/ctrl_board/57/cards/37943/details/
Description
This PR transforms the workspace canvas toolbar experience by unifying the search/filter controls and layout controls into a single, collapsible, responsive toolbar. Previously, users had two separate panels competing for space at the top of the canvas. Now, users have a streamlined toolbar that adapts to any screen size while providing quick access to all essential workspace controls.
The enhancement introduces:
User Experience Improvements
What users gain:
Technical Summary
Implementation highlights:
LayoutControlsPanelinto existingCanvasToolbarcomponentaria-expanded,aria-controls, androle="region"attributesuseBreakpointValuefor responsive props that don't support object syntax (divider orientation, tooltip placement)BEFORE
Previous Behavior - Separate Control Panels
The old implementation used two independent panels positioned at different corners of the canvas:
Limitations:
AFTER
New Behavior - Unified Responsive Toolbar
The new implementation combines both control sets into a single adaptive toolbar that optimizes for every screen size:
1. Desktop View - Collapsed State (>= 1280px)
The toolbar starts in a minimal collapsed state, showing only an expand button with search icon:
Test:
cypress/e2e/workspace/workspace-layout-basic.spec.cy.ts- "should display layout controls in workspace"Screenshot: 1280x800 viewport showing collapsed toolbar at top-left
Key Visual Elements:
User Benefits:
Users get maximum canvas space for viewing their workspace topology while still having quick access to controls with a single click.
2. Desktop View - Expanded State (>= 1280px)
Clicking the expand button reveals all controls in a horizontal layout:
Test:
cypress/e2e/workspace/workspace-layout-basic.spec.cy.ts- "should display layout controls in workspace"Screenshot: 1280x800 viewport showing expanded toolbar with all controls
Key Visual Elements:
User Benefits:
All workspace controls accessible in one location with clear organization. The horizontal layout is space-efficient and familiar to desktop users.
3. Mobile View - Collapsed State (< 768px)
On mobile devices, the toolbar adapts to vertical orientation:
Test:
cypress/e2e/workspace/workspace-layout-basic.spec.cy.ts- "should display layout controls in workspace"Screenshot: 375x667 viewport (iPhone SE) showing collapsed mobile toolbar
Key Visual Elements:
User Benefits:
Mobile users get a touch-friendly button that's easy to tap, with clear visual feedback showing the toolbar will expand downward.
4. Mobile View - Expanded State (< 768px)
When expanded on mobile, the toolbar becomes a full-width vertical panel:
Test:
cypress/e2e/workspace/workspace-layout-basic.spec.cy.ts- "should display layout controls in workspace"Screenshot: 375x667 viewport showing full vertical toolbar layout
Key Visual Elements:
User Benefits:
Mobile users get full-width controls that are easy to tap accurately, with vertical stacking that follows natural scrolling behavior. No horizontal scrolling or tiny buttons.
5. Tablet View - Hybrid Layout (768px - 1279px)
Tablets get a semi-vertical layout with row-based control grouping:
Test:
cypress/e2e/workspace/workspace-layout-basic.spec.cy.ts- "should display layout controls in workspace"Screenshot: 768x1024 viewport (iPad) showing tablet-optimized layout
Key Visual Elements:
User Benefits:
Tablet users get an optimized middle-ground that takes advantage of more screen width while maintaining touch-friendly sizing.
Test Coverage
Comprehensive Testing
Performance Impact
Positive improvements:
Accessibility
Full WCAG 2.1 Level AA compliance:
aria-expanded,aria-controls,role="region"aria-labelattributesAccessibility Testing:
should be accessible- validates with axe-coreshould have accessible layout controls- validates expanded/collapsed statesshould have proper ARIA labels- validates all ARIA attributes presentFuture Enhancements
Optional improvements that could be done later:
prefers-reduced-motionmedia query for accessibilityReviewer Notes
Focus areas for review:
workspacePage.canvasToolbar.expandButton.click()- it's consistent across all 27 testsManual testing suggestions:
Quick test commands:
Expected test results:
Migration Notes
For users:
For developers:
LayoutControlsPanelcomponent removed - functionality now inCanvasToolbarworkspacePage.canvasToolbar.expandButton.click()before accessing layout controls in E2E testsdata-testid="workspace-layout-options"for reliable testing{ base, md, xl }for mobile-first approachRelated Links
.tasks/37943-toolbar-search-filter/.tasks/37943-toolbar-search-filter/RESPONSIVE_VISUAL_GUIDE.md.tasks/37943-toolbar-search-filter/E2E_TEST_RESULTS.mdReady for Review ✅