Skip to content

Commit 2c457e1

Browse files
author
Rob Tjalma
authored
Merge pull request #86 from com-pas/compare-compas-versions
Compare CoMPAS versions
2 parents e202b1e + f2d8e83 commit 2c457e1

File tree

9 files changed

+472
-65
lines changed

9 files changed

+472
-65
lines changed

__snapshots__/compas-versions-plugin.md

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -59,72 +59,88 @@
5959
#### `looks like the latest snapshot`
6060

6161
```html
62+
<h1>
63+
<nav>
64+
<abbr title="[compas.versions.addVersionButton]">
65+
<mwc-icon-button icon="playlist_add">
66+
</mwc-icon-button>
67+
</abbr>
68+
</nav>
69+
<nav>
70+
<abbr title="[compas.versions.deleteProjectButton]">
71+
<mwc-icon-button icon="delete_forever">
72+
</mwc-icon-button>
73+
</abbr>
74+
</nav>
75+
</h1>
6276
<div id="containerCompasVersions">
6377
<section tabindex="0">
6478
<h1>
6579
[compas.versions.title]
66-
<mwc-icon-button icon="note_add">
67-
</mwc-icon-button>
68-
<mwc-icon-button icon="delete_forever">
69-
</mwc-icon-button>
7080
</h1>
71-
<mwc-list>
72-
<mwc-list-item
81+
<mwc-list multi="">
82+
<mwc-check-list-item
7383
aria-disabled="false"
74-
graphic="control"
84+
graphic="icon"
7585
mwc-list-item=""
7686
tabindex="0"
87+
value="1.0.0"
7788
>
7889
demo_station1 (1.0.0)
79-
<span
80-
slot="graphic"
81-
style="width: 90px"
82-
>
90+
<span slot="graphic">
8391
<mwc-icon>
8492
restore
8593
</mwc-icon>
8694
<mwc-icon>
8795
delete
8896
</mwc-icon>
8997
</span>
90-
</mwc-list-item>
91-
<mwc-list-item
98+
</mwc-check-list-item>
99+
<mwc-check-list-item
92100
aria-disabled="false"
93-
graphic="control"
101+
graphic="icon"
94102
mwc-list-item=""
95103
tabindex="-1"
104+
value="2.0.0"
96105
>
97106
demo_station1 (2.0.0)
98-
<span
99-
slot="graphic"
100-
style="width: 90px"
101-
>
107+
<span slot="graphic">
102108
<mwc-icon>
103109
restore
104110
</mwc-icon>
105111
<mwc-icon>
106112
delete
107113
</mwc-icon>
108114
</span>
109-
</mwc-list-item>
110-
<mwc-list-item
115+
</mwc-check-list-item>
116+
<mwc-check-list-item
111117
aria-disabled="false"
112-
graphic="control"
118+
graphic="icon"
113119
mwc-list-item=""
114120
tabindex="-1"
121+
value="2.1.0"
115122
>
116123
3b572a56-51cc-479b-97fd-e404ebf9ae67 (2.1.0)
117-
<span
118-
slot="graphic"
119-
style="width: 90px"
120-
>
124+
<span slot="graphic">
121125
<mwc-icon>
122126
restore
123127
</mwc-icon>
124128
</span>
125-
</mwc-list-item>
129+
</mwc-check-list-item>
126130
</mwc-list>
127131
</section>
132+
<mwc-fab
133+
extended=""
134+
icon="compare"
135+
label="[compas.versions.compareCurrentButton]"
136+
>
137+
</mwc-fab>
138+
<mwc-fab
139+
extended=""
140+
icon="compare"
141+
label="[compas.versions.compareButton]"
142+
>
143+
</mwc-fab>
128144
</div>
129145
<wizard-dialog>
130146
</wizard-dialog>

public/md/CoMPAS-Versions-Editor.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
In the CoMPAS Editor the different versions of an SCL XML File are shown that are stored in CoMPAS.
2+
Different actions can be done in this screen.
23

34
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M13 3c-4.97 0-9 4.03-9 9H1l4 3.99L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z"/></svg>:
45
Restore a specific version from CoMPAS. <br/>
@@ -8,10 +9,16 @@ In the CoMPAS Editor the different versions of an SCL XML File are shown that ar
89
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/></svg>:
910
Remove a specific version from CoMPAS.<br/>
1011
By pressing the icon and confirming the action that specific version will be removed from CoMPAS.
11-
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M13 11h-2v3H8v2h3v3h2v-3h3v-2h-3zm1-9H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>:
12+
- <svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><path d="M14,10H3v2h11V10z M14,6H3v2h11V6z M18,14v-4h-2v4h-4v2h4v4h2v-4h4v-2H18z M3,16h7v-2H3V16z"/></g></svg>:
1213
Add version from filesystem.<br/>
1314
By pressing the icon you can select an XML SCL File from your local system to become the latest version for current SCL XML File loaded from CoMPAS.<br/>
1415
Remark: The full XML will be replaced, including the history and CoMPAS Extensions, like filename.
1516
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14.12 10.47L12 12.59l-2.13-2.12-1.41 1.41L10.59 14l-2.12 2.12 1.41 1.41L12 15.41l2.12 2.12 1.41-1.41L13.41 14l2.12-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4zM6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9z"/></svg>:
1617
Remove the SCL XML File completely from CoMPAS, all versions.<br/>
1718
By pressing the icon and confirming the action all versions will be removed from CoMPAS.
19+
20+
Beside these icons to execute actions, it's also possible to compare versions with each other.
21+
Select two versions by checking the checkbox and press the button "Compare versions" to see the differences between these two versions.
22+
23+
The current version opened (and changed) can also be compared to a specific version.
24+
Select one version by checking the checkbox and press the button "Compare versions (current)" to see the differences between current version and the selected version.

0 commit comments

Comments
 (0)