Skip to content

Commit

Permalink
Move launching pad to its own page
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 13, 2025
1 parent 57a3c62 commit 97d9064
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
3 changes: 3 additions & 0 deletions locales/en-US/teams.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions src/teams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use crate::cache::{Cache, Cached};
#[derive(Default, Serialize)]
pub struct IndexData {
teams: Vec<IndexTeam>,
wgs: Vec<IndexTeam>,
}

#[derive(Serialize)]
Expand Down Expand Up @@ -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 {
Expand All @@ -82,16 +79,12 @@ impl Data {
})
.for_each(|team| match team.team.kind {
TeamKind::Team => data.teams.push(team),
TeamKind::WorkingGroup => data.wgs.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)
}

Expand Down Expand Up @@ -374,9 +367,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]
Expand Down
15 changes: 0 additions & 15 deletions templates/governance/index.html.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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")~}}

0 comments on commit 97d9064

Please sign in to comment.