Closed JbPasquier closed 7 months ago
I missed this one. Now that I have a clearer idea on what is a Supporting Evidence, what is an Assurance and what is a Certification, I can see an issue with this.
We can't mix content with different properties in the same display. This is a framework limitation based on the specification. You can see it like trying to put a plane in a cardboard box made for trains.
We should have handled this one beforehand the implementation. It was unclear to us that those two things where related.
How can we implement that now?
- Quick one, we could have a third entrypoint on a producer, with the mixed content merged in.
- Or, cleanest one would be to merge certification and supporting evidence while keeping their separate @type. But that'll require a lot of work to re-do the component with this new behaviour.
- Or, easiest one would be to split it in two on the display. You'll always have supporting evidence on top then certifications on the bottom.
- Or, maybe certifications aren't plane, maybe they're trains too?
It's still unclear to me what's the relation between a certification and a supporting evidence. Shouldn't a Certification be a Supporting Evidence with an ofn:Classification - ofn:label of Certification?
Could this work?
Edit: Let me try another way with a custom implementation on front-end side. We may want to rethink this later if ~10x more producers enter the ring.
Edit 2 : Looks good. Forget about what I said at first. While it's a bit tricky, my custom implementation does the trick for your use case without any modification on your api model. I'll aim to deliver it today.
Done with the custom implementation.
Looks like you've been doing wonderful things @JbPasquier , that I don't quite understand, but thank you!
This is close: missing Source field, link to download doc and 'read more'
NB. Source is now working for the other evidence (yay) - spacing a bit funny?
I'm fixing the missing source for certification.
@mkllnk Can you point me which fields I should add?
I'm currently displaying:
Am I missing some others?
@mkllnk and @mariocarabotta are going to check the data for these fields @JbPasquier
Once this is done, can we also apply this logic to how the Supporting Evidence filter works on the Producer list? This would clean up the problems we are having in a range of other issues
Supporting Evidence filter works on the Producer list?
No, the way I implemented it here works because there is really only a small amount of data. It's just one producer's data. If this custom implementation were to filter the entire list of producers, it would take a really long time to filter anything.
The main issue here is the complexity of the data: filtering many certifications within many supporting evidence within many producers (within many products on the other list), combined with an 'and/or' filter.
Maybe we can think of some data adaptation. @mkllnk would it be complex for you to pre-calculate all of this and add three fields directly on a producer/products with all its relevant Supporting Evidence
, Assurance Partners
and Certifications
filters? The same way you did ofn:Produce_category
?
Moving this discussion on the proper issue, there: https://github.com/openfoodfoundation/sib-discovery-components/issues/20#issuecomment-2011014054
ah ok, we'll chat here and get back to you
On Wed, 20 Mar 2024 at 20:55, Jean-Baptiste Pasquier < @.***> wrote:
Supporting Evidence filter works on the Producer list?
No, the way I implemented it here works because there is really only a small amount of data. It's just one producer's data. If this custom implementation were to filter the entire list of producers, it would take a really long time to filter anything.
The main issue here is the complexity of the data: filtering many certifications within many supporting evidence within many producers (within many products on the other list), combined with an 'and/or' filter.
Maybe we can think of some data adaptation. @mkllnk https://github.com/mkllnk would it be complex for you to pre-calculate all of this and add three fields directly on a producer/products with all its relevant Supporting Evidence, Assurance Partners and Certifications filters? The same way you did ofn:Produce_category?
— Reply to this email directly, view it on GitHub https://github.com/openfoodfoundation/openfoodnetwork/issues/12237#issuecomment-2009163951, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWGXSHJKMECL5VWY22WQALYZFMIXAVCNFSM6AAAAABEI355RSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZGE3DGOJVGE . You are receiving this because you were assigned.Message ID: @.***>
OK, this one is CLOSED
Kirsten has added a certification to Pukawidgee, has been confirmed, so there is now test data