open-block-explorer icon indicating copy to clipboard operation
open-block-explorer copied to clipboard

Feature Request - Expand all transaction data

Open donnyquixotic opened this issue 2 years ago • 2 comments

Feature: Toggle All Transaction Data in TX Table

Overview

Implement a "Toggle All" feature for transaction data in the TX table, allowing users to expand or collapse all transaction data simultaneously.

Example of an action that is truncated and there is no way to view the full data: https://explorer-test.telos.net/transaction/712d8c06109bfcb5d93d4f84a08d5eee9ef19898fbdebfc168be866cd7053881

Current Behavior

  • Transaction data in the TX table is initially collapsed.
  • Users can expand or collapse individual rows of transaction data.
  • User selections are not remembered upon navigation.

Desired Behavior

  • Add a toggle feature in the "Data" header of the TX table.
  • Use chevron icons to indicate expand/collapse state.
  • Allow users to expand or collapse all transaction data with a single action.
  • Remember the last user selection for the global toggle.

Detailed Requirements

Toggle Functionality

  1. Add a chevron icon in the "Data" header of the TX table.
  2. Clicking the chevron should toggle all transaction data:
    • Chevron pointing down: expand all data
    • Chevron pointing up: collapse all data

Default State

  • By default, all transaction data should be collapsed.
  • The chevron should initially point downward.

User Interactions

  • Clicking the chevron when pointing down should expand all data rows.
  • Clicking the chevron when pointing up should collapse all data rows.
  • Users can still expand or collapse individual data rows.

State Management

  • The global toggle state (expanded/collapsed) should be remembered across navigation.
  • Individual row states should not be remembered across navigation.
  • If any individual rows are manually expanded/collapsed, the chevron state should remain unchanged.

Chevron State

  • The chevron will always be pointing either up or down, indicating the action that will occur when clicked.
  • Chevron pointing down: clicking will expand all rows
  • Chevron pointing up: clicking will collapse all rows
  • The chevron state is not affected by individual row expansions/collapses

Acceptance Criteria

  1. The "Data" header includes a clickable chevron icon.
  2. Clicking the chevron expands or collapses all transaction data.
  3. The chevron icon changes direction based on the current global state.
  4. The global toggle state is remembered across page navigation.
  5. Individual row expansions/collapses do not affect the global toggle state or chevron direction.
  6. The feature works correctly with varying amounts of data in the table.
  7. Add tooltip to chevron explaining actions : "Collapse Data", "Expand Data"

donnyquixotic avatar Aug 18 '23 22:08 donnyquixotic

And I assume this option would be somewhere right above the table in this area? image

smilingkylan avatar Oct 11 '23 20:10 smilingkylan

And I assume this option would be somewhere right above the table in this area? image

Yea, a toggle should do the trick. There's a related bug where if you expand one row, that row remains expanded on data update and/or page navigation. We want the following behavior:

  • on expand row, disable live transactions (if enabled and on front page)
  • collapse rows if on first page and live transactions is toggled on again
  • collapse rows on page navigation

donnyquixotic avatar Nov 12 '23 23:11 donnyquixotic