Coder Social home page Coder Social logo

Comments (9)

franciscolourenco avatar franciscolourenco commented on June 27, 2024

The same happens in existing posts, for any array item where the collapsed preference has not been saved yet.

from payload.

franciscolourenco avatar franciscolourenco commented on June 27, 2024

Aside: In our use-case it would be preferable if the preferences would not be persisted in the document creation page.

from payload.

DanRibbens avatar DanRibbens commented on June 27, 2024

We need to make sure that the preferences for fields only send if the document ID is present. This should be fixed with one small condition being added to the collapsible field as well as any other field level preferences.

from payload.

franciscolourenco avatar franciscolourenco commented on June 27, 2024

@DanRibbens that would be ideal. Although note that the issue in this bug report is not exactly that one. It is specifically related to preferences of collapsibles when used inside of array fields, and happens in existing documents as well, so they can probably be dealt with separately.

It is a less important issue though. What you describe seems more important and would have the most impact in usability.

from payload.

franciscolourenco avatar franciscolourenco commented on June 27, 2024

Created another ticket to track that issue: #5747

from payload.

jacobsfletch avatar jacobsfletch commented on June 27, 2024

Hey @franciscolourenco just looked into this and the root of the problem here is exactly what @DanRibbens suggested. In your screen recording I can see that your preferences doc has the key property set to undefined. This should be the ID of the document, but obviously new documents don't have a key yet. They simply shouldn't save any preferences (just as you've described in #5747). This fix will close both issuesβ€”initCollapsed was not being respected because it wrongly found preferences which held it open.

from payload.

franciscolourenco avatar franciscolourenco commented on June 27, 2024

I can reproduce this issue in an existing document, so it seems they are independent issues:

  • If there are no preferences for the array field at all, the initCollapsed option is respected.
  • From the moment that preferences are saved for one of the array items, initCollapsed is ignored for all array items, and it defaults to expanded if an array item doesn't have preferences.

This issue seems minor, but still there:

Existing.Document.mp4

from payload.

jacobsfletch avatar jacobsfletch commented on June 27, 2024

Thank you for the follow-up πŸ‘. @PatrikKozak can you look into this?

from payload.

PatrikKozak avatar PatrikKozak commented on June 27, 2024

@jacobsfletch @franciscolourenco Yup looking into this.

from payload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.