Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/singleton-collections #2778

Closed

Conversation

upgreidas
Copy link

@upgreidas upgreidas commented Jun 23, 2023

Implemented singleton collection type feature. SaveCollection method of Collection DAO now checks if collection is new and if it's type is "singleton" and creates empty record with ID set to "default". It does not trigger any events. I assumed it's not necessary, because prior this, said collection does not exist.

On the UI side created new component named RecordSingleton. Now PageRecords component renders RecordSingleton or RecordsList component based on active collection's type. New component is created based on RecordUpsertPanel component, so there is some code repetition. Might create new, reusable, component like RecordForm or RecordSchemaFields in the future, so we could implement new features, new field types in shared component.

@ganigeorgiev
Copy link
Member

ganigeorgiev commented Jun 23, 2023

As mentioned in #159, this feature currently is left aside for later consideration.

For now I'll close the issue but in general, if we ever decide to merge it, we'll need:

  • unit and api tests for the backend changes
  • some additional checks to prevent record deletion on Dao level
  • some additional checks to prevent creating new records in the collection on Dao level

For the UI changes I have no strong opinion for now. The Admin UI most likely will be refactored anyway in relation to #898.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants