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

Fix backup reminder shortcuts #1454

Merged
merged 13 commits into from Apr 30, 2024
Merged

Conversation

BrodyHughes
Copy link
Member

@BrodyHughes BrodyHughes commented Apr 2, 2024

Fixes BX-1378

What changed (plus any additional context for devs)

  • this uses the isExplainerSheet class to determine whether or not the global shortcuts should be active
  • while on an modal that isExplainerSheet, the ., x. ,, etc shortcuts won't work. Only the normal navigation and esc. When the backup reminder is dismissed these will work again.
  • this also enables the use of esc to close explainers

Screen recordings / screenshots

Screen.Recording.2024-04-02.at.4.54.42.PM.mov

What to test

  • ESC and TAB through items on the backup reminder
  • attempt to use the . , s global shortcuts as well (they shouldn't work now while the backup reminder or explainer modals are up)

Copy link

linear bot commented Apr 2, 2024

@BrodyHughes BrodyHughes marked this pull request as ready for review April 2, 2024 21:58
@BrodyHughes
Copy link
Member Author

@DanielSinclair want some product feedback here. There are some implications on whether we want this to impact other modals (like token expanded state) as well as the backup reminders.

Copy link

github-actions bot commented Apr 2, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-04ab71bea3a8a3d5989d8d4a37645f5873572b67.zip

@DanielSinclair
Copy link
Contributor

DanielSinclair commented Apr 3, 2024

@BrodyHughes Just targeting the bottom-presenting modals like Backup Reminders should suffice. The issue was more so that shortcuts and actions were occurring invisibly behind the modal UI. We would still want the global shortcuts like , to work when navigating throughout layer 1 UI (where everything is presented with a left-right slide-in).

if (inputIsFocused) return;
if (isModal) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Poorly named I guess, but these are actually the global shortcuts here. We'd expect w to open the wallet switcher from any of the layer 1 drill-downs

Copy link
Member Author

Choose a reason for hiding this comment

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

ok cool cool. I can see what I can do in that case.

Copy link

github-actions bot commented Apr 8, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-c645349022c438e477389ff9af97564d08a88bc0.zip

Copy link

github-actions bot commented Apr 8, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-236340f7f021c680724876020910627ec7a9a1de.zip

Copy link

github-actions bot commented Apr 8, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-407740d43a47d41ccb920feba2887d8c9b76960b.zip

@DanielSinclair DanielSinclair changed the title [WIP] backup rem Fix backup reminder shortcuts Apr 8, 2024
Copy link

github-actions bot commented Apr 8, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-6dec0598dbe59e6aefd4e92e110fbd35570c7d09.zip

Copy link
Contributor

@DanielSinclair DanielSinclair left a comment

Choose a reason for hiding this comment

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

Seeing some strange behavior for the ESC key in other parts of the extension now. If you go to token details, press tab, then esc, you'll see a stack of explainer sheets get triggered
Screenshot 2024-04-08 at 4 57 53 PM

@BrodyHughes
Copy link
Member Author

Seeing some strange behavior for the ESC key in other parts of the extension now. If you go to token details, press tab, then esc, you'll see a stack of explainer sheets get triggered Screenshot 2024-04-08 at 4 57 53 PM

ight fixed this. there was something weird going on with how we were using useReducer to change the boolean value. i just converted to useState and it works fine. useReducer is pretty unnecessary here anyways.

Copy link

github-actions bot commented Apr 9, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-8f52e5df490ed85ce54e6aa979aedab479e73e61.zip
screenshots

Copy link

github-actions bot commented Apr 9, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-634e37c98666393e054655a67bc0e23c6575082a.zip
screenshots

Copy link

github-actions bot commented Apr 9, 2024

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-634e37c98666393e054655a67bc0e23c6575082a.zip

Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-293dbf7138cd8857e8c8862cfa0808908c486fc3.zip

Copy link

Here's the packed extension for this build:
node_modules.tar.gz
rainbowbx-fb358ec39e9494668028935381cadd66c4ebeaf4.zip

Copy link

Here's the packed extension for this build:
rainbowbx-04868d8e27d2144886784ec5c92d38371208b1fb.zip

Copy link
Contributor

@DanielSinclair DanielSinclair left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@DanielSinclair DanielSinclair added this pull request to the merge queue Apr 25, 2024
@DanielSinclair DanielSinclair removed this pull request from the merge queue due to a manual request Apr 25, 2024
@DanielSinclair
Copy link
Contributor

@derHowie if you have a sec to do a code review

Copy link
Member

@derHowie derHowie left a comment

Choose a reason for hiding this comment

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

💯

@BrodyHughes BrodyHughes added this pull request to the merge queue Apr 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2024
@DanielSinclair DanielSinclair added this pull request to the merge queue Apr 30, 2024
Merged via the queue into master with commit 6094a6e Apr 30, 2024
17 checks passed
@DanielSinclair DanielSinclair deleted the brody/backup-reminder-fix branch April 30, 2024 19:36
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.

None yet

4 participants