mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 12:21:58 +00:00
Decision made in https://chat.zulip.org/#narrow/channel/19-documentation/topic/integrations.20docs.20per-page.20info/near/2268569 Integrations and the related docs were all running as an SPA. But to run them in single page, we had a lot of logic on the frontend to make this happen. We noticed that we missed to replicate page title changes on the frontend. With the added burden of maintaining that integrations.ts page navigation code and the uncertainty of not knowing what we might have missed to replicate on the frontend, we decided to just render all the pages server side while keeping our search on the backend. This commit splits index.html into two templates, catalog.html for integrations catalog and doc.html for the individual integration details page. We use a @typed_endpoint instead of a class based view since there are very few class based views left in our codebase and this felt like a nice opportunity to have integrations use them as well. We port over any special non-navigation logic we were doing in integrations.ts serverside. We used to use animations for the lozenges when changing categories, we don't do that anymore, since every category is a new page fetch and animation does not make sense in that case. We also port over the logic of adding the `without-category` class to the lozenge icon on the indivdidual integration doc page. We have a few integrations with legacy set to true. We used to set their display to none in the CSS for the catalog page and we used to remove that legacy class in integrations.ts for the individual doc page. We remove legacy integrations from `visible_integrations` now, while the individual doc page of the legacy integration works just fine without the use of `legacy` class anywhere.
36 KiB
36 KiB