-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
The original main purpose of context is to resolve redundant props passing as mentioned in this document. However, the tree of font-library-related components is not that deep, and there are many contexts that are once used and are never used.
These contexts should be able to be removed entirely by passing props or using an ad-hoc approach.
Not using a provider makes it easier to completely separate the modal dialog and the typography panel and delegate control of opening and closing modal dialog to a data store, as attempted in #58350.
Eventually, it will be easier to trigger the Font Library modal dialog via the command palette, as suggested in #54880.
The only concern, as mentioned in this comment, is that the initial state of the Font Library modal dialog is also context-managed. To solve this, we will need to add an argument to openModal
in the interfaces
package that defines the initial state.