Skip to content

[Lens] Remember last-used configuration when switching between incompatible configurations #75204

@wylieconlon

Description

@wylieconlon

In general, users are expecting the Lens editor to have a "memory" when switching from one configuration to another, and then back. This is particular important when they are temporarily looking at something that is incompatible, such as:

  • Switching between incompatible functions, such as Date Histogram -> Terms -> Date Histogram. In this case the user would expect the field that they previously selected to still be selected
  • Switching between the XY chart and pie charts, the user is reset to the default visualization options each time. Users would expect any visualization-specific settings to be kept

cc @AlonaNadler if you can come up with other examples

Implementation note

I think these features should be implemented separately. I don't think they can or should be implemented as a general undo/redo system, because it's specific to certain flows.

  • When switching incompatible functions, the datasource could track "previous functions" for the specific dimension, and restore on switch. This state should not be saved in the Lens doc.
  • When switching between completely separate chart types, the editor frame would need to be involved to store a "previous state" and restore it by applying equality checks, for example equality of the column IDs and metadata. This should not be saved in the Lens doc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature:LensTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//enhancementNew value added to drive a business resultimpact:needs-assessmentProduct and/or Engineering needs to evaluate the impact of the change.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions