-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1528 from strictdoc-project/_diff_changelog
export/html: Diff/Search: improve CSS layout, add nav tabs template
- Loading branch information
Showing
11 changed files
with
153 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<sdoc-form diff> | ||
<sdoc-form sticky diff> | ||
<form | ||
action="/diff" | ||
method="GET" | ||
|
4 changes: 2 additions & 2 deletions
4
strictdoc/export/html/templates/screens/git/frame_changelog_result.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<turbo-frame id="diff_result"> | ||
{% if results %} | ||
<div class="changelog preloaded"> | ||
<div class="diff_column"> | ||
|
||
{%- with tab="changelog" -%} | ||
{% include "screens/git/changelog_content.jinja" %} | ||
{%- endwith -%} | ||
</div> | ||
|
||
</div> | ||
{% endif %} | ||
</turbo-frame> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
<div> | ||
<h5>Legend</h5> | ||
<p>The Diff/Changelog feature only works when StrictDoc is run against a directory which is a Git repository.</p> | ||
<p>The left-hand-side (LHS) and the right-hand-side (RHS) revisions must be valid Git revisions.</p> | ||
<p>A valid revision can be a Git branch, a Git commit or a Git tag. Examples: `main`, `origin/main`, `63fd784`, `v1.0.0`. | ||
<p>The StrictDoc's custom revision `HEAD+` can be used to indicate "the current branch + all uncommitted changes".</p> | ||
<p>The Diff/Changelog query is shareable via a URL. Example: <a href="http://127.0.0.1:5111/diff?left_revision=HEAD%5E&right_revision=HEAD&tab=diff">This link</a> opens a diff between the last commit and the last but one commit.</p> | ||
<sdoc-main-placeholder | ||
class="page-tips" | ||
data-testid="changelog-main-placeholder" | ||
> | ||
<div> | ||
<p>The Diff/Changelog feature only works when StrictDoc is run against a directory which is a Git repository.</p> | ||
<p>The left-hand-side (LHS) and the right-hand-side (RHS) revisions must be valid Git revisions.</p> | ||
<p>A valid revision can be a Git branch, a Git commit or a Git tag. Examples: `main`, `origin/main`, `63fd784`, `v1.0.0`.</p> | ||
<p>The StrictDoc's custom revision `HEAD+` can be used to indicate "the current branch + all uncommitted changes".</p> | ||
<p>The Diff/Changelog query is shareable via a URL. Example: {# djlint:off H022 #}<a href="http://127.0.0.1:5111/diff?left_revision=HEAD%5E&right_revision=HEAD&tab=diff">This link</a>{# djlint:on #} opens a diff between the last commit and the last but one commit.</p> | ||
|
||
<p>The StrictDoc diff algorithm compares documentation trees (left-hand side, LHS, and right-hand side, RHS) based on these principles:</p> | ||
<p>The StrictDoc diff algorithm compares documentation trees (left-hand side, LHS, and right-hand side, RHS) based on these principles:</p> | ||
|
||
<ul> | ||
<li> | ||
Optimal comparison of document contents is achieved using automatically-generated Machine Identifiers (MID). This ensures the best match. | ||
</li> | ||
<li> | ||
If document nodes, such as Sections or Requirements, lack MIDs, they are matched using their UID field. Matching quality with UIDs is comparable to that with MIDs, provided all nodes have UIDs. | ||
</li> | ||
<li> | ||
In cases where document nodes do not have either MID or UID, matching generally isn't performed or is very limited to the most basic cases. Changes to nodes lacking MID/UID are recorded as separate events: "node removed" for LHS and "node added" for RHS. | ||
</li> | ||
</ul> | ||
</div> | ||
<ul> | ||
<li> | ||
Optimal comparison of document contents is achieved using automatically-generated Machine Identifiers (MID). This ensures the best match. | ||
</li> | ||
<li> | ||
If document nodes, such as Sections or Requirements, lack MIDs, they are matched using their UID field. Matching quality with UIDs is comparable to that with MIDs, provided all nodes have UIDs. | ||
</li> | ||
<li> | ||
In cases where document nodes do not have either MID or UID, matching generally isn't performed or is very limited to the most basic cases. Changes to nodes lacking MID/UID are recorded as separate events: "node removed" for LHS and "node added" for RHS. | ||
</li> | ||
</ul> | ||
</div> | ||
</sdoc-main-placeholder> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
strictdoc/export/html/templates/screens/git/nav_tabs.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<nav class="sdoc-tabs"> | ||
<div class="sdoc-tab-list"> | ||
<a class="sdoc-tab" | ||
{% if tab == "diff" %}active{% endif %} | ||
href="/diff?tab=diff&left_revision={{ left_revision_urlencoded }}&right_revision={{ right_revision_urlencoded }}" | ||
>Diff</a> | ||
<a class="sdoc-tab" | ||
{% if tab == "changelog" %}active{% endif %} | ||
href="/diff?tab=changelog&left_revision={{ left_revision_urlencoded }}&right_revision={{ right_revision_urlencoded }}" | ||
>Changelog</a> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters