@@ -20,6 +20,7 @@ Electron documentation and its functions, classes, etc. in a similar fashion to
20
20
use of a simple but powerful YAML schema in the API documentation Markdown files
21
21
and displaying it nicely on the Electron documentation website.
22
22
23
+ <!-- truncate-->
23
24
## Details
24
25
25
26
### API history documentation system / YAML schema
@@ -75,7 +76,7 @@ One large change is the removal of version numbers:
75
76
> the proposal, which came up during discussion when we were reviewing proposals.
76
77
> [ ...]
77
78
>
78
- > [ we] decided that the approach with the least drawbacks would be to only
79
+ > [ we] decided that the approach with the [ fewest ] drawbacks would be to only
79
80
> use PR URLs (the root PRs to main) instead of hardcoded version strings as in
80
81
> the proposal.
81
82
>
@@ -88,10 +89,10 @@ One large change is the removal of version numbers:
88
89
We also didn't include removals in the API History, since when an API is removed
89
90
from Electron, it is also removed from the documentation.
90
91
91
- ### JavaScript details
92
+ ### JavaScript implementation
92
93
93
94
I originally planned to create a new ` @electron/docs-api-history-tools `
94
- NPM package that would contain scripts for extracting, validating/linting and converting
95
+ npm package that would contain scripts for extracting, validating/linting and converting
95
96
the API history in the documentation files.
96
97
97
98
About a week before the coding period began, and after some discussion with my
@@ -120,14 +121,14 @@ Instead, we divided those various tools across the Electron repos that were most
120
121
relevant to them:
121
122
122
123
- ` yaml-api-history-schema.json `
123
- - -> ` electron/electron ` (` api-history.schema.json ` )
124
+ - -> ` electron/electron ` ([ ` api-history.schema.json ` ] ( https://github.com/electron/electron/blob/main/docs/api-history.schema.json ) )
124
125
- ` lint-yaml-api-history.ts `
125
- - -> ` electron/lint-roller ` (` lint-markdown-api-history.ts ` )
126
+ - -> ` electron/lint-roller ` ([ ` lint-markdown-api-history.ts ` ] ( https://github.com/electron/lint-roller/blob/3d87b7ba8f99868a28648297f31a1587945045ab/bin/lint-markdown-api-history.ts#L4 ) )
126
127
- ` extract-yaml-api-history.ts `
127
- - -> ` electron/website ` (` preprocess-api-history.ts ` )
128
+ - -> ` electron/website ` ([ ` preprocess-api-history.ts ` ] ( https://github.com/electron/website/blob/f7e9446dd7d04b3369e9454f7c95f638fa061f1e/scripts/tasks/preprocess-api-history.ts#L4 ) )
128
129
- ` yaml-api-history-to-markdown.ts `
129
- - -> ` electron/website ` (` transformers/api-history.ts ` )
130
- - -> ` electron/website ` (` ApiHistoryTable.tsx ` )
130
+ - -> ` electron/website ` ([ ` transformers/api-history.ts ` ] ( https://github.com/electron/website/blob/f7e9446dd7d04b3369e9454f7c95f638fa061f1e/src/transformers/api-history.ts ) )
131
+ - -> ` electron/website ` ([ ` ApiHistoryTable.tsx ` ] ( https://github.com/electron/website/blob/f7e9446dd7d04b3369e9454f7c95f638fa061f1e/src/components/ApiHistoryTable.tsx ) )
131
132
132
133
### UI and styling for Electron documentation website
133
134
@@ -146,16 +147,16 @@ of [SemVer](https://semver.org/) ranges, which were chosen to better communicate
146
147
which versions a feature is present in (thanks Samuel Attard
147
148
[ (@MarshallOfSound )] ( https://github.com/MarshallOfSound ) for the suggestion!).
148
149
149
- ### Usage/style Guide
150
+ ### Usage/style guide
150
151
151
152
I added a usage/style guide dedicated to writing API history documentation for
152
153
new features. I described proper usages of the YAML schema in detail, provided
153
154
typical/useful examples, etc. You can find it
154
155
[ here] ( https://github.com/electron/electron/blob/main/docs/styleguide.md#api-history ) .
155
156
156
- ### Migration Guide
157
+ ### Migration guide
157
158
158
- Since existing API's have to be migrated to the new documentation system, I created
159
+ Since existing APIs have to be migrated to the new documentation system, I created
159
160
a migration guide. It features the typical steps of what a developer has
160
161
to do when migrating old APIs: looking through breaking changes, browsing through
161
162
the past releases, maybe looking through old commits, etc.
@@ -166,7 +167,7 @@ Sadly, I couldn't think of a way to automate this effectively. This would probab
166
167
be a great task for an AI/ML engineer; however, I don't possess those skills and
167
168
was too afraid of accidentally introducing [ hallucinations] ( < https://en.wikipedia.org/wiki/Hallucination_(artificial_intelligence) > )
168
169
into the API history. Even if automated, the information would still probably have
169
- to be verified by a human in the end :/ . This task will probably have to be done
170
+ to be verified by a human in the end 😕 . This task will probably have to be done
170
171
manually, on a file-by-file basis,
171
172
[ just like it was done for the Node.js documentation] ( https://github.com/nodejs/node/issues/6578 ) .
172
173
@@ -177,11 +178,10 @@ manually, on a file-by-file basis,
177
178
- A comprehensive YAML schema for documenting API history which includes support
178
179
for:
179
180
- [x] Additions
180
- - [x] Depreciations
181
+ - [x] Deprecations
181
182
- [x] Changes
182
183
- [x] Links to relevant pull requests
183
184
- [x] Backports
184
- - [x] etc.
185
185
- [x] Proposed in: [ electron/rfc #6 ] [ rfc ]
186
186
- [x] Implemented/Used in: [ electron/electron #42982 ] [ electron ]
187
187
- [x] Used in: [ electron/website #594 ] [ website ]
@@ -216,7 +216,6 @@ manually, on a file-by-file basis,
216
216
documentation website.
217
217
- [x] Uses styling that follows the rest of the website's design.
218
218
- [x] Responsive, accessible, and generally well written HTML, CSS, and JS.
219
- - [x] etc.
220
219
- [x] Implemented/Used in: [ electron/website #594 ] [ website ]
221
220
222
221
- ` styleguide.md `
@@ -225,15 +224,13 @@ manually, on a file-by-file basis,
225
224
- [x] Easy to understand
226
225
- [x] Well written
227
226
- [x] Includes examples
228
- - [x] etc.
229
227
- [x] Implemented/Used in: [ electron/electron #42982 ] [ electron ]
230
228
231
229
- ` api-history-migration-guide.md `
232
230
- Migration guide for new API history documentation system.
233
231
- [x] Easy to understand
234
232
- [x] Well written
235
233
- [x] Includes examples
236
- - [x] etc.
237
234
- [x] Implemented/Used in: [ electron/electron #42982 ] [ electron ]
238
235
239
236
## Conclusion
0 commit comments