-
Notifications
You must be signed in to change notification settings - Fork 261
(feat) O3-5027: Implement beautiful configurable login page #1460
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) O3-5027: Implement beautiful configurable login page #1460
Conversation
|
||
case 'gradient': | ||
if (background.value) { | ||
style.background = background.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @UjjawalPrabhat , We need Loginbackground to be configurable, i went ahead and tested your code .Check this out.
loginbackground.webm These changes override the default login image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sherrif10, the Logo change config you're referring to wasn't implemented by me. It was there from before and therefore the logo is editable. If you're referring to background change then that is available in a separate section called as background.
Do you want me to make the Logo constant?
Also please let me know if there's any other changes or enhancements required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherrif10 could you send the images used in this the login page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @UjjawalPrabhat , We want to come up with something like that in the image i shared, FYI , Login page is already configurable, the only changes needed is to make login page appear like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherrif10 I'm on it. I was talking about the images used like the 3 doctor's and logo image used in the login page. It'd be easier for me to configure then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it needs to be configurable and when the configuration is set to default, Default OMRS login page should appear, Then you should consider making it appear left or right on the login page.
Watching |
![]() Hey @sherrif10, @tendomart |
@@ -0,0 +1,88 @@ | |||
import React, { useState, useCallback, useMemo } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets only focus on login page for now, This can come back in separate ticket cc @denniskigen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @sherrif10 we should first focus on having an image side by side with the login form he shared above
hey @UjjawalPrabhat did you have a chance to look at how it was implemented at https://github.com/METS-Programme/esm-ugandaemr-login ?
I don't think you really need to come up with something completely new
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@denniskigen can you please help us approve the workflows here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @sherrif10 we should first focus on having an image side by side with the login form he shared above
hey @UjjawalPrabhat did you have a chance to look at how it was implemented at https://github.com/METS-Programme/esm-ugandaemr-login ? I don't think you really need to come up with something completely new
@tendomart Thanks for this. I actually implemented it from scratch and then saw this when i was about to commit. But I made all the required changes including login page switch b/w uganda-emr and default, configurable system-messages and background.
@sherrif10 Please review my changes and let me know if any further changes required.
import styles from './background-wrapper.scss'; | ||
|
||
// Import Uganda EMR background for default usage | ||
const getUgandaEmrBackgroundUrl = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not supposed to be called Ugandaemr. its supposed to be generic. You are simply picking what was done in uganda emr and do it this side as simple as that. Like i had said. We only need the design, on the implementation side, An implementor simply needs to configure a background image and The login page , What is left is designing the page,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @UjjawalPrabhat Also remember for all this to happen out of the box. You need to map this image on the server either via dockerFile in openmrs distro to let docker pick the path such that immediately you start openmrs-esm-login -app, it can pick that Path and renders it via config that we made in esm-login-app. cc @reagan-meant @ibacher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, the user can just supply a (relative) URL in configuration and that will be used to display the image. We should not be doing anything to fetch the image, especially using require()
and the like, which only work if the image is part of the login app.
} | ||
} | ||
|
||
// Uganda EMR specific background styles (from original app) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove those openmrs images and ugandaEMR image. Those are supposed to be handled by the server.
This PR has way too many changes not related to the Login page. Can we please remove those changes from this PR completely? PRs that are larger than they need to be are usually impossible to merge in because they will break too many things. |
import styles from './background-wrapper.scss'; | ||
|
||
// Import Uganda EMR background for default usage | ||
const getUgandaEmrBackgroundUrl = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, the user can just supply a (relative) URL in configuration and that will be used to display the image. We should not be doing anything to fetch the image, especially using require()
and the like, which only work if the image is part of the login app.
Significantly reduced the number of changed files based on @ibacher's comments. Removed all framework modifications and simplified the background image handling to use direct URLs. All the configurable login features are still there - just implemented more cleanly now. Should be much easier to review and merge.
0cd6e18
to
4f67b63
Compare
@ibacher @sherrif10 @tendomart Fixed the scope issues! They're all just in the login app now. Removed the framework stuff and simplified the image loading like you asked - now it just uses URLs directly instead of bundling assets. All the login customization still works (backgrounds, layouts, branding, etc.) but it's much cleaner implementation. Ready for another look when you get a chance 👍 |
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.If applicable
Summary
This PR implements a beautiful and configurable login page for OpenMRS 3.x as part of the OMRS Hackathon 2025. The login page now supports:
Related Issue
https://issues.openmrs.org/browse/O3-5027
Other
This work was completed as part of the OpenMRS Hackathon 2025. The implementation focuses on making the login page easily configurable while maintaining a beautiful and professional appearance.