-
Notifications
You must be signed in to change notification settings - Fork 203
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
Refactor buildSettings
internals and add RPCSettings to settings
#4352
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4352 +/- ##
=======================================
Coverage 99.14% 99.14%
=======================================
Files 225 225
Lines 8580 8585 +5
Branches 2032 2033 +1
=======================================
+ Hits 8507 8512 +5
Misses 73 73
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
* | ||
* @param {ConfigFromHost} configFromHost | ||
* @param {Window} window_ | ||
* @return {import('../../types/config').RPCSettings|null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, minor nit. This was already imported and @typedef-d in this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few comments and suggestions, but the changes overall make sense and the structure of buildSettings
is now much easier to follow.
3394a5f
to
e46ece2
Compare
Add a new `RPCSettings` type to retain RPC-related settings in `SidebarSettings`. These are derived from values provided in `ConfigFromHost`. Refactor internals of `buildSettings` to have a less ambiguous flow and retain RPC settings. Part of hypothesis/lms#3647
e46ece2
to
7a87abb
Compare
This PR is primarily concerned with refactoring the internal logic in
build-settings
module to be less ambiguous and more amenable to extension. The only outward-facing changes is that some information pertaining to making RPC requests is now retained on a newRPCSettings
object that is part ofSidebarSettings
. We will need to "persist" information about which frame and origin to make RPC requests at (in settings) to be able to communicate about annotation activity to the LMS app to support improved Canvas grading submissions.Part of hypothesis/lms#3647
Depends on #4351 (that one's ready to go, just held up by GitHub outages today, will deploy in the morning)