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

New boolean marker for attribute representative #281

Closed
novoj opened this issue Oct 4, 2023 · 6 comments
Closed

New boolean marker for attribute representative #281

novoj opened this issue Oct 4, 2023 · 6 comments
Assignees
Labels
breaking change Backward incompatible data model change enhancement New feature or request
Milestone

Comments

@novoj
Copy link
Collaborator

novoj commented Oct 4, 2023

For better orientation in evitaLab it would be nice to be able to mark one or more attributes as representative attributes of the entity. Values of those attributes will be used in evitaLab instead of primary key when displaying value of the reference in the table cell. Representative attributes will be also automatically displayed along with entity data in the default entity listing view.

If there are more of such attributes they will be rendered next to each other joined by comma. If the attribute is localized, it will be displayed in the cell only if the language is selected. The order of the representative attributes will be driven by the order of the attribute in the entity schema.

Is it correct @lukashornych?

@novoj novoj added the enhancement New feature or request label Oct 4, 2023
@novoj novoj added this to the Alpha milestone Oct 4, 2023
@novoj novoj self-assigned this Oct 4, 2023
@lukashornych
Copy link
Collaborator

Yeah, thats correct. Especially, I like the idea of using these attributes for rendering default grid view.

@novoj novoj added the breaking change Backward incompatible data model change label Oct 11, 2023
novoj added a commit that referenced this issue Oct 12, 2023
For better orientation in evitaLab it would be nice to be able to mark one or more attributes as representative attributes of the entity. Values of those attributes will be used in evitaLab instead of primary key when displaying value of the reference in the table cell. Representative attributes will be also automatically displayed along with entity data in the default entity listing view.

If there are more of such attributes they will be rendered next to each other joined by comma. If the attribute is localized, it will be displayed in the cell only if the language is selected. The order of the representative attributes will be driven by the order of the attribute in the entity schema.
@novoj
Copy link
Collaborator Author

novoj commented Oct 12, 2023

It turned out to be quite a challenge. I had to split the AttributeSchema into two different schemas:

  • EntityAttributeSchemaContract (used on entity level, contains representative marker)
  • AttributeSchemaContract (used on reference level, doesn't contain representative marker)

This led to an abstraction changes and generics tweaks along the codebase. Can you @Khertys check how much work will it take to adapt C# client and the schema builders?

@lukashornych there are a few TODOs for you in the codebase where I wasn't sure with the refactor in APIs. Also can you alter the evitaLab to take the representative flag into an account? I'll provide you with an example index in follow-up comment.

@novoj
Copy link
Collaborator Author

novoj commented Oct 12, 2023

The new data set is available at:

wget https://evitadb.io/download/representative-moda.zip

@lukashornych
Copy link
Collaborator

@novoj GQL/REST APIs are finished. I'll try to quickly implement it in the evitaLab and let you know.

@lukashornych
Copy link
Collaborator

@novoj evitaLab is finished and released and merged into evitaDB in #281 branch ready to be released.

@novoj
Copy link
Collaborator Author

novoj commented Oct 20, 2023

Merged into dev.

@novoj novoj closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Backward incompatible data model change enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants