-
Notifications
You must be signed in to change notification settings - Fork 20
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
updated forgotpassword screen #1532
Conversation
📝 WalkthroughWalkthroughThe pull request includes updates to multiple files, primarily focusing on modifying stylesheet links and enhancing the styling of the employee login interface. The Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
🧹 Outside diff range comments (2)
micro-ui/web/micro-ui-internals/example/public/index.html (1)
Line range hint
12-15
: Consider cleaning up commented-out stylesheet linksThere are two commented-out stylesheet links in the file:
https://unpkg.com/@egovernments/digit-ui-css@1.5.41/dist/index.css
https://unpkg.com/@egovernments/digit-ui-css/dist/index.css
While these are not directly related to the current changes, it might be beneficial to review if these comments are still needed or if they can be removed to keep the code clean.
Would you like me to create a separate issue to track the cleanup of these commented-out lines?
micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/forgotPassword.js (1)
Line range hint
1-124
: Overall assessment: UI component upgrade with some areas needing attentionThe changes in this file primarily focus on:
- Upgrading from
FormComposer
toFormComposerV2
.- Enhancing the city dropdown configuration.
- Improving the styling of the form.
These changes appear to be part of a larger UI component update and styling enhancement. The transition to
FormComposerV2
is consistent and well-implemented.However, there are a few areas that need attention:
- Verify that the transition to
FormComposerV2
is consistent across the entire codebase.- The AI summary mentioned changes to error handling that are not visible in the provided code. This discrepancy needs to be addressed.
- Consider implementing the suggested minor improvements for better code consistency and user experience.
Please review these points and make any necessary adjustments before merging.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
⛔ Files ignored due to path filters (14)
micro-ui/web/core/inter-package.json
is excluded by!**/*.json
micro-ui/web/core/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/example/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/packages/css/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/packages/modules/core/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/packages/modules/sandbox/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/packages/modules/utilities/package.json
is excluded by!**/*.json
micro-ui/web/micro-ui-internals/packages/modules/workbench/package.json
is excluded by!**/*.json
micro-ui/web/package.json
is excluded by!**/*.json
micro-ui/web/sandbox/inter-package.json
is excluded by!**/*.json
micro-ui/web/sandbox/package.json
is excluded by!**/*.json
micro-ui/web/workbench/inter-package.json
is excluded by!**/*.json
micro-ui/web/workbench/package.json
is excluded by!**/*.json
📒 Files selected for processing (5)
- micro-ui/web/micro-ui-internals/example/public/index.html (1 hunks)
- micro-ui/web/micro-ui-internals/packages/css/src/pages/employee/login.scss (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/config.js (1 hunks)
- micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/forgotPassword.js (4 hunks)
- micro-ui/web/public/index.html (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/config.js (1)
Pattern
**/*.js
: checkmicro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/forgotPassword.js (1)
Pattern
**/*.js
: check
🔇 Additional comments (8)
micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/config.js (2)
11-11
: LGTM: Improved input type for mobile numberChanging the input type from "text" to "mobileNumber" for the mobile number field is a good improvement. This change likely enables better input validation and potentially provides a more suitable keyboard on mobile devices, enhancing the user experience.
17-17
: LGTM: Changed city input to dropdown, verify implementationChanging the city input type from "custom" to "dropdown" is a good improvement for user experience, providing a clear list of cities to choose from. However, ensure that the dropdown implementation is complete and consistent with the rest of the application.
To verify the implementation, please run the following script:
This script will help identify any inconsistencies in the city input implementation across the codebase and verify that the necessary changes have been made to support the new dropdown type.
micro-ui/web/micro-ui-internals/example/public/index.html (2)
Line range hint
1-31
: Verify relevance of this change to the PR objectivesThe PR title mentions updating the forgotpassword screen, but this file (
index.html
) doesn't seem directly related to that objective. While updating the CSS package version might indirectly affect the styling of the forgotpassword screen, it's worth confirming if this change is intentional and necessary for the stated PR objective.Could you please clarify how this CSS version update relates to the forgotpassword screen update mentioned in the PR title? If it's not directly related, consider updating the PR description to include this change for clarity.
17-17
: Version update for@egovernments/digit-ui-components-css
packageThe stylesheet link has been updated to use version
0.0.2-beta.39
of the@egovernments/digit-ui-components-css
package, which is an increment from the previous version.To ensure consistency across the application, please run the following script to check if this is the only occurrence of the package version:
This script will help identify if there are any inconsistencies in the package version across the project.
✅ Verification successful
Version update verified successfully
All instances of
@egovernments/digit-ui-components-css
are now using version0.0.2-beta.39
. No outdated or inconsistent versions were detected across the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for occurrences of different versions of @egovernments/digit-ui-components-css # Search for all occurrences of @egovernments/digit-ui-components-css echo "Occurrences of @egovernments/digit-ui-components-css:" rg --type html --type javascript --type json "@egovernments/digit-ui-components-css" # Search for any occurrences of the old version echo "\nOccurrences of old version (0.0.2-beta.37):" rg --type html --type javascript --type json "@egovernments/digit-ui-components-css@0.0.2-beta.37" # Search for any occurrences of versions other than the new one echo "\nOccurrences of versions other than 0.0.2-beta.39:" rg --type html --type javascript --type json "@egovernments/digit-ui-components-css@(?!0\.0\.2-beta\.39)"Length of output: 992
Script:
#!/bin/bash # Description: Check for occurrences of different versions of @egovernments/digit-ui-components-css # Search for all occurrences of @egovernments/digit-ui-components-css echo "Occurrences of @egovernments/digit-ui-components-css:" rg --type html --type js --type json "@egovernments/digit-ui-components-css" # Search for any occurrences of the old version echo -e "\nOccurrences of old version (0.0.2-beta.37):" rg --type html --type js --type json "@egovernments/digit-ui-components-css@0.0.2-beta.37" # Search for any occurrences of versions other than the new one using PCRE2 for look-around echo -e "\nOccurrences of versions other than 0.0.2-beta.39:" rg --pcre2 --type html --type js --type json "@egovernments/digit-ui-components-css@(?!0\.0\.2-beta\.39)"Length of output: 938
Script:
#!/bin/bash # Description: Verify that only version 0.0.2-beta.39 of @egovernments/digit-ui-components-css is used # Search for all occurrences of @egovernments/digit-ui-components-css echo "Occurrences of @egovernments/digit-ui-components-css:" rg --type html --type js --type json "@egovernments/digit-ui-components-css" # Search for any occurrences of the old version echo -e "\nOccurrences of old version (0.0.2-beta.37):" rg --type html --type js --type json "@egovernments/digit-ui-components-css@0.0.2-beta.37" # Confirm there are no other versions besides 0.0.2-beta.39 echo -e "\nOccurrences of versions other than 0.0.2-beta.39:" rg --pcre2 --type html --type js --type json "@egovernments/digit-ui-components-css@(?!(0\.0\.2-beta\.39))\d+\.\d+\.\d+-beta\.\d+"Length of output: 963
micro-ui/web/public/index.html (3)
11-11
: LGTM: Components CSS package version update.The update to
@egovernments/digit-ui-components-css@0.0.2-beta.39
appears appropriate. This version jump from beta.37 to beta.39 might indicate more substantial improvements or fixes.To ensure compatibility and understand the changes, please:
- Verify that this new version doesn't introduce any unexpected visual changes.
- Check the changelog for any significant updates between beta.37 and beta.39.
Run this script to compare the versions:
#!/bin/bash # Description: Check if the new CSS version is available and compare its content with the previous version # Test 1: Verify the new version exists curl -I https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.39/dist/index.css # Test 2: Compare the content of the old and new versions diff <(curl -s https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.37/dist/index.css) <(curl -s https://unpkg.com/@egovernments/digit-ui-components-css@0.0.2-beta.39/dist/index.css)
10-11
: Verify relevance of CSS updates to forgot password screen changes.The PR title mentions updating the forgot password screen, but the changes in this file are limited to CSS package version updates. While these updates might be related to styling changes for the forgot password screen, it's not explicitly clear from this file alone.
Please confirm:
- Are these CSS updates directly related to the forgot password screen changes?
- Are there other files (not provided for review) that contain the main changes for the forgot password screen?
To help verify this, you can run the following script to search for forgot password related changes:
#!/bin/bash # Description: Search for files with forgot password related changes # Search for files containing "forgotpassword" or "forgot password" (case insensitive) rg -i -g '!{package-lock.json,yarn.lock}' 'forgotpassword|forgot password'
10-10
: LGTM: CSS package version update.The update to
@egovernments/digit-ui-css@1.8.2-beta.42
seems appropriate. This minor version bump likely includes improvements or bug fixes.To ensure compatibility, please verify that this new version doesn't introduce any unexpected visual changes:
micro-ui/web/micro-ui-internals/packages/modules/core/src/pages/employee/ForgotPassword/forgotPassword.js (1)
1-2
: Verify compatibility with FormComposerV2The change from
FormComposer
toFormComposerV2
suggests an upgrade or refactoring. Please ensure that:
FormComposerV2
is fully compatible with the existing code.- All necessary functionality from
FormComposer
is available inFormComposerV2
.- This change is consistent across the entire codebase.
To check for any remaining usage of
FormComposer
, run:
@@ -101,7 +90,7 @@ const ForgotPassword = ({ config: propsConfig, t }) => { | |||
<div className="employeeBackbuttonAlign"> | |||
<BackLink onClick={() => window.history.back()}/> | |||
</div> | |||
<FormComposer | |||
<FormComposerV2 |
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.
🧹 Nitpick (assertive)
Approved: FormComposerV2 integration with enhanced styling
The transition to FormComposerV2
with added styling properties improves the UI. The changes look good overall.
For consistency, consider using template literals for multi-property style objects:
-headingStyle={{ textAlign: "center",fontWeight:"bold",color:"#363636" }}
-descriptionStyles={{color:"#787878",textAlign: "center"}}
+headingStyle={{ textAlign: "center", fontWeight: "bold", color: "#363636" }}
+descriptionStyles={{ color: "#787878", textAlign: "center" }}
This improves readability and maintains a consistent coding style.
Also applies to: 104-105, 110-110
optionsKey: "name", | ||
required: true, | ||
options: cities, |
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.
🧹 Nitpick (assertive)
Improved city dropdown configuration
The changes to the city input configuration are good:
- Direct assignment of
cities
tooptions
simplifies the code. - Setting
required: true
ensures a city is selected.
However, consider adding a default empty option to improve UX:
populators: {
name: city.name,
optionsKey: "name",
required: true,
options: cities,
+ defaultOption: { name: "Select a city", code: "" },
},
This allows for a clear initial state and prompts the user to make a selection.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
optionsKey: "name", | |
required: true, | |
options: cities, | |
optionsKey: "name", | |
required: true, | |
options: cities, | |
defaultOption: { name: "Select a city", code: "" }, |
.loginCardClassName{ | ||
.digit-dropdown-employee-select-wrap { | ||
.digit-dropdown-options-card{ | ||
max-height: 10vmax; | ||
} | ||
} | ||
} | ||
|
||
.employeeForgotPassword{ | ||
.digit-dropdown-employee-select-wrap { | ||
.digit-dropdown-options-card{ | ||
max-height: 10vmax; | ||
} | ||
} | ||
} |
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.
🧹 Nitpick (assertive)
LGTM! Consider optimizing the duplicate styles.
The addition of max-height for dropdown options in both .loginCardClassName
and .employeeForgotPassword
is a good improvement for controlling the dropdown size across different screen sizes.
To reduce code duplication, consider creating a shared class or mixin for the dropdown options card style. For example:
@mixin limited-dropdown-height {
.digit-dropdown-employee-select-wrap {
.digit-dropdown-options-card {
max-height: 10vmax;
}
}
}
.loginCardClassName {
@include limited-dropdown-height;
}
.employeeForgotPassword {
@include limited-dropdown-height;
}
This approach would make it easier to maintain and update the style in the future if needed.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation