Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

team: Pop contributors from page_params.

sbansal1999cc6661f777db
diff --git a/web/src/portico/landing-page.js b/web/src/portico/landing-page.js
index 991300e8aa9..6902d6a1089 100644
--- a/web/src/portico/landing-page.js
+++ b/web/src/portico/landing-page.js
@@ -5,6 +5,7 @@ import microsoft_image from "../../images/app-screenshots/microsoft.png";
import ubuntu_image from "../../images/app-screenshots/ubuntu.png";
import android_image from "../../images/app-screenshots/zulip-android.png";
import iphone_image from "../../images/app-screenshots/zulip-iphone-rough.png";
+import {page_params} from "../page_params";
import {detect_user_os} from "./tabbed-instructions";
import render_tabs from "./team";
@@ -194,7 +195,9 @@ $(() => {
events();
if (window.location.pathname === "/team/") {
- render_tabs();
+ const contributors = page_params.contributors;
+ delete page_params.contributors;
+ render_tabs(contributors);
}
// Source: https://stackoverflow.com/questions/819416/adjust-width-and-height-of-iframe-to-fit-with-content-in-it
diff --git a/web/src/portico/team.js b/web/src/portico/team.js
index cf326460c11..d5deb812728 100644
--- a/web/src/portico/team.js
+++ b/web/src/portico/team.js
@@ -1,8 +1,6 @@
import $ from "jquery";
import _ from "lodash";
-import {page_params} from "../page_params";
-
const repo_name_to_tab_name = {
zulip: "server",
"zulip-desktop": "desktop",
@@ -63,12 +61,12 @@ function exclude_bot_contributors(contributor) {
// TODO (for v2 of /team/ contributors):
// - Make tab header responsive.
// - Display full name instead of GitHub username.
-export default function render_tabs() {
+export default function render_tabs(contributors) {
const template = _.template($("#contributors-template").html());
const count_template = _.template($("#count-template").html());
const total_count_template = _.template($("#total-count-template").html());
- const contributors_list = page_params.contributors
- ? page_params.contributors.filter((c) => exclude_bot_contributors(c))
+ const contributors_list = contributors
+ ? contributors.filter((c) => exclude_bot_contributors(c))
: [];
const mapped_contributors_list = contributors_list.map((c) => ({
name: get_display_name(c),