This PR replaces our previous (bogus) default context setter functions with a console warning that informs the user that the function they are calling hasn't been set up properly.
Example warning text: "Unable to call setNumPages(5). The DocumentContext Provider may not be set up correctly." (open to better copy if you have suggestions)
Reviewer Instructions
This was done to appease a TypeScript warning. I'm not sure how to trigger these warnings manually with the way the ContextProvider and our types are set up- open to suggestions if I'm missing something here.
Description
This is a subtask of https://github.com/allenai/scholar/issues/28926 and a continuation of the state management work from https://github.com/allenai/scholar/issues/28332.
This PR replaces our previous (bogus) default context setter functions with a console warning that informs the user that the function they are calling hasn't been set up properly.
Example warning text: "Unable to call setNumPages(5). The DocumentContext Provider may not be set up correctly." (open to better copy if you have suggestions)
Reviewer Instructions
This was done to appease a TypeScript warning. I'm not sure how to trigger these warnings manually with the way the
ContextProvider
and our types are set up- open to suggestions if I'm missing something here.Testing Plan
Run all unit tests locally.