Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an History Panel #90

Open
PierreRaybaut opened this issue Jul 22, 2024 · 1 comment
Open

Add an History Panel #90

PierreRaybaut opened this issue Jul 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@PierreRaybaut
Copy link
Contributor

PierreRaybaut commented Jul 22, 2024

Here is what an History Panel could looks like:

2024-07-22.13-46-56.mp4

Main features of the History Panel:

  • Record all actions from signal/image creation to processing actions
  • Ability to replay a single action or a sequence of actions
  • Restore the selection state (optionally) before replaying the action
  • Save/load history actions to/from the workspace HDF5 file
@PierreRaybaut PierreRaybaut added the enhancement New feature or request label Jul 22, 2024
@PierreRaybaut
Copy link
Contributor Author

PierreRaybaut commented Jul 22, 2024

Issue: Development Ideas for the History Panel

Branch: feature/history-panel


Summary of Original Ideas (for posterity)

  1. Action Tracking

    • Each action is represented as a line, allowing replaying the workflow from the start.
    • Actions are objects containing:
      • A description (displayed in the UI).
      • Method identifier (class name, method name) and associated arguments:
        • Dataset-type parameters.
        • Signal/image arguments replaced with local identifiers (e.g., s003).
      • An attribute with the DataLab workspace state:
        • Determines if the action can be executed.
        • Validates the number of signals/images and data array dimensions.
      • Serialization/deserialization methods for the action object.
      • A method to execute the action.
  2. History Panel Management

    • Contains multiple lists of actions:
      • A new list is created each time the workspace is cleared.
      • Each list may have a default title based on the timestamp.
    • Handles backward compatibility:
      • Verifies action references upon initialization.
      • Removes incompatible actions, optionally warning the user.
      • Future support for backward compatibility by updating method/class names.
  3. Widget Capabilities

    • Visualize the action tree: branches correspond to action lists.
    • Remove action lists or specific actions.
    • Display workspace state for each action:
      • Left: table of signals with data sizes.
      • Right: table of images with dimensions.
    • Highlight executable actions (with icons).
    • Execute actions or sequences from a compatible workspace state:
      • Replay actions with stored parameters or user-modified ones.
      • Support interactive execution (dialogs open with saved parameters).
      • Enable non-interactive execution (reuse parameters without dialogs).
  4. Advanced Features

    • Button to generate macros from all or part of the history.

Suggested Priority

  • Critical:

    • Implement action serialization/deserialization and execution.
    • Add workspace state validation for actions.
  • Medium:

    • Backward compatibility handling.
    • Widget enhancements for visualization and usability.
  • Optional:

    • Non-interactive execution.
    • Macro generation.

Moving Forward: Next Steps

The question is:

  1. Is it really an interesting feature?
  2. Or would it be more interesting to implement something like a sequencer? (that would be quite close to the feature shown in the video, except that recording actions would have to be triggered manually by the user)

Another complementary feature could be to generate code (in a macro) from a sequence of actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant