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) O3-2583: Configure Password Field Placement on Login Screen #820

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

jayasanka-sack
Copy link
Member

@jayasanka-sack jayasanka-sack commented Nov 21, 2023

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

This pull request addresses the enhancement outlined in the "Configure Password Field Placement on Login Screen (O3-2583)" ticket under the "Enhance Login Page Configurability" epic.

Changes Introduced:

  1. New Configuration Variable:

    • Introduced a new configuration variable named 'passwordOnSeparateScreen' to allow implementers to customize the placement of the password field on the login screen.
    • The default value is set to 'true' to maintain the existing behavior of having the password field on a separate screen.
  2. Configuration Usage:

    • When 'passwordOnSeparateScreen' is set to 'true', the password field appears on a separate screen. (default behaviour)
    • When set to 'false', the password field is displayed on the same screen as the username and other login elements.

Other

Other Changes I've done:

  1. The mockConfig didn't use the correct type and there were some missing fields, I've fixed it
  2. There were some routes passed to the memory router in each tests which haven't any usage. Therefore, I removed them.
  3. There were two hidden input fields in the login page for the username and passwords, which I'm not sure the usage of them. I've removed them, but I would appreciate it if @denniskigen @ibacher and @vasharma05 could confirm and validate this modification..

Screenshots

image image

Related Issue

https://issues.openmrs.org/browse/O3-2583

New Configuration Variable:
- Introduced a new configuration variable named 'passwordOnSeparateScreen' to allow implementers to customize the placement of the password field on the login screen.
- The default value is set to 'true' to maintain the existing behavior of having the password field on a separate screen.

Configuration Usage:
- When 'passwordOnSeparateScreen' is set to 'true', the password field appears on a separate screen.
- When set to 'false', the password field is displayed on the same screen as the username and other login elements.
Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

Thanks @jayasanka-sack! Some comments. Also, please include a conventional commit message in your PR title at least.

@jayasanka-sack jayasanka-sack changed the title O3-2583: Configure Password Field Placement on Login Screen (feat) O3-2583: Configure Password Field Placement on Login Screen Nov 22, 2023
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

Largely looks good to me, save for a few concerns about naming. Thanks, @jayasanka-sack.

packages/apps/esm-login-app/src/config-schema.ts Outdated Show resolved Hide resolved
@@ -247,4 +247,64 @@ describe("Login", () => {
expect(performLogin).toHaveBeenCalledWith("yoshi", "no-tax-fraud")
);
});

it("should focus the username input", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

🚀

@denniskigen denniskigen merged commit 9f01ccb into openmrs:main Dec 7, 2023
7 checks passed
@jayasanka-sack jayasanka-sack deleted the O3-2583 branch December 7, 2023 10:38
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.

3 participants