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
Fix: Back to search results button functionality #1044
base: main
Are you sure you want to change the base?
Conversation
Fix: Back to search results button issue
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.
@sam-sny seem my comments. Also, can you please create a branch for your changes rather than issuing changes directly from main?
renderIcon={(props) => <ArrowLeft size={24} {...props} />} | ||
iconDescription={t('backToSearchResult', 'Back to search result')} | ||
size="sm" | ||
onClick={closePanel}> |
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 would seem to indicate that clicking on this button will close the entire overlay / search panel entirely, not actually return to the search result. If the goal is to return to the search result, can you show that this is what this does?
onClick={() => toggleSearchType(SearchTypes.SCHEDULED_VISITS, patientUuid)}> | ||
<span>{t('backToScheduledVisits', 'Back to scheduled visits')}</span> | ||
onClick={closePanel}> | ||
<span>{t('backToSearchResult', 'Back to search result')}</span> |
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.
Same here. Does the "closePanel" function actually return you to the search result? Or does it close the panel entirely? If it closes the panel, this would seem incorrect.
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.
Not sure what you are presenting here @sam-sny , but I don't think it's intended for this issue.
@@ -21,14 +21,15 @@ | |||
"@hookform/resolvers": "^3.3.1", | |||
"classnames": "^2.3.2", | |||
"react-hook-form": "^7.46.2", | |||
"react-joyride": "^2.8.0", |
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.
Why are you adding a third party library for fixing this issue? @sam-sny
Requirements
Summary
Updated the 'Back to search results' button text and functionality. Replaced the original text with 'Back to search result' and implemented a function to close the panel when the button is clicked. This enhancement ensures a more intuitive user experience by providing clear navigation back to search results.
Screenshots
Before:
After:
patient-scheduled-visit:
visit-form:
Related Issue
https://openmrs.atlassian.net/browse/O3-2467
Other