-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "List of Requirements" to sidebar #79
Conversation
I do not understand. Neither the preview nor the diff view indicates any (visible) changes... |
@iherman This is good. I intended for my modifications to not hit the "saved" version published by ReSpec. I'll update my opening post to clarify about what I'm showing here. Edit: Added clarifications. Hopefully this starts to make some sense now :) |
Thanks @jccr, it does. I think this is something very useful in general. I wonder whether it is possible to have the necessary tools separated in a, say, repository so that it could be picked up by other groups and documents, too. |
Very much like what it does, but I wonder if it might be helpful to use a parameter in the URL to enable it? (Or to turn it off.) Having it always on in the editor's draft means browsers will search that text first (and then again through the body), it will collapse into the body when the sidebar is closed, etc. |
Looked into this. It looks like I could package it up as a respec plugin. Will give it a shot.
I agree. That button I have, it used to be more complicated. The list wouldn't exist until you clicked it first.
Just noticed this. I see how it could be a problem if it's collapsed into the body text. |
That actually sounds like an ideal solution. |
Ideally, in the end, this is added as a core feature of ReSpec. ;) Stepping back from that though, I looked into the plugin situation. What I want my solution to be is an external plugin, one that we include and declare outside of the profile, and can opt-in through the ReSpec config object. Here are my options:
|
My favorite would be your option (2) while this document could play guinea pig:-) |
9b222ff
to
6c0c0a1
Compare
This adds a "List of Requirements" as an additional navigation section, after the table of contents. This list is populated by scraping the specification document's HTML markup. Each list item is an occurrence of a "MUST" or "SHOULD" RFC 2119 keyword, along with some context. List item headers link back to the respective section containing the keyword. The item elements themselves are clickable, and scroll to the reference location in the document. A "shortcut" button appears next to the ReSpec UI button, to allow for jumping to the list. This also has a secondary purpose, as it signals the existence of this feature.
6c0c0a1
to
db658b4
Compare
@iherman @mattgarrish Ivan, I went with option 2. Matt, the button now does what we talked about. The list doesn't exist until you interact with it. |
I am fine merging this; @mattgarrish ? |
Description/Context
This adds a "List of Requirements" as an additional navigation section, after the table of contents.
I'm intending for this to be a (hopefully) useful tool for reviewing the editor's draft as a part of the ReSpec workflow. I developed this in response to our TPAC F2F, when we talked about extracting the MUSTs/SHOULDs into a spreadsheet, for the creation of test cases.
Details
The added nav list is populated by scraping the specification document's HTML markup.
Each list item is an occurrence of a "MUST" or "SHOULD" RFC 2119 keyword, along with some context.
List item headers link back to the respective section containing the keyword.
The item elements themselves are clickable, and scroll to the reference location in the document.
A "shortcut" button appears next to the ReSpec UI button, to allow for jumping to the list.
This also has a secondary purpose, as it signals the existence of this feature.
I marked the created elements that are added to the nav with the
removeOnSave
class.This class makes ReSpec remove the marked elements for when it gets saved.
Meaning that this list and its content won't show up in the resulting specification document.
The list only shows during the time the document is viewed with ReSpec, and before it's saved.
Demo
Here's a demo on how this PR looks like when it's running live, with ReSpec in runtime:
https://jccr.github.io/pub-manifest/
Try it out with the "ReqList" button, the one next to the "ReSpec" button on the top right.
Result
If this merges into master, I anticipate that it will be available for everyone to use, when browsing through this repo's GitHub pages site.
I'm referring to the version of the draft that's linked in the readme:
Preview | Diff