shesha-io / shesha-framework

An open-source Low-Code development framework for .NET developers. Create .NET based business applications with 80% less code.
https://shesha.io
Apache License 2.0
314 stars 48 forks source link

James/en/627 #1282

Closed James-Baloyi closed 3 weeks ago

James-Baloyi commented 1 month ago

Embed Entity Reference component to Autocomplete component

https://github.com/shesha-io/shesha-framework/issues/627

AlexStepantsov commented 1 month ago

please, add a component migration from old to new properties

James-Baloyi commented 1 month ago

@AlexStepantsov can you elaborate more on that? Like which properties do I need to migrate?

AlexStepantsov commented 1 month ago

@James-Baloyi Old QuickView properties to the new EntityReference properties.

The migration should preserve the behavior of components that are already used on forms, as it would have been before the changes For example, set the default of entityReferenceType to "QuickView" mode. Copy quickviewFormPath, quickviewDisplayPropertyName, etc to the new formIdentifier, displayProperty,...

btw, why didn't you remove the old properties (quickviewFormPath, quickviewDisplayPropertyName and other)?

James-Baloyi commented 1 month ago

@AlexStepantsov Thanks. I've added Quickview properties to migrations and removed unused ones from the Autocomplete props object

AlexStepantsov commented 1 month ago

@James-Baloyi You should not change existing migration, you have to add a new migration.

I will make changes

AlexStepantsov commented 1 month ago

Hi @James-Baloyi

PLease check follow:

  1. Your changes don't work at all.
  2. You added settings (markup), but there are no corresponding changes in interfaces and models
  3. You did not implement main requirement - Embed the 'Entity Reference' component. Mainly you just changed settings and add 'EntityReference' component to the markup but it doesn't work (including the added settings are not used)
  4. You left the old settings in interfaces and models and did not change their use in the component code (accordingly, the old settings affect the behavior of component)
  5. And lastly, there is no migration from old settings model to the new one... (you added something, but it seems like you did it at random)