mirror of https://github.com/zulip/zulip.git
da79fd206a
This cleans up the handoff of page_params data between ui_init and modules that take over ownership of page_params-derived data. Read the long comment in ui_init for a bit more context. Most of this diff is actually test cleanup. And a lot of the diff to "real" code is just glorified `s/page_params/params/` in the `initialize` functions. One little oddity is that we don't actually surrender ownership of `page_params.user_id` to `people.js`. We could plausibly sweep the rest of the codebase to just use `people.my_user_id()` consistently, but it's not a super high priority thing to fix, since the value never changes. The stream_data situation is a bit messy, since we consume `page_params` data in the initialize() function in addition to the `params` data we "own". I added a comment there and intend to follow up. I tried to mostly avoid the "word soup" by extracting three locals at the top. Finally, I don't touch `alert_words` yet, despite it also doing the delete-page-params-data dance. The problem is that `alert_words` doesn't have a proper `initialize()`. We should clean that up and have it use a `Map` internally, too. |
||
---|---|---|
.. | ||
casper_lib | ||
casper_tests | ||
node_tests | ||
zjsunit | ||
.eslintrc.json | ||
run-casper |