Skip to content

Commit

Permalink
1.4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
adammertel committed May 29, 2024
2 parents d5d5b9e + 379a67f commit 06b46ce
Show file tree
Hide file tree
Showing 27 changed files with 1,972 additions and 1,516 deletions.
43 changes: 43 additions & 0 deletions docs/release_1.4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## 1.4.0 Changelog [May 24, 2024]

### New Features:

- Integrated full text management of documents, including upload, export, and editing.
- Created the Annotator package for easier document management and work.
- Integrated new Python Flast server into the infrastructure
- Introduced new user administration features, including user registration, improved UX, user verification, and enhanced password management #1920 #1919 #1918 #1917.
- Implemented a new finely-tuned dark theme.
- Added new Territory protocols #1960 #2086 #2087.
- Implemented T-based validation with new warnings in the Editor and a new entity detail section #1924.
- Redesigned the search box #1891, and added search by Reference #1958.
- Added new validations: "Entity type should be filled in" #1939, "Part of speech is empty," and "Language is missing" #1952.
- Enabled reordering of references in Detail and Editor #1941.
- Allowed viewing and editing of root T entity (when having rights).

### Bug Fixes and Improvements:

- Resolved toast multiplication issue #1878.
- Fixed websocket connectivity problems #1877.
- Improved the entity type selectors #1894.
- Fixed mouseover text on the refresh button #1902.
- Updated relation models #1903 #2147 #2129 #1868.
- Included Statement itself in the validation #2099.
- Refactored Dropdown component #1913.
- Modified display of self for Synonyms #1943.
- Made the graph depiction of relations directed #1944.
- Fixed disappearance of Suggester upon removal of some Relation in Detail #1945.
- Added "copy value" button to References #1937.
- Added part of speech to entity tooltip #2011.
- Improved changing actant type to elvl3 when the language does not fit the user setting #2024.
- Enabled using Statement as an actant of another Statement #2021.
- Fixed issue where adding action/actant and then unlinking from actant row object made the data model invalid #2042.
- Improved the user customization modal #2073 #2037.
- Enhanced the statement list header #2084 #2082 #2090.
- Improved the general UI/UX #2027 #2040 #2031 #1950.

### Code Refactor:

- Performed a full upgrade of all development packages and improved the building/deploying process #1962 #1961 #1966 #1972.
- Significantly improved database management and import scripts.
- Overrode dropdown native components #1922.
- Added Jest for frontend testing.
64 changes: 50 additions & 14 deletions packages/annotator/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,38 @@
class="lines annotator-element"
width="50px"
height="400px"
style="outline: none"
style="
outline: none;
color: rgb(21, 47, 46);
background-color: yellowgreen;
"
></canvas>
<canvas
tabindex="0"
id="canvas"
class="annotator-element"
height="400px"
style="outline: none"
style="
height: 400px;
width: 100px;
outline: none;
background-color: white;
border: 1px solid black;
"
>
</canvas>
<div
class="scroller-viewport annotator-element"
id="scroller"
style="background: #ccc; position: relative; width: 10px"
style="background: limegreen; position: relative; width: 14px"
>
<div
class="scroller-cursor"
style="
cursor: move;
position: absolute;
width: 10px;
background-color: blue;
background-color: white;
margin-left: 2px;
"
></div>
</div>
Expand All @@ -68,6 +78,11 @@
<input type="text" id="anchorText" />
<button id="addAnchor">add</button>
</fieldset>
<fieldset>
<label>remove anchor from selection </label>
<input type="text" id="removeAnchorText" />
<button id="removeAnchor">remove</button>
</fieldset>
<fieldset>
<label>scroll to anchor </label>
<input type="text" id="scrollToAnchorText" />
Expand All @@ -81,6 +96,9 @@
<script src="bundle.js"></script>

<script type="module">
const ratio = 2;
const mainCanvasEl = document.getElementById("canvas");

const textContentElement = document.getElementById("text-content");

const exampleResponse = await fetch("example.txt");
Expand All @@ -89,7 +107,8 @@
let highlightEnabled = false;
const annotator = new Annotator(
document.getElementById("canvas"),
exampleTxt
exampleTxt,
ratio
);

annotator.fontColor = "black";
Expand All @@ -98,19 +117,25 @@
annotator.addScroller(document.getElementById("scroller"));
annotator.addLines(document.getElementById("lines"));

annotator.lines.fontColor = "red";
annotator.lines.bgColor = "transparent";

annotator.onHighlight((entityId) => {
if (!highlightEnabled) {
return null;
}
const colors = ["black", "brown", "pink", "green"];
const randColor = colors[Math.floor(Math.random() * colors.length)];
let color = "black";
if (entityId[0] === "a") {
color = "red";
} else if (entityId[0] === "b") {
color = "blue";
} else if (entityId[0] === "c") {
color = "green";
} else if (entityId[0] === "d") {
color = "yellow";
}

return {
mode: "background",
style: {
fillColor: randColor,
fillColor: color,
fillOpacity: 0.3,
},
};
Expand All @@ -132,15 +157,26 @@
annotator.addAnchor(document.getElementById("anchorText").value);
};

document.getElementById("removeAnchor").onclick = () => {
annotator.removeAnchorFromSelection(
document.getElementById("removeAnchorText").value
);
};

document.getElementById("scrollToAnchor").onclick = () => {
annotator.scrollToAnchor(document.getElementById("scrollToAnchorText").value, 1);
annotator.scrollToAnchor(
document.getElementById("scrollToAnchorText").value,
1
);
};

window.addEventListener("resize", resizeAnnotator);

function resizeAnnotator() {
const newW = document.body.clientWidth;
document.getElementById("canvas").width = newW - 50 - 40 - 10 - 6;
const canvasW = `${newW - 50 - 40 - 10 - 6}px`;

document.getElementById("canvas").style.width = canvasW;
}

resizeAnnotator();
Expand Down
Loading

0 comments on commit 06b46ce

Please sign in to comment.