Post History
We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach. Flare versions from 2016 onward support...
Answer
#5: Post edited
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
- The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original-title*-diff.html. The script modifies the original file (*original-title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.
This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
- The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original-title*-diff.html. The script modifies the original file (*original-title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.
- The script also generates a list of links to pages with changes, each with links to the git commits that made them, and inserts it into the build. This gives us a place to record *new* topics, which have nothing to diff against.
- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. Our script doesn't report deleted files, though I don't see why it couldn't (it hasn't come up). But a 90% solution is still a big improvement for us, and people who want that last 10% and don't mind reading XML source can follow the links to the git diff directly.
#4: Post edited
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named original_title_diff.html. The script modifies the original file (original_title.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
- The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original-title*-diff.html. The script modifies the original file (*original-title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.
- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
#3: Post edited
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original_title*__diff.html. The script modifies the original file (*original_title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
- The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named original_title_diff.html. The script modifies the original file (original_title.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.
- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
#2: Post edited
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original_title*_diff.html. The script modifies the original file (*original_title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
- We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach.
- Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase.
- The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original_title*__diff.html. The script modifies the original file (*original_title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs.
- This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.
#1: Initial revision
We did not find an off-the-shelf solution to this and built our own. I'm not the author and can't release the code, but here is an overview of the approach. Flare versions from 2016 onward support adding pre- and post-build steps to a build target. We modified our "branch build" target to call our "get-diffs" Python script as a pre-build step. This script modifies the locally-checked-out XML source for our doc, which Flare then builds in the main build phase. The script uses the `git` package to identify files that have been added, deleted, or changed. For changed files that exist on master and on the branch, the script does its own diff and inserts formatting to show it into a new XML file. (We use the pink and green highlighting familiar to git users.) This is a file that shows the full diff and in the output is named *original_title*_diff.html. The script modifies the original file (*original_title*.xml, in this example) to insert a prominent link to the diff page. This allows reviewers to read the topic "as it is" while also being able to inspect a diff; we found this less invasive and more likely to produce useful review feedback than just giving people the doc with inline diffs. This approach is not bulletproof; changes to structure, like moving things around in the table of contents, do not show up, and diffs in snippets don't seem to work right. But a 90% solution is still a big improvement for us.