-
Notifications
You must be signed in to change notification settings - Fork 183
feat: refactor UI to decouple from Credential types #1635
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
base: main
Are you sure you want to change the base?
feat: refactor UI to decouple from Credential types #1635
Conversation
Signed-off-by: Mostafa Gamal <[email protected]>
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1635 +/- ##
==========================================
- Coverage 53.25% 52.01% -1.25%
==========================================
Files 307 314 +7
Lines 10937 11247 +310
Branches 2957 3215 +258
==========================================
+ Hits 5825 5850 +25
- Misses 5082 5348 +266
- Partials 30 49 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
|
|
@MosCD3 I think that credential ordering should be included in the normalized credential metadata - it is not included in the original conceptual diagram. Attribute ordering is a concept in OCA and openid4vci metadata and likely approaches. |
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
Signed-off-by: Mostafa Gamal <[email protected]>
|


Summary of Changes
This PR refactors credential card rendering to decouple the UI components from OCA bundle logic and unify data handling across credential types. Key updates include:
• Introduced a mapper-first architecture:
• mapAnonCredsToCard and related mappers now handle attribute selection, primary/secondary ordering, PII detection (allPI), and proof request filtering.
• UI components (Card11Pure, Card10Pure) now only render the mapped data without interpreting OCA overlays.
• Added proof request support:
• When proofContext is true and displayItems are passed, the mapper uses only those attributes/predicates in the given order.
• Prevents leakage of extra credential attributes in proof cards.
• Updated CredentialCardGen.tsx to pass displayItems through to the mapper during proof flows.
• Removed redundant attribute reordering logic from UI components (e.g. Card11Pure).
• Ensured allPI and status are computed in the mapper and exposed in the unified card data model.
The work is still in progress
Fixes #1437
Screenshots, videos, or gifs
Breaking change guide
Related Issues
Replace this text with issue #'s that are relevant to this PR. If there are none, simply enter N/A
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-byline (we use the DCO GitHub app to enforce this)If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓