Files Section Documentation
This document outlines the features available within the "Files" section of the application, focusing on the data visualization components for viewing loaded file content (e.g., XML, JSON).
The primary component for viewing file data allows switching between two main modes: Tree View and Source View.
Tree View
This view renders hierarchical data in a nested, expandable tree format.
Core Features
- Hierarchical Display: Shows the nested structure of the data (e.g., XML elements, JSON objects/arrays).
- Expand/Collapse:
- Individual nodes can be expanded or collapsed using the arrow icons (▶ / ▼).
- Global controls are available:
Fully Expanded
checkbox (or similar button) to expand all nodes simultaneously.
Collapse All
button to collapse all nodes back to the root.
- Potentially a
Collapse
or Collapse One Level
button for finer control.
- Key-Value Display: Shows object properties or XML element tags alongside their corresponding values.
- XPath Copy: A context menu option (likely via right-click or a dedicated button) allows copying the XPath expression for a selected node.
Nested Grid View
When the Tree View encounters an array of objects (where each object has the same keys, representing tabular data), it renders this array as an interactive grid instead of a standard list of tree nodes.
- Tabular Display: Presents array items as rows and object keys as columns.
- Sorting: Clicking a column header allows sorting the grid data by that column (ascending/descending). Icons (↑ / ↓) indicate the current sort status.
- Filtering:
- A filter icon on column headers opens a filter menu.
- Supports various filter operations (e.g.,
contains
, equals
, starts with
, is empty
, is not empty
).
- Users can input a filter value.
- Applied filters narrow down the rows displayed in the grid.
- Column Summaries: The filter menu might also contain options to calculate summaries for a column (e.g.,
count
, sum
, average
, min
, max`).
- Expand/Collapse Grid: The grid itself can often be expanded or collapsed using dedicated icons (like expand/compress or grid view icons) to show/hide the rows within the tree structure.
- State Persistence: Grid states (like filters and sorting) might be saved per file during your session to restore the view when revisiting the file.
Source View
This view provides a raw text representation of the loaded file content, typically formatted for readability. It also includes tools for data manipulation and comparison.
- Raw Text Display: Shows the original file content (e.g., XML or JSON) as formatted text.
- Syntax Highlighting: Applies syntax highlighting for improved readability.
- Read-Only: Presented as a read-only view of the source data.
- Compare To...: A dropdown button allows selecting any other file currently loaded in the application. Selecting a file initiates a comparison, likely opening a side-by-side diff view (similar to the one in Data Lineage) showing the differences between the current file and the selected file.
- Tools Menu: A dropdown menu containing additional actions:
- Hide Values: Toggles between showing the full source with data values and showing only the structure (keys/tags) with empty values.
- Show Distinct: Toggles a view showing only distinct structural nodes, removing duplicate structures often found in arrays.
- Get Filtered Data:Displays or allows downloading the data after applying filters from the Tree View's grid component.
- Convert Format: Allows converting the current data view to JSON or XML depending on the files format./li>
- Download: A separate download button allows saving the currently displayed content (which depends on the toggle/tool states) to a local file.
- State Persistence: Remembers the user's preference for the "Hide Values" and "Show Distinct" toggles for the specific file type during your session.