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

View producer certifications #12237

Closed
JbPasquier opened this issue Mar 6, 2024 · 8 comments
Closed

View producer certifications #12237

JbPasquier opened this issue Mar 6, 2024 · 8 comments
Assignees

Comments

@JbPasquier
Copy link
Collaborator

Image

Kirsten has added a certification to Pukawidgee, has been confirmed, so there is now test data

@JbPasquier
Copy link
Collaborator Author

JbPasquier commented Mar 6, 2024

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.

@JbPasquier
Copy link
Collaborator Author

Done with the custom implementation.

image

@kirstenalarsen
Copy link
Contributor

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'

Image

NB. Source is now working for the other evidence (yay) - spacing a bit funny?

Image

@JbPasquier
Copy link
Collaborator Author

I'm fixing the missing source for certification.

@mkllnk Can you point me which fields I should add?

I'm currently displaying:

  • ofn:Creation_date
  • ofn:Title
  • ofn:Classification - ofn:label
  • ofn:Certification_status
  • ofn:Expiry_date
  • ofn:Certification_ID
  • ofn:service_provider_label
  • ofn:service_provider_uri
  • ofn:Description
  • ofn:Documentation_permissions

Am I missing some others?

@kirstenalarsen
Copy link
Contributor

@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

@JbPasquier
Copy link
Collaborator Author

JbPasquier commented Mar 20, 2024

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: openfoodfoundation/sib-discovery-components#20 (comment)

@kirstenalarsen
Copy link
Contributor

kirstenalarsen commented Mar 20, 2024 via email

@kirstenalarsen
Copy link
Contributor

OK, this one is CLOSED

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

No branches or pull requests

4 participants