feat: add records mode (long-format view) for drill-down
Implement records mode (long-format view) when drilling into aggregated cells. Key changes: - DrillIntoCell now creates views with _Index on Row and _Dim on Column - GridLayout detects records mode and builds a records list instead of cross-product row/col items - Added records_display() to render individual cell values in records mode - GridWidget and CSV export updated to handle records mode rendering - category_names() now includes virtual categories (_Index, _Dim) - Tests updated to reflect virtual categories counting toward limits Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
This commit is contained in:
@ -459,11 +459,15 @@ pub fn export_csv(model: &Model, view_name: &str, path: &Path) -> Result<()> {
|
||||
}
|
||||
let row_values: Vec<String> = (0..layout.col_count())
|
||||
.map(|ci| {
|
||||
layout
|
||||
.cell_key(ri, ci)
|
||||
.and_then(|key| model.evaluate_aggregated(&key, &layout.none_cats))
|
||||
.map(|v| v.to_string())
|
||||
.unwrap_or_default()
|
||||
if layout.is_records_mode() {
|
||||
layout.records_display(ri, ci).unwrap_or_default()
|
||||
} else {
|
||||
layout
|
||||
.cell_key(ri, ci)
|
||||
.and_then(|key| model.evaluate_aggregated(&key, &layout.none_cats))
|
||||
.map(|v| v.to_string())
|
||||
.unwrap_or_default()
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
out.push_str(&row_values.join(","));
|
||||
|
||||
Reference in New Issue
Block a user