Skip to content

fix: Region Modal / Region Popover element focus & z-index - #2809

Merged
hellofanny merged 6 commits into
feat/delivery-promisefrom
fix/region-modals-focus-index
Apr 29, 2025
Merged

hellofanny merged 6 commits into
feat/delivery-promisefrom
fix/region-modals-focus-index

Conversation

@hellofanny

@hellofanny hellofanny commented Apr 28, 2025 •

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

  1. Sets input focus on RegionModal
  2. Sets input focus on RegionPopover
  3. Fix Popover z-index priority

How it works?

  1. When opening the RegionPopover, if no zip code set the focus should be on the input field instead of the closing button.
image
  1. When opening the RegionModal, the focus should be on the input field instead of the closing button.
image
  1. Popover should be under the Navbar head when scrolling.
image

How to test it?

Run the project locally or use the preview link

  1. If the Popover appears, the initial focus should be on the input field
    1.a scroll the page, the popover should appear under the Navbar header.
  2. Click to edit zip code, when the RegionModal appears, the focus should be on the input field

Starters Deploy Preview

https://github.com/vtex-sites/faststoreqa.store/pull/784

@hellofanny hellofanny changed the title Fix: Region Modal / Region Popover element focus & z-index fix: Region Modal / Region Popover element focus & z-index Apr 28, 2025
@codesandbox-ci

codesandbox-ci Bot commented Apr 28, 2025 •

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@hellofanny
hellofanny marked this pull request as ready for review April 28, 2025 19:46
@hellofanny
hellofanny requested a review from a team as a code owner April 28, 2025 19:46
@hellofanny
hellofanny requested review from eduardoformiga, lariciamota and lucasfp13 and removed request for a team and eduardoformiga April 28, 2025 19:46
@hellofanny hellofanny self-assigned this Apr 28, 2025

@lucasfp13 lucasfp13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a suggestion that, if agreed, all occurrences should be changed

@lariciamota lariciamota left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested the mentioned flows and they are working as expected!

@hellofanny
hellofanny merged commit bd38f3e into feat/delivery-promise Apr 29, 2025
@hellofanny
hellofanny deleted the fix/region-modals-focus-index branch April 29, 2025 22:14
lariciamota pushed a commit that referenced this pull request May 8, 2025
## What's the purpose of this pull request?

1. Sets input focus on `RegionModal`
2. Sets input focus on `RegionPopover`
3. Fix Popover` z-index` priority

## How it works?

1. When opening the `RegionPopover`, if no zip code set the focus should
be on the input field instead of the closing button.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/0c025d56-bdb3-43f9-95c3-6e677e8379b5"
/>


2. When opening the `RegionModal`, the focus should be on the input
field instead of the closing button.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/b458b995-f30c-4c4f-a6c3-e9fc3553953d"
/>

3. Popover should be under the `Navbar` head when scrolling.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/d202b739-d1b8-4db8-b2d2-ce4d1a0d2d3a"
/>

## How to test it?

Run the project locally or use the [preview link
](https://storeframework-cm652ufll028lmgv665a6xv0g-fw7dvhgml.b.vtex.app)
1. If the Popover appears, the initial focus should be on the input
field
1.a scroll the page, the popover should appear under the Navbar header.
3. Click to edit zip code, when the `RegionModal` appears, the focus
should be on the input field

### Starters Deploy Preview

vtex-sites/faststoreqa.store#784
lariciamota pushed a commit that referenced this pull request May 12, 2025
## What's the purpose of this pull request?

1. Sets input focus on `RegionModal`
2. Sets input focus on `RegionPopover`
3. Fix Popover` z-index` priority

## How it works?

1. When opening the `RegionPopover`, if no zip code set the focus should
be on the input field instead of the closing button.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/0c025d56-bdb3-43f9-95c3-6e677e8379b5"
/>


2. When opening the `RegionModal`, the focus should be on the input
field instead of the closing button.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/b458b995-f30c-4c4f-a6c3-e9fc3553953d"
/>

3. Popover should be under the `Navbar` head when scrolling.
<img width="500" alt="image"
src="https://github.com/user-attachments/assets/d202b739-d1b8-4db8-b2d2-ce4d1a0d2d3a"
/>

## How to test it?

Run the project locally or use the [preview link
](https://storeframework-cm652ufll028lmgv665a6xv0g-fw7dvhgml.b.vtex.app)
1. If the Popover appears, the initial focus should be on the input
field
1.a scroll the page, the popover should appear under the Navbar header.
3. Click to edit zip code, when the `RegionModal` appears, the focus
should be on the input field

### Starters Deploy Preview

vtex-sites/faststoreqa.store#784
lariciamota added a commit that referenced this pull request May 13, 2025
## What's the purpose of this pull request?

Feature branch for the Delivery Promise feature - phase 1 (navigation
based on shopper location).

- #2708 
- #2728
- #2739 
- #2745 
- #2749
- #2750
- #2768
- #2772 
- #2775
- #2809
- #2817 
- #2824 
- #2835

## How it works?


## How to test it?


### Starters Deploy Preview


## References
- [Jira epic](https://vtex-dev.atlassian.net/browse/SFS-1696)


## Checklist

- [ ] For documentation changes, ping `@Mariana-Caetano` to review and
update (Or submit a doc request)
- [ ] TODO: Request Doc for PopOver
- [ ] TODO: Remind to run cms sync in the default account when the
feature branch is merged since new section was added. (And add the new
section in the admin!)

---------

Co-authored-by: Lucas Feijó <[email protected]>
Co-authored-by: Fanny Chien <[email protected]>
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