youssefreda9 commited on
Commit
c37ee01
·
1 Parent(s): bf41de5

Fix focus mode: correctly hide sidebar panels and allow footer to be hoverable to exit focus mode

Browse files
src/css/components.css CHANGED
@@ -3901,17 +3901,22 @@ select:focus-visible,
3901
  border-radius: 2px;
3902
  }
3903
 
3904
- /* ── Focus Mode ── */
3905
  body.focus-mode .main-nav,
3906
- body.focus-mode .suggestions-panel,
3907
  body.focus-mode .docs-panel,
3908
- body.focus-mode .editor-footer,
3909
- body.focus-mode .editor-stats,
3910
- body.focus-mode .editor-actions {
3911
- opacity: 0;
3912
- pointer-events: none;
3913
- transition: opacity 0.4s ease;
 
3914
  }
 
 
 
 
 
3915
  body.focus-mode .editor-layout {
3916
  grid-template-columns: 1fr !important;
3917
  }
 
3901
  border-radius: 2px;
3902
  }
3903
 
 
3904
  body.focus-mode .main-nav,
3905
+ body.focus-mode .sidebar-panel,
3906
  body.focus-mode .docs-panel,
3907
+ body.focus-mode .docs-panel-desktop {
3908
+ display: none !important;
3909
+ }
3910
+
3911
+ body.focus-mode .editor-footer {
3912
+ opacity: 0.2;
3913
+ transition: opacity 0.3s ease;
3914
  }
3915
+
3916
+ body.focus-mode .editor-footer:hover {
3917
+ opacity: 1;
3918
+ }
3919
+
3920
  body.focus-mode .editor-layout {
3921
  grid-template-columns: 1fr !important;
3922
  }
tests/test_bug_fixes.py CHANGED
@@ -30,6 +30,12 @@ def _import_app_functions():
30
  '_levenshtein', '_is_small_spelling_change',
31
  '_is_spelling_only_change', '_is_orthographic_variant'
32
  ]
 
 
 
 
 
 
33
  for func_name in func_names:
34
  pattern = rf'^(def {func_name}\(.*?\n(?:(?: .+\n|[ \t]*\n)*))'
35
  match = _re.search(pattern, source, _re.MULTILINE)
 
30
  '_levenshtein', '_is_small_spelling_change',
31
  '_is_spelling_only_change', '_is_orthographic_variant'
32
  ]
33
+ # Add _DIRECTIONAL_BLOCKS
34
+ match_db = _re.search(r'(_DIRECTIONAL_BLOCKS\s*=\s*\{.*?\n\})', source, _re.DOTALL)
35
+ if match_db:
36
+ exec(match_db.group(1), module.__dict__)
37
+ else:
38
+ module.__dict__['_DIRECTIONAL_BLOCKS'] = {}
39
  for func_name in func_names:
40
  pattern = rf'^(def {func_name}\(.*?\n(?:(?: .+\n|[ \t]*\n)*))'
41
  match = _re.search(pattern, source, _re.MULTILINE)
tests/test_pipeline_hardening.py CHANGED
@@ -636,6 +636,12 @@ def _import_app_functions():
636
  module.__dict__['re'] = __import__('re')
637
  # Extract function bodies
638
  import re as _re
 
 
 
 
 
 
639
 
640
  # Execute just the helper functions in an isolated namespace
641
  func_names = [
 
636
  module.__dict__['re'] = __import__('re')
637
  # Extract function bodies
638
  import re as _re
639
+ # Add _DIRECTIONAL_BLOCKS
640
+ match_db = _re.search(r'(_DIRECTIONAL_BLOCKS\s*=\s*\{.*?\n\})', source, _re.DOTALL)
641
+ if match_db:
642
+ exec(match_db.group(1), module.__dict__)
643
+ else:
644
+ module.__dict__['_DIRECTIONAL_BLOCKS'] = {}
645
 
646
  # Execute just the helper functions in an isolated namespace
647
  func_names = [
tests/test_recent_fixes.py CHANGED
@@ -343,4 +343,5 @@ if FAIL == 0:
343
  else:
344
  print(f" ❌ {FAIL} FAILED, {PASS} passed out of {PASS+FAIL} tests")
345
  print(f"{'═'*60}")
346
- sys.exit(1 if FAIL > 0 else 0)
 
 
343
  else:
344
  print(f" ❌ {FAIL} FAILED, {PASS} passed out of {PASS+FAIL} tests")
345
  print(f"{'═'*60}")
346
+ if __name__ == "__main__":
347
+ sys.exit(1 if FAIL > 0 else 0)