Draft: Make YAML editor full height and sticky in split view mode
Summary
- Makes the YAML editor sidebar sticky in split-view (advanced UI) mode so it stays visible while scrolling through long rule configurations
- Sets the YAML editor to fill available viewport height using
position: stickywith proper CSS Grid alignment - Disables the
v-dynamic-heightdirective on the split-view YAML editor so Monaco fills its sticky container instead of calculating its own viewport height
Changes
| File | Change |
|---|---|
yaml_editor.vue |
Add useDynamicHeight prop passthrough to SourceEditor
|
security_policies.scss |
Add .security-policies-sidebar-sticky class with sticky positioning, viewport height, and grid alignment |
editor_layout.vue |
Apply sticky class conditionally in split-view mode; pass use-dynamic-height="false" to split-view YAML editor |
editor_layout_spec.js |
Tests for sticky class application, collapsed state, and standard view |
yaml_editor_spec.js |
Tests for useDynamicHeight prop forwarding |
How to validate
- Enable feature flags:
Feature.enable(:security_policies_split_view)andFeature.enable(:security_policies_kev_filter) - Go to Secure → Policies → Edit an approval policy
- Enable "Advanced editor" toggle
- Add multiple rules to make the left pane tall
- Scroll down — the YAML editor should remain visible and sticky
- Collapse/expand the YAML pane — should work correctly
- Resize panes via the drag handle — sticky should respect new width
Related
Closes #577806