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

Add link to registration form to the unverified user welcome message #326

Conversation

gitjul
Copy link
Contributor

@gitjul gitjul commented Jun 17, 2020

Motivation

An unverified user saw a message encouraging them to register, but without an explanation how to do that right now. That user experience needed to be fixed.

Description

This PR adds a link to the Unbounce form, which is still the way to register, to the welcome message for unverified physicians.

Fixes #316

Implementation

  • a link was added to the Message component using the Trans component from i18next
  • the PhysicianView was refactored to a function-based React component - this made it possible to pass the eslint pre-commit check by disabling the anchor-has-content rule, but is a good more modern practice anyway
  • another rule, no-shadow had to be bypassed because the destructured functions, which needed to be passed to useEffect in props were shadowing the imported actions, and having them left undestructured resulted in a loop, because then the functions were called whenever any of the props changed

Also:

  • language names were prepended to translations of PhysicianView that are yet to be added
  • two no-unused-vars warnings were removed

Type of change

New feature

Screenshots/Links

Screenshot 2020-06-18 at 00 52 10

Screenshot 2020-06-18 at 00 52 29

@gitjul gitjul marked this pull request as draft June 17, 2020 23:03
@gitjul gitjul self-assigned this Jun 17, 2020
@gitjul gitjul changed the base branch from master to integration/webapp June 17, 2020 23:03
@gitjul gitjul changed the title Physician/unverified register message Add link to registration form to the unverified user welcome message Jun 17, 2020
@gitjul gitjul marked this pull request as ready for review June 17, 2020 23:15
@gitjul
Copy link
Contributor Author

gitjul commented Jun 17, 2020

cc @mrememisaac

client/.eslintrc.js Show resolved Hide resolved
client/public/locales/de/physicianView.json Show resolved Hide resolved
client/src/components/PhysicianView.js Outdated Show resolved Hide resolved
client/src/components/PhysicianView.js Outdated Show resolved Hide resolved
@gitjul gitjul requested a review from aviskarkc10 June 18, 2020 11:52
@gitjul
Copy link
Contributor Author

gitjul commented Jun 22, 2020

@aviskarkc10 I applied changes, ready to re-review

@aviskarkc10 aviskarkc10 merged commit a1d15c3 into nthopinion:integration/webapp Jun 22, 2020
@gitjul gitjul deleted the physician/unverified-register-message branch June 22, 2020 13:13
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.

Include link to Unbounce registration in message in read-only view
2 participants