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

feat: credential list footer component injectable #1266

Conversation

fc-santos
Copy link
Contributor

Summary of Changes

This PR adds a new option to add a ListFooterComponent to the ListCredentials Screen in the FlatList. This option would for example allow other wallets to add a button in the footer of the list. Example:

image

Related Issues

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.

  • All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this);
  • Updated LICENSE-3RD-PARTY.md for any added dependencies or vendored components;
  • Updated documentation as needed for changed code and new or modified features;
  • Added sufficient tests so that overall code coverage is not reduced.

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 🤓

  • Read our contribution guide at least once; it will save you a few review cycles!
  • Your PR will likely not be reviewed until all the above boxes are checked and all automated tests have passed.

PR template adapted from the Python attrs project.

Copy link

sonarcloud bot commented Sep 30, 2024

@fc-santos fc-santos requested a review from MosCD3 October 1, 2024 16:58
@knguyenBC
Copy link
Contributor

The credential list screen also has an "add credential" button "represented by a "+" icon at the top right corner in the header. Does this PR take into account that button? I see in the screen posted above that that button is replaced with a "help" button.

@fc-santos
Copy link
Contributor Author

@knguyenBC the "add credential button" represented by a "+" icon at the top right corner can either be replaced by another component or removed. This component can be injected at the container level (by the default, it's null).

For example:

//container-impl.ts

// By default at bifold-wallet 
this._container.registerInstance(TOKENS.COMPONENT_CRED_LIST_HEADER_RIGHT, () => null)
// In bc-wallet
this._container.registerInstance(TOKENS.COMPONENT_CRED_LIST_HEADER_RIGHT, AddCredentialButton)
// In qc-wallet
this._container.registerInstance(TOKENS.COMPONENT_CRED_LIST_HEADER_RIGHT, HelpCenterButton)

Nothing needs to be changed after this PR is merged in other wallets (no impact).

@jcdrouin21 jcdrouin21 merged commit 16ed1fc into openwallet-foundation:main Oct 1, 2024
7 checks passed
@jcdrouin21 jcdrouin21 deleted the feat/credential-list-footer-comp-injectable branch October 1, 2024 19:33
al-rosenthal pushed a commit to al-rosenthal/bifold-wallet that referenced this pull request Oct 9, 2024
al-rosenthal pushed a commit to al-rosenthal/bifold-wallet that referenced this pull request Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants