Page MenuHomePhabricator

[Cashtab] Improvements to modal component
ClosedPublic

Authored by bytesofman on Apr 5 2024, 19:12.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC3d42ac5378d8: [Cashtab] Improvements to modal component
Summary

patch css typo, add an overlay to prevent clicking outside of the modal, fix button positioning, do not use transparent background for cancel button as validation errors may be viewed through it, add support for disabling the ok button

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
modal-improvements
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28365
Build 56272: Build Diffcashtab-tests
Build 56271: arc lint + arc unit

Event Timeline

bytesofman published this revision for review.Apr 5 2024, 19:19
bytesofman added inline comments.
cashtab/src/components/Common/Modal.js
19

typo fix

24

prettier now formats this, it wouldn't before bc of the above typo

80

this wasn't actually centered on the modal before, was just close enough to seem that way.

101

working on D15884 gave reason for supportiong this. there are some functions that we do not want to get to unless input has been validated.

previously this was handled in a hacky way, bailling out of the function if bad validation was discovered later.

better to just not let the user call such a function until input is valid.

this isn't implemented anywhere yet in this diff but will be implemented in D15884

138

Prevent clicks outside the modal area, e.g. editing two contacts at the same time in D15884

This revision is now accepted and ready to land.Apr 6 2024, 09:21