Skip to content

Undo of deleting a property does not restore a view grouped by it #1324

Description

@yuxi-liu-wired

Steps

  1. Create a text property "note" and set it on a few blocks.
  2. Add a table view and group it by "note".
  3. Delete the property "note".
  4. Press Ctrl+Z.

Expected

"note" is back, and the view is grouped by "note" again.

Actual

"note" is back, but the view is no longer grouped: its "group by" setting stays empty.

Notes

The view's group-by setting (:logseq.property.view/group-by-property, type :property) is a reference to the property entity, so deleting the property removes it. The undo re-creates the property but does not restore references to it from other nodes (#1338, same family as logseq/logseq#1311). The view's sort and filter settings store the property as a value, not a reference, so they are not affected.

Found with a probe of undo on single operations, replayed on upstream master 16c4ed1a0: before the delete the view's group-by is :user.property/note; after the delete and after the undo it is empty.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions