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: [FC-0006] add Verifiable Credentials optional feature #151

Merged

Conversation

wowkalucky
Copy link
Contributor

@wowkalucky wowkalucky commented Mar 23, 2023

Context

This update implements an optional (hidden under the ENABLE_VERIFIABLE_CREDENTIALS feature flag) UI that serves the newly implemented Verifiable Credentials feature.


Relates to openedx/credentials#1973

TODO:

  • - add related Open edX Credentials PR link.
  • - update test coverage
  • - ensure popup UI/UX is finished
  • - add multi-storages UX update (optional)

Screenshots

Verifiable Credentials tab

Tab optionally displayed if Feature is activated.
Tab body lists all User's program certificates (only a single one on the screenshot).

image

Action button

By default, there is a single storage backend (wallet) is available, so, button is displayed as a simple one-action "Create" button (screenshot displays dev environment with additional "Open edX Wallet" pluggable backend for Feature onboarding).

image

Modal

Once "Create" button clicked (here this is the "Learner Credential Wallet" option), mobile storage backend flow starts.
Modal window renders QR code as a deeplink for wallet mobile application (then mobile app uses transferred data for verifiable credential API request).

image

Mobile application (Learner Credential Wallet)

Android + IOS (Android screenshots).

Scan Accept Saved
image image image

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 23, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Mar 23, 2023

Thanks for the pull request, @wowkalucky! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 23, 2023
@e0d
Copy link
Contributor

e0d commented Mar 24, 2023

@wowkalucky still a draft, so let me know if we should not run the tests. There does seem to be a failure at the moment.

@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Mar 24, 2023
@wowkalucky
Copy link
Contributor Author

@e0d yep - still in progress. Once everything is green I'll ping you.

@wowkalucky wowkalucky force-pushed the dcc/oex-creds-476/verifiable-credentials branch from a33bd93 to f2b7990 Compare April 13, 2023 14:10
@wowkalucky wowkalucky marked this pull request as ready for review April 13, 2023 15:42
@wowkalucky
Copy link
Contributor Author

@e0d open for review (we still expect minor updates for Web modal layout though - a single component update).

@hurtstotouchfire
Copy link
Member

We just started a 2 week sprint yesterday so I'm adding this to the sprint starting on 6/19.

@jsnwesson
Copy link
Contributor

Could we get screenshots for this PR? @wowkalucky

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Jun 21, 2023
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
@wowkalucky wowkalucky force-pushed the dcc/oex-creds-476/verifiable-credentials branch from 06efc3b to f584c6f Compare June 22, 2023 14:30
@wowkalucky
Copy link
Contributor Author

@jsnwesson
I added some screenshot for more context.
Updated messages/wordings.
Vars naming was kept in camel case since linter isn't agree with you on this (=
Rebased onto master.

@jsnwesson
Copy link
Contributor

jsnwesson commented Jun 22, 2023

@wowkalucky just went through the things you changed and they look great! And thanks for the screenshots! I had some remaining things left open (ie. multiple useEffect, spelling/editing suggestions, test cleanup), let me know if you've any questions on them!

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage: 71.53% and project coverage change: +0.70 🎉

Comparison is base (ef037a5) 69.64% compared to head (9264e1b) 70.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #151      +/-   ##
==========================================
+ Coverage   69.64%   70.34%   +0.70%     
==========================================
  Files          16       27      +11     
  Lines         280      408     +128     
  Branches       65       90      +25     
==========================================
+ Hits          195      287      +92     
- Misses         85      120      +35     
- Partials        0        1       +1     
Impacted Files Coverage Δ
src/index.jsx 0.00% <0.00%> (ø)
...rogramCertificateModal/ProgramCertificateModal.jsx 63.63% <63.63%> (ø)
...components/ProgramCertificatesList/data/service.js 64.70% <64.70%> (ø)
...rogramCertificatesList/ProgramCertificatesList.jsx 69.35% <69.35%> (ø)
...mponents/ProgramCertificate/ProgramCertificate.jsx 80.00% <80.00%> (ø)
src/components/NavigationBar/NavigationBar.jsx 100.00% <100.00%> (ø)
src/components/NavigationBar/messages.js 100.00% <100.00%> (ø)
src/components/ProgramCertificate/messages.js 100.00% <100.00%> (ø)
src/components/ProgramCertificateModal/messages.js 100.00% <100.00%> (ø)
src/components/ProgramCertificatesList/messages.js 100.00% <100.00%> (ø)
... and 3 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Jun 26, 2023
@wowkalucky
Copy link
Contributor Author

@jsnwesson regarding the multiple useEffect hooks:

The main idea here is a separation of concerns. Each effect is responsible for its own job and logically separated. Even though currently effects' logic is similar (identical), what if tomorrow it won't be the case (e.g. we'll need to refetch one piece of data in other manner)?
React allows that - we use that (=
I don't see any pitfalls with the approach, code becomes more maintainable.

@wowkalucky
Copy link
Contributor Author

@jsnwesson also I went through the PR and could find additional remaining requests - seems like everything is resolved from your list. Am I missing something? Please point if so.

@jsnwesson
Copy link
Contributor

@wowkalucky thanks for the explanations on using multiple useEffects! The separation of concerns makes sense, thanks for linking to React's docs on that tip. I tagged you on the remaining things I noticed, which was a few spelling errors, mainly in one variable name. I'll mark this as approved if you can just take a look at those and see if they're intentional or need to be fixed.

download_url: null,
credential_id: 1,
program_uuid: '09876',
program_title: 'Programm title 2',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
program_title: 'Programm title 2',
program_title: 'Program title 2',

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const [modalIsOpen, openModal, closeModal] = useToggle(false);

const [
verfifiableCredentialIssuanceData,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
verfifiableCredentialIssuanceData,
verifiableCredentialIssuanceData,

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wowkalucky tagging you on the remaining pieces that I noticed, like this spelling error

Co-authored-by: Jason Wesson <[email protected]>

Co-authored-by: Jason Wesson <[email protected]>

Co-authored-by: Jason Wesson <[email protected]>
@wowkalucky wowkalucky force-pushed the dcc/oex-creds-476/verifiable-credentials branch from c27be3c to b42d0e8 Compare June 30, 2023 15:40
@wowkalucky wowkalucky force-pushed the dcc/oex-creds-476/verifiable-credentials branch from b42d0e8 to 1fda588 Compare June 30, 2023 15:45
@wowkalucky
Copy link
Contributor Author

@jsnwesson please note: during the last updates I've discovered the lost feature (sorry for that (= ).

@jsnwesson jsnwesson merged commit f8e71a3 into openedx:master Jul 5, 2023
@openedx-webhooks
Copy link

@wowkalucky 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@GlugovGrGlib GlugovGrGlib deleted the dcc/oex-creds-476/verifiable-credentials branch July 6, 2023 07:18
GlugovGrGlib pushed a commit to raccoongang/frontend-app-learner-record that referenced this pull request Aug 1, 2023
)

* feat: [FC-0006] add Verifiable Credentials optional feature

---------

Co-authored-by: Jason Wesson <[email protected]>
GlugovGrGlib pushed a commit that referenced this pull request Aug 9, 2023
* feat: [FC-0006] add Verifiable Credentials optional feature

---------

Co-authored-by: Jason Wesson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants