Skip to content
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

Move launching pad to its own page #2105

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move launching pad to its own page
ehuss committed Jan 13, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 4333dd514ab942182d1ae857edf46c8dffb49e20
3 changes: 3 additions & 0 deletions locales/en-US/teams.ftl
Original file line number Diff line number Diff line change
@@ -56,6 +56,9 @@ governance-team-lang-docs-description = Developing and writing the docs related
governance-team-lang-ops-name = lang-ops team
governance-team-lang-ops-description = Operations for the lang team: preparing agenda, issue triage, scheduling and documenting meetings

governance-team-launching-pad-name = Launching pad
governance-team-launching-pad-description = An interim home for teams

governance-team-leadership-council-name = Leadership council
governance-team-leadership-council-description = Charged with the success of the Rust Project as whole, consisting of representatives from top-level teams

21 changes: 6 additions & 15 deletions src/teams.rs
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ use crate::cache::{Cache, Cached};
#[derive(Default, Serialize)]
pub struct IndexData {
teams: Vec<IndexTeam>,
wgs: Vec<IndexTeam>,
}

#[derive(Serialize)]
@@ -63,13 +62,11 @@ impl Data {
.into_iter()
.filter(|team| team.website_data.is_some())
// On the main page, show the leadership-council, all top-level
// teams, and everything in the launching pad. We may want to
// consider putting launching pad teams in a separate page in the
// future?
// teams.
.filter(|team| {
matches!(
team.subteam_of.as_deref(),
None | Some("launching-pad") | Some("leadership-council")
None | Some("leadership-council")
)
})
.map(|team| IndexTeam {
@@ -80,18 +77,15 @@ impl Data {
),
team,
})
.for_each(|team| match team.team.kind {
TeamKind::Team => data.teams.push(team),
TeamKind::WorkingGroup => data.wgs.push(team),
_ => {}
.for_each(|team| {
if team.team.kind == TeamKind::Team {
data.teams.push(team)
}
});

data.teams.sort_by_key(|index_team| {
Reverse(index_team.team.website_data.as_ref().unwrap().weight)
});
data.wgs.sort_by_key(|index_team| {
Reverse(index_team.team.website_data.as_ref().unwrap().weight)
});
Ok(data)
}

@@ -374,9 +368,6 @@ mod tests {
assert_eq!(res.teams.len(), 1);
assert_eq!(res.teams[0].url, "teams/bar");
assert_eq!(res.teams[0].team.name, "bar");
assert_eq!(res.wgs.len(), 1);
assert_eq!(res.wgs[0].url, "wgs/foo");
assert_eq!(res.wgs[0].team.name, "foo");
}

#[test]
15 changes: 0 additions & 15 deletions templates/governance/index.html.hbs
Original file line number Diff line number Diff line change
@@ -37,20 +37,5 @@
</div>
</section>

<section id="working-groups" class="green">
<div class="w-100 mw-none ph3 mw-8-m mw9-l center f3">
<header>
<h2>{{fluent "governance-wgs-header"}}</h2>
<div class="highlight"></div>
</header>
<div class="flex flex-column flex-row-l flex-wrap-l justify-start tc">

{{#each data.wgs as |team| ~}}
{{> governance/index-team}}
{{/each~}}
</div>
</div>
</section>

{{/inline}}
{{~> (lookup this "parent")~}}