mirror of https://github.com/zulip/zulip.git
72e0f2e901
This is mostly a refactoring to break the unnecessary dependency of bot_data on settings_bots. This is a bit more than a refactoring, as I remove all the debounced calls to render bots during the initialization of bot_data. (The debouncing probably meant we only rendered once, but it was still needless work.) We don't need to explicitly render bots during bot_data.initialize(), which you can verify by loading "#settings/your-bots" as the home page. It was just an artifact of how add() was implemented. Note that for the **admin** screen, we did not and still do not do live updates for add/remove; we only do it for updates. Fixing that is out of the scope of this change. The code that was moved here affects **personal** bot settings. Note that the debounce code is quite fragile. See my code comment that explains it. I don't have time to go down the rabbit hole of a deep fix here. The puppeteer tests would fail without the debounce, even though I was able to eliminate the debounce in an earlier version of this fix and see good results during manual testing. (My testing may have just been on the "lucky" side of the race.) I created #17743 to address this problem. |
||
---|---|---|
.. | ||
assets | ||
audio | ||
generated | ||
html | ||
images | ||
js | ||
shared | ||
styles | ||
templates | ||
third | ||
.gitignore |