Skip to content

Persistence data plugin should take into account the object shape #9994

Closed

Description

@oandregal

The persistence data plugin helps to persist parts of the state in between sessions. When the data persisted is an object (e.g. the preferences key in the editor, nux, or edit-post stores) new keys added to that object will be invalidated once the persistence mechanism retrieves old data from cache.

How to test

  • Clean browser application cache, check out master branch, and run Gutenberg.
  • Create a new branch and add some code that adds a new key to the preferences object whose value is true by default.
  • Execute that new branch.

Expected result is that the preferences object will have the new truthy value but instead it has the state retrieved from local storage (which doesn't have the new added key).

Activity

  1. added
    [Type] Bug
    on Sep 18, 2018
  2. oandregal commented on Sep 18, 2018

    @oandregal
    MemberAuthor

    cc @aduth @youknowriad in case it is of any help, I ran into this while working on #9760

  3. youknowriad commented on Sep 18, 2018

    @youknowriad
    Contributor

    This was working at some point, so I think it's a regression.

  4. aduth commented on Sep 18, 2018

    @aduth
    Member

    Could be related to #8341

  5. self-assigned this
    on Oct 12, 2018
  6. added
    [Package] Data
    [Type] Regression
    on Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Package] Data[Type] Bug[Type] Regression

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions