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-2261: Add a back button to the location picker page #946

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

usamaidrsk
Copy link
Contributor

@usamaidrsk usamaidrsk commented Feb 29, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. Ensure your PR title includes a conventional commit label (such as feat, fix, or chore, among others). 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 PR adds a back button on change location screen, for a user to go back to previous page if they want to cancel the operation

Screenshots

image

cancel-btn-change-location.mp4

Related Issue

O3-2261

Other

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.

Nicely done, @usamaidrsk. LGTM.

@denniskigen denniskigen changed the title (feat) O3-2261: Add back button when changing location (feat) O3-2261: Add a back button to the location picker page Feb 29, 2024
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 @usamaidrsk. Couple of small things, but I think this basically looks good.

Copy link
Member

@mseaton mseaton left a comment

Choose a reason for hiding this comment

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

Functionally this looks good in that it provides what is missing. Is this really the UI guideline that carbon advocates for this? I have the same question about the existing "Back" link on the password page that takes you back to the login page, with this odd link at the top of the url for this.

I would have thought things would look at lot more consistent to do this via a button alongside the main save button - eg. a Cancel button that would serve to take you back to the previous step.

For example, we have this pattern on the registration form:

image

We have this pattern on the cancel dialog:

image

Aside from these clear inconsistencies, it does seem like a styled button is a better UI than an unstyled link thrown at the top of the form.

Anyone else feel this way?

@rbuisson
Copy link
Contributor

rbuisson commented Mar 7, 2024

I see what @mseaton means here.

I think the <- Back button works well when you're within a multi-step flow of a "single page" (where screens come directly after one another though you don't feel you're moving away). Which is the case for the login page.

However, in the Location picker here, when opened outside of the login flow, the Back button is less intuitive. We're just leaving the home page to open a new 'full size' page. Therefore, a 'Discard/Confirm' button might make more sense.

@usamaidrsk , would you be able to go through both the OpenMRS style guide and designs to find examples or guidelines, as well as Carbon official documentation?

@usamaidrsk
Copy link
Contributor Author

@rbuisson I do get it now.
I think I can as well consult from ux-design-advisory

@vasharma05
Copy link
Member

Hi @mseaton @rbuisson,
I see @usamaidrsk didn't update the PR, we had a connect with Paul and he shared the new designs for the location picker (ticket O3-2951). Since the new implementation might take time, can we move ahead with the changes from @usamaidrsk or wait for the new location picker implementation only?
Thanks!

@rbuisson
Copy link
Contributor

@vasharma05 @usamaidrsk , from my message on Slack, I still suggest:

In that case, if we are already differentiating the 2 cases of (1) location selection right after login VS (2) location selection from the home page, then I would suggest to replace the Back button with a standard discard/confirm button for case 2.

So let's just change to a standard button and merge that, while we can work on the new location picker later.

@usamaidrsk
Copy link
Contributor Author

So let's just change to a standard button and merge that, while we can work on the new location picker later.

@rbuisson @vasharma05 @denniskigen I have updated this PR as per the suggestions.
Thanks

@rbuisson
Copy link
Contributor

@usamaidrsk , you did put Confirm and Cancel one under the other, as opposed to one next the other.
Is this taken from an existing similar design?

Carbon suggests the latter for modals (I know it's not exactly a modal here, but it looks like one)

@usamaidrsk usamaidrsk force-pushed the ft-add-back-button-when-changing-location branch from 30f2ae2 to 1203e5b Compare March 25, 2024 14:56
Copy link
Member

@vasharma05 vasharma05 left a comment

Choose a reason for hiding this comment

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

A small nit, but all good to go.
Thanks @usamaidrsk!

@vasharma05
Copy link
Member

Hi @ibacher!
Can you please re-review this PR?
Thanks!

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.

Couple of small things, but generally looks good.

@usamaidrsk usamaidrsk requested a review from ibacher May 30, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants