Loading
Extract BlameColumnResizer from blame_info.vue
What does this MR do and why?
Extracts the drag handle, width persistence, and breakpoint behaviour from blame_info.vue into a new standalone blame_column_resizer.vue component.
This is a pure refactor — no visual or behavioural change. It is a prerequisite for !247210 (closed), which uses BlameColumnResizer in the chunked grid path as well.
Changes
constants.js
- Adds
BLAME_AGE_COLORS,BLAME_COLUMN_DEFAULT_WIDTH,BLAME_COLUMN_MAX_WIDTH,BLAME_COLUMN_MIN_WIDTH, andBLAME_COLUMN_WIDTH_STORAGE_KEYso both viewer paths can share them.
blame_column_resizer.vue (new)
- Owns the
AccessiblePanelResizerwiring,PanelBreakpointInstancelistener, andlocalStoragepersistence. - The caller keeps the resulting width via
v-modelbecause only the caller knows how to apply it (container width vs. grid track).
blame_info.vue
- Drops ~50 lines of resizer logic.
- Replaces the inline
<accessible-panel-resizer>with<blame-column-resizer v-model="containerWidth" />.
Tests
blame_column_resizer_spec.js(new) — full coverage of the extracted component.blame_info_spec.js— trimmed to only assert the width is applied correctly; breakpoint/persistence tests moved to the new spec.
Checklist
-
blame_info.vuebehaviour is unchanged -
BlameColumnResizerhandles desktop/mobile breakpoint correctly - Width is persisted to and restored from
localStorage - Drag handle is hidden on non-desktop viewports