-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Currently every feature description has to appear in both the readme and its file:
- [](# "pr-jump-to-first-non-viewed-file") [Jumps to first non-viewed file in a pull request when clicking on the progress bar.](https://user-images.githubusercontent.com/16872793/85226580-3bf3d500-b3a6-11ea-8494-3d9b6280d033.gif)void features.add({
id: __filebasename,
description: 'Jumps to first non-viewed file in a pull request when clicking on the progress bar.',
screenshot: 'https://user-images.githubusercontent.com/16872793/85226580-3bf3d500-b3a6-11ea-8494-3d9b6280d033.gif'
}, …);We could instead just parse it from the readme. To parse the data, I think we just need to change this function: Instead of loading each tsx file, we lookup the supplied id in readme.md and parse that
Advantages
- no need to maintain duplicate content
- the build will effectively enforce documentation, or else it will fail (in watch mode this should probably just log an error)
Challenges (easy)
- some features appear in the highlights table, so both need to be parsed
- some features have 2 links in the readme, so either we pick one or allow multiple links in the options
- we need to find another way to
disablefeatures. I think we can hardcode this list inwebpack.config.tsso it can be injected exactly like it is now
Resulting code
- [](# "pr-jump-to-first-non-viewed-file") [Jumps to first non-viewed file in a pull request when clicking on the progress bar.](https://user-images.githubusercontent.com/16872793/85226580-3bf3d500-b3a6-11ea-8494-3d9b6280d033.gif)void features.add(__filebasename, …);Reactions are currently unavailable