Page MenuHomePhabricator

[web] refactor modal API to return modal key
ClosedPublic

Authored by kamil on Dec 13 2022, 6:54 AM.
Tags
None
Referenced Files
F3489462: D5860.diff
Wed, Dec 18, 12:45 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:30 PM
Unknown Object (File)
Sun, Dec 15, 8:29 PM
Unknown Object (File)
Sun, Dec 15, 8:19 PM
Unknown Object (File)
Thu, Dec 12, 12:26 AM
Unknown Object (File)
Sun, Nov 24, 11:02 AM
Subscribers

Details

Summary

In policy acknowledging logic we need to track whether modal is visible or not. As suggested in https://phab.comm.dev/D5830#inline-39308 we want to avoid duplicated state and what is more important have single source of truth. We need to have the modal key and then we will be able to check if given modal is present in modals array or no.

Test Plan

This code does not affect logic, but worth checking if modals on website works properly

Diff Detail

Repository
rCOMM Comm
Branch
policy-stuff-5
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 13 2022, 8:22 AM
tomek added inline comments.
lib/components/modal-provider.react.js
13

We can define React.Node => string as a separate type and use in all the places where pushModal is used

This revision is now accepted and ready to land.Dec 14 2022, 5:06 AM

introduce separate type for pushModal