Skip to content

Commit d73c0bb

Browse files
aaronpowellCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0637cad commit d73c0bb

7 files changed

Lines changed: 37 additions & 14 deletions

File tree

website/public/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ a:hover {
15981598

15991599
.learning-hub-sidebar {
16001600
position: sticky;
1601-
top: 24px;
1601+
top: calc(var(--header-height) + 24px);
16021602
max-height: calc(100vh - 48px);
16031603
overflow-y: auto;
16041604
}

website/src/content/learning-hub/before-after-customization-examples.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ relatedArticles:
1616
- ./defining-custom-instructions.md
1717
---
1818

19-
# Before/After Customization Examples
20-
2119
The power of GitHub Copilot customization becomes clear when you see concrete examples of how agents, skills, and instructions transform everyday development workflows. This article presents real-world scenarios showing the dramatic difference between default Copilot behavior and customized experiences that align with your team's standards, tools, and practices.
2220

2321
> Note: The following examples illustrate typical before-and-after scenarios. The actual before and after code may vary depending on the model used and any other context present at generation time.

website/src/content/learning-hub/copilot-configuration-basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,11 +364,11 @@ A: Use the `excludedFiles` setting in your IDE configuration or create a workspa
364364

365365
**Q: Can I have different settings per project?**
366366

367-
A: Yes! Use workspace settings (`.vscode/settings.json`) for project-specific preferences that don't need to be shared, or use repository settings (`.github/copilot/`) for team-wide customizations that should be version-controlled.
367+
A: Yes! Use workspace settings (`.vscode/settings.json`) for project-specific preferences that don't need to be shared, or use repository settings (for example, files in `.github/agents/`, `.github/skills/`, `.github/instructions/`, and `.github/copilot-instructions.md`) for team-wide customizations that should be version-controlled.
368368

369369
**Q: How do team settings override personal settings?**
370370

371-
A: Repository settings in `.github/copilot/` have the highest precedence, followed by workspace settings, then user settings. This means team-defined instructions and agents will apply even if your personal settings differ, ensuring consistency across the team.
371+
A: Repository-level Copilot configuration (such as `.github/agents/`, `.github/skills/`, `.github/instructions/`, and `.github/copilot-instructions.md`) has the highest precedence, followed by workspace settings, then user settings. This means team-defined instructions and agents will apply even if your personal settings differ, ensuring consistency across the team.
372372

373373
**Q: Where should I put customizations that apply to all my projects?**
374374

website/src/content/learning-hub/github-copilot-terminology-glossary.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ relatedArticles:
1414
- ./copilot-configuration-basics.md
1515
---
1616

17-
# GitHub Copilot Terminology Glossary
18-
1917
New to GitHub Copilot customization? This glossary defines common terms you'll encounter while exploring agents, skills, instructions, and related concepts in the Awesome GitHub Copilot ecosystem.
2018

2119
Use this page as a quick reference when reading articles in the Learning Hub or browsing the repository.

website/src/content/learning-hub/understanding-copilot-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Using `#` to reference specific files gives Copilot precise context about which
118118
GitHub Copilot has a maximum token limit for how much context it can process at once. When you have many files open or a long chat history, Copilot prioritizes:
119119

120120
1. **Closest proximity**: Code immediately surrounding your cursor
121-
2. **Explicitly referenced files**: Files you @-mention in chat for CLI, and #-mention for IDE's (VS Code, Visual Studio, JetBrains, etc.)
121+
2. **Explicitly referenced files**: Files you @-mention in chat for CLI, and #-mention for IDEs (VS Code, Visual Studio, JetBrains, etc.)
122122
3. **Recently modified files**: Files you've edited recently
123123
4. **Direct dependencies**: Files imported by your current file
124124

website/src/layouts/ArticleLayout.astro

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,32 @@ interface Props {
1414
const { title, description, estimatedReadingTime, lastUpdated, tags } = Astro.props;
1515
const base = import.meta.env.BASE_URL;
1616
17+
const createOrderIndexMap = (order: string[]) => {
18+
const map = new Map<string, number>();
19+
for (let i = 0; i < order.length; i += 1) {
20+
map.set(order[i], i);
21+
}
22+
return map;
23+
};
24+
1725
const articles = await getCollection('learning-hub');
1826
27+
const fundamentalsOrderIndex = createOrderIndexMap(fundamentalsOrder);
28+
const referenceOrderIndex = createOrderIndexMap(referenceOrder);
29+
1930
const fundamentals = articles
20-
.filter((a) => fundamentalsOrder.includes(a.id))
21-
.sort((a, b) => fundamentalsOrder.indexOf(a.id) - fundamentalsOrder.indexOf(b.id));
31+
.filter((a) => fundamentalsOrderIndex.has(a.id))
32+
.sort(
33+
(a, b) =>
34+
(fundamentalsOrderIndex.get(a.id) ?? 0) - (fundamentalsOrderIndex.get(b.id) ?? 0),
35+
);
2236
2337
const reference = articles
24-
.filter((a) => referenceOrder.includes(a.id))
25-
.sort((a, b) => referenceOrder.indexOf(a.id) - referenceOrder.indexOf(b.id));
38+
.filter((a) => referenceOrderIndex.has(a.id))
39+
.sort(
40+
(a, b) =>
41+
(referenceOrderIndex.get(a.id) ?? 0) - (referenceOrderIndex.get(b.id) ?? 0),
42+
);
2643
2744
const currentSlug = Astro.url.pathname.replace(/\/$/, '').split('/').pop();
2845
---

website/src/pages/learning-hub/index.astro

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ import { fundamentalsOrder, referenceOrder } from '../../config/learning-hub';
66
const base = import.meta.env.BASE_URL;
77
const articles = await getCollection('learning-hub');
88
9+
const fundamentalsOrderIndex = {};
10+
fundamentalsOrder.forEach((id, index) => {
11+
fundamentalsOrderIndex[id] = index;
12+
});
13+
14+
const referenceOrderIndex = {};
15+
referenceOrder.forEach((id, index) => {
16+
referenceOrderIndex[id] = index;
17+
});
18+
919
const fundamentals = articles
1020
.filter((a) => fundamentalsOrder.includes(a.id))
11-
.sort((a, b) => fundamentalsOrder.indexOf(a.id) - fundamentalsOrder.indexOf(b.id));
21+
.sort((a, b) => fundamentalsOrderIndex[a.id] - fundamentalsOrderIndex[b.id]);
1222
1323
const reference = articles
1424
.filter((a) => referenceOrder.includes(a.id))
15-
.sort((a, b) => referenceOrder.indexOf(a.id) - referenceOrder.indexOf(b.id));
25+
.sort((a, b) => referenceOrderIndex[a.id] - referenceOrderIndex[b.id]);
1626
---
1727

1828
<BaseLayout title="Learning Hub" description="Curated articles and walkthroughs to help you unlock everything you can do with GitHub Copilot" activeNav="learning-hub">

0 commit comments

Comments
 (0)