refactor(tips): Eliminar sistema de tips de VirtualAdvancedTable
VirtualAdvancedTable ya NO gestiona tips internamente. El carrusel ahora vive en zsimifactu/StatusLine (v2.0). Eliminado: - table_tips[] y TIP_ROTATION_FRAMES de types.zig - Re-exports de table_core.zig - frame_count y tip_index de VirtualAdvancedTableState - current_tip de VirtualAdvancedTableResult - Lógica de rotación (frame_count % TIP_ROTATION) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4cdc8c44e2
commit
63daca0827
4 changed files with 0 additions and 43 deletions
|
|
@ -40,8 +40,6 @@
|
||||||
// Types - Enums, structs, constantes
|
// Types - Enums, structs, constantes
|
||||||
pub const types = @import("types.zig");
|
pub const types = @import("types.zig");
|
||||||
// Re-exports de types
|
// Re-exports de types
|
||||||
pub const table_tips = types.table_tips;
|
|
||||||
pub const TIP_ROTATION_FRAMES = types.TIP_ROTATION_FRAMES;
|
|
||||||
pub const MAX_EDIT_BUFFER_SIZE = types.MAX_EDIT_BUFFER_SIZE;
|
pub const MAX_EDIT_BUFFER_SIZE = types.MAX_EDIT_BUFFER_SIZE;
|
||||||
pub const MAX_PENDING_COLUMNS = types.MAX_PENDING_COLUMNS;
|
pub const MAX_PENDING_COLUMNS = types.MAX_PENDING_COLUMNS;
|
||||||
pub const MAX_CELL_VALUE_LEN = types.MAX_CELL_VALUE_LEN;
|
pub const MAX_CELL_VALUE_LEN = types.MAX_CELL_VALUE_LEN;
|
||||||
|
|
|
||||||
|
|
@ -4,31 +4,10 @@
|
||||||
//! - Enums de estado y dirección
|
//! - Enums de estado y dirección
|
||||||
//! - Structs de configuración y colores
|
//! - Structs de configuración y colores
|
||||||
//! - Constantes globales
|
//! - Constantes globales
|
||||||
//! - Tips proactivos
|
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const Style = @import("../../core/style.zig");
|
const Style = @import("../../core/style.zig");
|
||||||
|
|
||||||
// =============================================================================
|
|
||||||
// Tips Proactivos (FASE I)
|
|
||||||
// =============================================================================
|
|
||||||
|
|
||||||
/// Tips de atajos de teclado para mostrar en StatusLine
|
|
||||||
/// Rotan cada ~10 segundos para enseñar atajos al usuario
|
|
||||||
pub const table_tips = [_][]const u8{
|
|
||||||
"Tip: F2 o Space para editar celda",
|
|
||||||
"Tip: Tab/Shift+Tab navega entre celdas",
|
|
||||||
"Tip: Ctrl+N crea nuevo registro",
|
|
||||||
"Tip: Ctrl+Delete o Ctrl+B borra registro",
|
|
||||||
"Tip: Ctrl+Shift+1..9 ordena por columna",
|
|
||||||
"Tip: Ctrl+Home/End va al inicio/fin",
|
|
||||||
"Tip: Enter confirma y baja, Escape cancela",
|
|
||||||
"Tip: Al editar, tecla directa reemplaza todo",
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Frames entre rotación de tips (~10s @ 60fps)
|
|
||||||
pub const TIP_ROTATION_FRAMES: u32 = 600;
|
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// Constantes globales
|
// Constantes globales
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
|
||||||
|
|
@ -123,12 +123,6 @@ pub const VirtualAdvancedTableState = struct {
|
||||||
/// Indica si hubo doble click este frame
|
/// Indica si hubo doble click este frame
|
||||||
double_clicked: bool = false,
|
double_clicked: bool = false,
|
||||||
|
|
||||||
/// Frame counter para animaciones
|
|
||||||
frame_count: u32 = 0,
|
|
||||||
|
|
||||||
/// Índice del tip actual (para tips proactivos rotativos)
|
|
||||||
tip_index: u8 = 0,
|
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
// Buffers persistentes para texto formateado (evitar stack buffer escape)
|
// Buffers persistentes para texto formateado (evitar stack buffer escape)
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
@ -281,7 +275,6 @@ pub const VirtualAdvancedTableState = struct {
|
||||||
self.filter_text_changed = false;
|
self.filter_text_changed = false;
|
||||||
self.chip_changed = false;
|
self.chip_changed = false;
|
||||||
self.changed_chip_index = null;
|
self.changed_chip_index = null;
|
||||||
self.frame_count +%= 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
|
||||||
|
|
@ -106,9 +106,6 @@ pub const VirtualAdvancedTableResult = struct {
|
||||||
edited_value: ?[]const u8 = null,
|
edited_value: ?[]const u8 = null,
|
||||||
previous_row: ?usize = null,
|
previous_row: ?usize = null,
|
||||||
|
|
||||||
// Tips
|
|
||||||
current_tip: ?[]const u8 = null,
|
|
||||||
|
|
||||||
pub fn getRowChanges(self: *const VirtualAdvancedTableResult) []const table_core.PendingCellChange {
|
pub fn getRowChanges(self: *const VirtualAdvancedTableResult) []const table_core.PendingCellChange {
|
||||||
return self.row_changes[0..self.row_changes_count];
|
return self.row_changes[0..self.row_changes_count];
|
||||||
}
|
}
|
||||||
|
|
@ -428,16 +425,6 @@ pub fn virtualAdvancedTableRect(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tips
|
|
||||||
list_state.frame_count +%= 1;
|
|
||||||
|
|
||||||
if (has_focus and !list_state.isEditing()) {
|
|
||||||
if (list_state.frame_count % table_core.TIP_ROTATION_FRAMES == 0) {
|
|
||||||
list_state.tip_index = @intCast((list_state.tip_index + 1) % table_core.table_tips.len);
|
|
||||||
}
|
|
||||||
result.current_tip = table_core.table_tips[list_state.tip_index];
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue