dsh-csv-viewer: DSH Web-side CSV/TSV Table Viewer Plugin

In the DSH ecosystem, when dealing with exported CSV or TSV data, files often contain a large number of rows or complex formats. Viewing them directly in the sidebar can cause stuttering and make it difficult to filter and sort quickly. The hi-wenw/dsh-csv-viewer plugin solves this preview experience issue.

Plugin Positioning and Features

This is a DSH Web plugin designed to add a dedicated viewer for .csv and .tsv files to dsh-better-sidebar. Maintained by hi-wenw and licensed under MIT, it addresses the rendering performance issues of large data tables through virtualization technology and supports complex CSV format parsing.

Core features include:

  • Automatic Delimiter Detection: Supports files delimited by commas, tabs, semicolons, and pipes.
  • Virtualized Rendering: Avoids creating DOM nodes row-by-row to prevent browser stuttering with large datasets.
  • Interactive Capabilities: Supports case-insensitive search, and ascending/descending/reset sorting for numerical and text columns.
  • Display Modes: Offers two views: Table and Raw.
  • Format Support: Handles CSV quoting, escaped quotes, CRLF, and newline characters.

Installation and Activation

Before installation, ensure the environment meets the dependency requirements: dsh-better-sidebar version >= 0.19.0 and React version >= 18.2.0.

Install the plugin using the official command:

dsh plugin --profile web add https://github.com/hi-wenw/dsh-csv-viewer.git

After installation, restart DSH Web and perform a hard refresh (Ctrl+Shift+R) in your browser to load the new plugin. Then, open a CSV or TSV file from the sidebar to use the viewer.

Typical Usage

Once the file is opened, the system automatically determines the delimiter based on the file content. In Table mode, you can click on column headers to sort, or use the search box to locate key fields. If you need to view the raw content or handle specific formats, switch to Raw mode.

Use Cases and Notes

This plugin is suitable for scenarios where data analysis, log viewing, or result export needs to be handled directly within the DSH Web interface.

Since the plugin runs with DSH client privileges, it is recommended to review the source code and license before installation. The plugin’s development and packaging paths are typically located at lib/client.js (client bundle), lib/index.js (entry), and cordis.patch.yml (registration).

Summary

dsh-csv-viewer provides a lightweight and efficient solution for CSV/TSV preview. Especially when handling large datasets, the virtualization technology ensures a smooth user interface. For more details, please refer to the project directory: https://www.skillhub.cn/plugins/hi-wenw/dsh-csv-viewer or GitHub: https://github.com/hi-wenw/dsh-csv-viewer.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye