Skip to content

Conversation

@dimitrieh
Copy link
Contributor

@dimitrieh dimitrieh commented Nov 20, 2025

Description

…ionality

Enhance the immersive editor drawer with advanced features matching the Expert drawer:

  • Add pin/unpin button with dual-mode behavior (overlay vs pinned)
  • Implement advanced responsive behavior with viewport-aware constraints
  • Add smooth animations for pinning, opening, and closing states
  • Improve manual resize with viewport-specific max-width constraints
  • Provide togglePinWithWidth and shouldAllowPinning to child components
  • Auto-unpin drawer when viewport shrinks below 768px threshold
  • Different max-width constraints:
    • Pinned mode: 50% of viewport
    • Overlay mode (≥768px): 90% viewport OR viewport - 200px margin
    • Overlay mode (480-767px): 90% viewport only
    • Mobile (<480px): 100% viewport width

Technical changes:

  • Change EditorWrapper from position:absolute to flex:1 for proper flex layout
  • Reorder DOM elements (drawer before editor) for correct flex positioning
  • Add animation state flags (isPinning, isOpening, isClosing)
  • Implement debounced viewport resize handler with constraint enforcement
  • Add pin button styling with active state (indigo background when pinned)

When drawer is pinned, it becomes part of the flex layout and pushes the iframe editor to the right, allowing both to be visible side-by-side.

Related Issue(s)

#6267

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

…ionality

Enhance the immersive editor drawer with advanced features matching the Expert drawer:

- Add pin/unpin button with dual-mode behavior (overlay vs pinned)
- Implement advanced responsive behavior with viewport-aware constraints
- Add smooth animations for pinning, opening, and closing states
- Improve manual resize with viewport-specific max-width constraints
- Provide togglePinWithWidth and shouldAllowPinning to child components
- Auto-unpin drawer when viewport shrinks below 768px threshold
- Different max-width constraints:
  - Pinned mode: 50% of viewport
  - Overlay mode (≥768px): 90% viewport OR viewport - 200px margin
  - Overlay mode (480-767px): 90% viewport only
  - Mobile (<480px): 100% viewport width

Technical changes:
- Change EditorWrapper from position:absolute to flex:1 for proper flex layout
- Reorder DOM elements (drawer before editor) for correct flex positioning
- Add animation state flags (isPinning, isOpening, isClosing)
- Implement debounced viewport resize handler with constraint enforcement
- Add pin button styling with active state (indigo background when pinned)

When drawer is pinned, it becomes part of the flex layout and pushes the
iframe editor to the right, allowing both to be visible side-by-side.
@dimitrieh
Copy link
Contributor Author

@cstns quick try:

Instance - Expert - FlowFuse · 6 50pm · 11-20

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.22%. Comparing base (c46bbfe) to head (fe779c6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6318   +/-   ##
=======================================
  Coverage   76.22%   76.22%           
=======================================
  Files         393      393           
  Lines       19777    19777           
  Branches     4741     4741           
=======================================
  Hits        15075    15075           
  Misses       4702     4702           
Flag Coverage Δ
backend 76.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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