Skip to content

Commit 08676d6

Browse files
committed
Move FCP to index page and remove distinction between helping and input
1 parent 3689bbe commit 08676d6

File tree

11 files changed

+38
-145
lines changed

11 files changed

+38
-145
lines changed

app/app-styles/app.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,18 @@
8888
}
8989

9090
}
91+
92+
.fcp-item {
93+
display: block;
94+
width: fit-content;
95+
margin-bottom: var(--spacing-1);
96+
}
97+
98+
.fcp-item h3 {
99+
width: max-content;
100+
}
101+
102+
.github-url {
103+
position: absolute;
104+
right: var(--spacing-5);
105+
}

app/routes/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import Route from '@ember/routing/route';
22

33
export default class IndexRoute extends Route {
44
async model() {
5-
return (await import('rfcs/README.md?raw')).default;
5+
const result = (
6+
await import('rfcs-app-toc-builder:fcp.json')
7+
).default;
8+
return result;
69
}
710
}

app/routes/rfc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ export default class RfcsRoute extends Route {
1414

1515
const rfc = (await rfcs[rormalisedRFCId]()).default;
1616

17+
const number = Number(params.id.split('-')[0]);
18+
1719
return {
1820
...rfc,
1921
id: params.id,
22+
url: `https://github.com/emberjs/rfcs/pull/${number}`,
2023
};
2124
}
2225
}

app/routes/rfcs-help.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/routes/rfcs-input.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/templates/application.gjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ import EsSidebar from 'ember-styleguide/components/es-sidebar';
1414
<ul class="table-of-contents">
1515
<li class="toc-item">
1616
<LinkTo @route="index">Welcome</LinkTo>
17-
<ul class="table-of-contents sub-table-of-contents">
18-
<li class="toc-item">
19-
<LinkTo @route="rfcs-input">RFCs that need your input</LinkTo>
20-
</li>
21-
<li class="toc-item">
22-
<LinkTo @route="rfcs-help">RFCs that need your help</LinkTo>
23-
</li>
24-
</ul>
2517
</li>
2618

2719
<li class="toc-heading">RFC process</li>

app/templates/index.gjs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
import RfcCard from '../components/rfc-card';
1+
import { LinkTo } from '@ember/routing';
2+
3+
function daysUntilFriday() {
4+
let today = new Date().getDay();
5+
return (12 - today)%7; //It's 12 because Friday is the fifth day, and we wan't to %7 so we added 7
6+
}
27

38
<template>
49
<div>
510
<h1>Welcome to the Ember.js RFCs app</h1>
611
<p>This is the place to find what is currently cooking within Ember.js.
712
Check out the documentation on our RFC process and what RFCs need your
813
input!</p>
9-
<h2>RFC's that can use your input</h2>
10-
<div class="rfc-grid">
11-
<RfcCard @compact={{true}} @title="0127-make-sure-the-times-is-on-time" />
12-
<RfcCard @compact={{true}} @title="0128-make-sure-the-times-is-on-time" />
13-
<RfcCard @compact={{true}} @title="0129-make-sure-the-times-is-on-time" />
14-
</div>
15-
<a href="/rfcs-input">See all</a>
16-
<h2>RFC's that need you help</h2>
17-
<div class="rfc-grid">
18-
<RfcCard @compact={{true}} @title="0117-make-sure-the-times-is-on-time" />
19-
<RfcCard @compact={{true}} @title="0137-make-sure-the-times-is-on-time" />
20-
<RfcCard @compact={{true}} @title="0147-make-sure-the-times-is-on-time" />
14+
<h2>These RFCs are in their Final Comment Period and will move to their next stage in {{daysUntilFriday}} days</h2>
15+
<div>
16+
{{#each @model as |rfc|}}
17+
<LinkTo class="fcp-item" @route="rfc" @model={{rfc.rfcFile}}>#{{rfc.number}} {{rfc.title}}</LinkTo>
18+
{{/each}}
2119
</div>
22-
<a href="/rfcs-help">See all</a>
2320
</div>
2421
</template>

app/templates/rfc.gjs

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,66 +7,12 @@ import { inject as controller } from '@ember/controller';
77
export default class RFCRouteComponent extends Component {
88
@controller application;
99

10-
toggleSidebar() {
11-
document.body.classList.toggle('sidebar-hidden');
12-
}
1310

1411
<template>
1512
{{pageTitle "Rfc"}}
1613
<div class="page">
17-
<div class="menu-bar">
18-
<div class="left-buttons">
19-
{{!-- <button class="reset" type="button" {{on "click" this.toggleSidebar}}>
20-
<FaIcon class="p2" @icon="bars" />
21-
</button> --}}
22-
</div>
23-
</div>
24-
<table class="rfc-data-table">
25-
<thead>
26-
<tr>
27-
<td>Start Date</td>
28-
<td>Release Date</td>
29-
<td>Release Versions</td>
30-
<td>PR link</td>
31-
<td>Tracking Link</td>
32-
<td>Stage</td>
33-
<td>Teams</td>
34-
</tr>
35-
</thead>
36-
<tbody>
37-
<tr>
38-
<td>{{formatDate @model.startDate}}</td>
39-
<td>{{formatDate @model.releaseDate}}</td>
40-
<td>
41-
<ul>
42-
{{#each-in @model.releaseVersions as |key value|}}
43-
<li>
44-
{{key}}:
45-
{{value}}
46-
</li>
47-
{{/each-in}}
48-
</ul>
49-
</td>
50-
<td>
51-
{{#if @model.proposalPr}}
52-
<a href={{@model.proposalPr}}>RFC Proposal Link</a>
53-
{{/if}}
54-
</td>
55-
<td>
56-
{{#if @model.trackingLink}}
57-
<a href={{@model.trackingLink}}>Tracking Link</a>
58-
{{/if}}
59-
</td>
60-
<td>{{@model.stage}}</td>
61-
<td><ul>
62-
{{#each @model.teams as |team|}}
63-
<li>{{team}}</li>
64-
{{/each}}
65-
</ul></td>
66-
</tr>
67-
</tbody>
68-
</table>
6914
<div class="content">
15+
<a class="github-url" href={{@model.url}} rel="noopener noreferrer" target="_blank">Open on Github</a>
7016
<MarkdownToHtml @markdown={{@model.content}} />
7117
</div>
7218
</div>

app/templates/rfcs-help.gjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/templates/rfcs-input.gjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)