teal icon indicating copy to clipboard operation
teal copied to clipboard

User experience for failures of teal_transform_module

Open donyunardi opened this issue 6 months ago • 6 comments

Summary

Currently, users can apply multiple teal_transform_module instances to a module.

If one of the teal_transform_module fails, the current behavior is as follows:

  • Validation or assertion occurs to warn users that the transformation cannot be completed. In addition, the border box around the teal_transform_module will turn red to visually inform the user that the transformation failed to run.
  • The data continues to be passed to the other teal_transform_module for processing.

To illustrate this, let's say a teal module has two teal_transform_module instances assigned to it:

  1. The first teal_transform_module creates or mutates a new variable in a dataset.
  2. The second teal_transform_module renames several values in a column.

If the first teal_transform_module fails, the app user can still execute the second teal_transform_module. This is the current behavior of our teal_transform_module feature.

The concern is that if the teal_transform_module represents sequential steps in generating a certain analysis for a teal module, it may not make sense to allow the user to execute the second teal_transform_module until the issue with the first one is resolved. By doing this, app users may be prevented from generating incorrect analyses or plots.

Then, what is better UX for failures in teal_transform_module?

  1. Keep current behavior (ignore error from failing teal_transform_module and pass (unmodified) data further).
  2. Prevent other teal_transform_module to run, if the first one fail, by passing error further. It will require adding req(data()) in all observeEvent and renderXyz added in teal_transform_module.

donyunardi avatar Aug 08 '24 22:08 donyunardi