Skip to content

Commit

Permalink
Merge pull request #7 from OpenForgeProject/add-sort
Browse files Browse the repository at this point in the history
feat: sort log entries and message groups alphabetically in LogViewer
  • Loading branch information
dermatz authored Dec 4, 2024
2 parents cb34b2c + 590b386 commit 874eff1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

## [Unreleased]

## [1.5.0] - 2024-12-04

### Changed

- sort log entries and message groups alphabetically

## [1.4.0] - 2024-11-20

### Added
Expand Down
8 changes: 4 additions & 4 deletions src/logViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export class LogViewerProvider implements vscode.TreeDataProvider<LogFile>, vsco
arguments: [filePath, entry.lineNumber]
}
);
})
}).sort((a, b) => a.label.localeCompare(b.label)) // Sort entries alphabetically
);
});
}).sort((a, b) => a.label.localeCompare(b.label)); // Sort message groups alphabetically

const logFile = new LogFile(`${level} (${entries.length}, grouped)`, vscode.TreeItemCollapsibleState.Collapsed, undefined, messageGroups);
logFile.iconPath = getIconForLogLevel(level);
Expand All @@ -152,12 +152,12 @@ export class LogViewerProvider implements vscode.TreeDataProvider<LogFile>, vsco
arguments: [filePath, entry.lineNumber]
}
);
})
}).sort((a, b) => a.label.localeCompare(b.label)) // Sort entries alphabetically
);
logFile.iconPath = getIconForLogLevel(level);
return logFile;
}
});
}).sort((a, b) => a.label.localeCompare(b.label)); // Sort log files alphabetically
}

getLogFilesWithoutUpdatingBadge(dir: string): LogFile[] {
Expand Down

0 comments on commit 874eff1

Please sign in to comment.