Skip to content

Commit b8bcbc2

Browse files
authored
fix(src): restructure src layout, improve scoping and css (#1079)
2 parents b93fed6 + b69273a commit b8bcbc2

File tree

104 files changed

+3564
-4686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+3564
-4686
lines changed

.github/workflows/check-external-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v6
1919
- name: Restore lychee cache
20-
uses: actions/cache@v4
20+
uses: actions/cache@v5
2121
with:
2222
path: .lycheecache
2323
key: cache-lychee-${{ hashFiles('lychee.toml') }}

CONTRIBUTING.md

Lines changed: 61 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
11
# Contributing Guidelines
22

3-
Thank you for helping improve **Flare Developer Hub**!
4-
Your contributions make our documentation, tooling, and examples better for everyone.
3+
Thank you for contributing to **Flare Developer Hub**.
4+
Contributions improve the documentation, tooling, and examples for the entire Flare developer community.
55

66
We welcome:
77

8-
- **[GitHub Issues](https://github.com/flare-foundation/developer-hub/issues):** Report bugs, suggest features, or ask questions.
9-
- **[Pull Requests](https://github.com/flare-foundation/developer-hub/pulls):** Submit fixes, improvements, or new content (documentation, examples, site features).
8+
- [Issues](https://github.com/flare-foundation/developer-hub/issues): Report bugs, propose enhancements, or ask questions.
9+
- [Pull Requests](https://github.com/flare-foundation/developer-hub/pulls): Fixes, improvements, and new content.
1010

11-
## 🛠 Development Workflow
11+
## Development workflow
1212

13-
1. **Fork and branch:** Fork the repo on GitHub and create a branch for your work:
13+
1. **Fork and branch:** Create a branch that describes the change:
1414

1515
```bash
16-
git checkout -b feature/your-feature-name
16+
git checkout -b feat/your-feature-name
1717
```
1818

19+
Suggested prefixes:
20+
- `docs/…` for documentation-only work
21+
- `feat/…` for new functionality
22+
- `fix/…` for bug fixes
23+
- `chore/…` for maintenance (deps, refactors, tooling)
24+
1925
2. **Make changes:** Edit or add:
20-
- Documentation (`docs/`)
21-
- Source code (`src/`)
22-
- Examples (`examples/`)
23-
- automation and docgen scripts (`automations/`, `docgen/`)
26+
- Documentation: `docs/`
27+
- Source code: `src/`
28+
- Examples: `examples/`
29+
- Automation scripts: `automations/`
30+
- Solidity doc generation: `docgen/`
31+
32+
When editing docs, prefer small, reviewable diffs and reuse existing patterns (MDX components, admonitions, callouts, etc.).
2433

25-
3. **Follow Style Guides:**
26-
- **Code/Docs:** Run [Pre-PR checks](#pre-pr-checks). Match existing code style.
27-
- **Diagrams:** Adhere to the [Diagram Style Guide](#diagrams-style-guide) for consistency.
34+
3. **Follow project style:**
35+
- Match existing TypeScript/React and MDX style conventions.
36+
- Run the checks in [Pre-PR checks](#pre-pr-checks).
37+
- For diagrams, follow the [Diagram Style Guide](#diagrams-style-guide) below.
2838

29-
4. **Commit Your Changes:** We require [Conventional Commits](https://www.conventionalcommits.org/) format for clear history and automated changelogs.
39+
4. **Commit using Conventional Commits:** We require [Conventional Commits](https://www.conventionalcommits.org/) format for a clear history and automation-friendly changelogs.
3040

31-
**Format:** `<type>(<scope>): <description>`
41+
Format: `<type>(<scope>): <description>`
3242

33-
**Common Types:**
43+
Common types:
3444

3545
| Type | Description |
3646
| :--------- | :---------------------------------------- |
@@ -43,67 +53,75 @@ We welcome:
4353
| `style` | Formatting changes (whitespace, etc.) |
4454
| `ci` | CI pipeline changes |
4555

46-
**Examples:**
56+
Examples:
4757

4858
```bash
4959
git commit -m "fix(ftso): correct feed ID example in getting started guide"
50-
git commit -m "feat(src): add copy button to code blocks"
60+
git commit -m "feat(ui): add copy button to code blocks"
5161
git commit -m "docs(fassets): clarify liquidation process diagram"
5262
```
5363

5464
5. **Push and open a PR:**
5565

5666
```bash
57-
git push origin feature/your-feature-name
67+
git push origin feat/your-feature-name
5868
```
5969

6070
Then open a PR against `main` in [flare-foundation/developer-hub](https://github.com/flare-foundation/developer-hub)
6171

62-
## 📋 Pull Request Guidelines
72+
## <a id="pull-request-guidelines"></a> Pull request guidelines
6373

64-
- ✅ **Small & Focused:** One logical change per PR.
65-
- ✅ **Discuss Large Changes First:** Open an issue before starting.
66-
- ✅ **Provide Context:** Describe the problem, solution, and link related issues.
67-
- ✅ **Pass CI:** Fix any GitHub Actions failures before requesting review.
68-
- ✅ **Update Docs:** If behavior or usage changes.
69-
- ✅ **Confirm Licensing:** All PRs are submitted under this repo’s [license](LICENSE).
74+
- [ ] **Keep PRs focused:** one logical change per PR.
75+
- [ ] **Discuss large changes first:** especially for docs structure and shared components.
76+
- [ ] **Ensure CI passes:** address any GitHub Actions failures before requesting review.
77+
- [ ] **Update docs:** if behavior, configuration, or user-facing flows change.
78+
- [ ] **License:** by submitting a PR, you agree your contribution is provided under this repo’s [license](LICENSE).
7079

71-
## <a id="pre-pr-checks"></a>🔍 Pre-PR Checks
80+
## <a id="pre-pr-checks"></a> Pre-PR checks
7281

73-
Run these before submitting a PR:
82+
Run these locally before submitting a PR.
7483

75-
1. **Build & check internal links:**
84+
### Site checks
85+
86+
1. **Build (includes internal link validation)**
7687

7788
```bash
7889
npm run build
7990
```
8091

81-
2. **Format, lint, and type-check:**
92+
2. **Format, lint, and type-check**
8293

8394
```bash
84-
npm run format && npm run lint && npm run typecheck
95+
npm run format
96+
npm run lint
97+
npm run typecheck
8598
```
8699

87-
3. **Check external links** (requires [lychee](https://github.com/lycheeverse/lychee)):
100+
3. **External link checking (optional but recommended)**
101+
102+
If you have [lychee](https://github.com/lycheeverse/lychee) installed:
88103

89104
```bash
90105
lychee --config lychee.toml .
91106
```
92107

93-
4. **If you modified examples**, run their formatters and tests, see `examples/developer-hub-*/README.md` for more instructions.
94-
Example for Rust:
108+
4. **Examples (only if modified)**
109+
110+
Each example project is self-contained; follow the instructions in the relevant `examples/developer-hub-*/README.md`.
111+
112+
Rust example (illustrative):
95113

96114
```bash
97115
cd examples/developer-hub-rust/
98-
cargo fmt -- --check # Format
99-
cargo clippy --bins -- -D warnings # Lint
100-
cargo build --bins --locked # Build
101-
chmod +x test.sh && ./test.sh # Test
116+
cargo fmt -- --check
117+
cargo clippy --bins -- -D warnings
118+
cargo build --bins --locked
119+
chmod +x test.sh && ./test.sh
102120
```
103121

104-
## <a id="diagrams-style-guide"></a>🖼 Diagrams Style Guide
122+
## <a id="diagrams-style-guide"></a> Diagrams style guide
105123

106-
Follow these styles for consistency:
124+
Use these defaults to keep diagrams consistent in light/dark mode.
107125

108126
| Element | Light Mode | Dark Mode | Notes |
109127
| :----------------------- | :--------- | :-------- | :----------------------------------------------- |
@@ -117,8 +135,6 @@ Follow these styles for consistency:
117135

118136
See the [homepage architecture diagram](https://dev.flare.network/#understand-the-architecture) for an example.
119137

120-
## 💬 Need Help?
121-
122-
If you get stuck or have questions, feel free to ask in a [GitHub Issue](https://github.com/flare-foundation/developer-hub/issues).
138+
## Need Help?
123139

124-
**Thank you for contributing\!**
140+
If you get stuck or want feedback on an approach, open a [GitHub Issue](https://github.com/flare-foundation/developer-hub/issues).

0 commit comments

Comments
 (0)