flagbit / akeneo-reference-entity-table-bundle

An Akeneo PIM Bundle by Flagbit that adds a multi-dimensional data representation in the form of tables as an attribute for PIM Enterprise Reference Entities
MIT License
7 stars 2 forks source link

Introduce single_reference_entity type #24

Closed flagbird closed 3 years ago

flagbird commented 3 years ago

The single_reference_entity allows to select a Reference Entity in the config and its Records for that column type in a Record.

codecov-commenter commented 3 years ago

Codecov Report

Merging #24 (57b588c) into master (239ef46) will decrease coverage by 0.02%. The diff coverage is 94.64%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #24      +/-   ##
============================================
- Coverage     95.06%   95.03%   -0.03%     
  Complexity       87       87              
============================================
  Files            39       41       +2     
  Lines           729      785      +56     
  Branches         39       42       +3     
============================================
+ Hits            693      746      +53     
  Misses            7        7              
- Partials         29       32       +3     
Flag Coverage Δ Complexity Δ
backend 99.59% <ø> (ø) 87.00 <ø> (ø)
frontend 92.92% <94.64%> (+0.20%) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...ute/JsonSchema/TableAttributeCreationValidator.php 100.00% <ø> (ø) 3.00 <0.00> (ø)
...tribute/JsonSchema/TableAttributeEditValidator.php 100.00% <ø> (ø) 3.00 <0.00> (ø)
...y/attribute/table/type/single-reference-entity.tsx 93.10% <93.10%> (ø) 0.00 <0.00> (?)
...tity/record/table/type/single-reference-entity.tsx 96.00% <96.00%> (ø) 0.00 <0.00> (?)
...blic/reference-entity/attribute/table/type/type.ts 89.65% <100.00%> (+0.36%) 0.00 <0.00> (ø)
.../public/reference-entity/record/table/type/type.ts 88.46% <100.00%> (+0.46%) 0.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 239ef46...57b588c. Read the comment docs.

flagbird commented 3 years ago

Though i think the select could be rather derived from the default Akeneo reference searchable select (like on product). With multiple same labels it is hard to distinguish between entries and with many entries one may have to scroll a lot.

I considered that, but because it was easier for me to use the HTML select, I chose to keep the first release of the feature more simpler. This is similar to the choice not to use the akeneo-design-system for the Akeneo 5 update (yet). Some other places of this bundle also need usability improvements, that can be introduced step by step. I've created #25 to keep track of that improvement.