Skip to content

Commit f546965

Browse files
tecoholicalvi-khan
andauthored
UI Refresh with updated dependencies (#126)
* feat: moves the help content from start page to a dialog * fix: removed duplicate bulma css file, set font to Nunito * chore: remove bulma package * refactor: cleaned up the UI a bit * fix: add names to the PR artifacts * docs: update README * refactor: improve the about dialog information * refactor: address review comments * feat: disable menu options on start page * Chore: Adjust colors. * chore: update the step-1 image * v2.0.0 * chore: update version in tauri config --------- Co-authored-by: Alvi Khan <[email protected]>
1 parent 1758bb1 commit f546965

File tree

19 files changed

+441
-386
lines changed

19 files changed

+441
-386
lines changed

.github/workflows/test-prs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
uses: actions/upload-artifact@v4
3838
if: matrix.platform == 'ubuntu-22.04'
3939
with:
40+
name: linux-packages.zip
4041
path: |
4142
${{ github.workspace }}/src-tauri/target/release/bundle/**/*.deb
4243
${{ github.workspace }}/src-tauri/target/release/bundle/**/*.rpm
@@ -46,6 +47,7 @@ jobs:
4647
uses: actions/upload-artifact@v4
4748
if: matrix.platform == 'windows-latest'
4849
with:
50+
name: windows-installers.zip
4951
path: |
5052
${{ github.workspace }}\src-tauri\target\release\bundle\**\*.exe
5153
${{ github.workspace }}\src-tauri\target\release\bundle\**\*.nsis

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
NER Annotator for SpaCy allows you to create training data for creating a custom NER Model with custom tags.
44

55
- Web Application: [https://tecoholic.github.io/ner-annotator/](https://tecoholic.github.io/ner-annotator/)
6-
- Linux: [Debian Package or an AppImage](https://github.com/tecoholic/ner-annotator/releases)
7-
- Windows: [x64 MSI Installer](https://github.com/tecoholic/ner-annotator/releases)
6+
- Linux: [Debian Packages & AppImage](https://github.com/tecoholic/ner-annotator/releases)
7+
- Windows: [Installers](https://github.com/tecoholic/ner-annotator/releases)
88

99
## Features
1010

@@ -37,33 +37,33 @@ The JSON file created by the tool is generic and simply lists the start and end
3737

3838
### Requirements
3939

40-
1. Node JS 14.x
40+
1. NodeJS v21.x
4141
2. Yarn Package Manager
42-
3. Rust (for building desktop versions)
42+
3. Rust toolchain (for building desktop versions)
4343

4444
### Running it locally for development
4545

4646
1. Open another terminal and start the server for the UI
4747

4848
```sh
49-
yarn
50-
yarn serve
49+
yarn install
50+
yarn dev
5151
```
5252

53-
Now go to [http://localhost:8081/ner-annotator/](http://localhost:8081/ner-annotator/)
53+
Now go to [http://localhost:5173](http://localhost:5173)
5454

5555
### Developing the desktop application
5656

57-
The desktop applications have been created using [Tauri](https://tauri.studio).
57+
The desktop applications have been created using [Tauri](https://v2.tauri.app/).
5858

5959
```sh
60-
yarn tauri:serve
60+
yarn tauri dev
6161
```
6262

6363
To build the final binaries run
6464

6565
```sh
66-
yarn tauri:build
66+
yarn tauri build
6767
```
6868

6969
## Credits

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ner-annotator",
3-
"version": "2.0.0-alpha",
3+
"version": "2.0.0",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -15,6 +15,7 @@
1515
"format": "prettier --write src/"
1616
},
1717
"dependencies": {
18+
"@fontsource-variable/nunito": "^5.1.0",
1819
"@fortawesome/fontawesome-svg-core": "^6.4.0",
1920
"@fortawesome/free-solid-svg-icons": "^6.4.0",
2021
"@fortawesome/vue-fontawesome": "^3.0.3",
@@ -46,7 +47,6 @@
4647
"@vitejs/plugin-vue-jsx": "^4.0.0",
4748
"@vue/eslint-config-prettier": "^9.0.0",
4849
"@vue/test-utils": "^2.4.6",
49-
"bulma": "^1.0.2",
5050
"eslint": "^9.9.1",
5151
"eslint-config-prettier": "^9.1.0",
5252
"eslint-plugin-playwright": "^1.6.2",

public/assets/step-1.png

29.4 KB
Loading

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"productName": "NER Annotator",
33
"mainBinaryName": "NER Annotator",
4-
"version": "2.0.0-alpha",
4+
"version": "2.0.0",
55
"identifier": "in.arunmozhi.ner-annotator",
66
"build": {
77
"beforeDevCommand": "yarn dev",

src/App.vue

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
<template>
22
<div
33
class="fullscreen"
4-
style="overflow-y:scroll;"
4+
style="overflow-y: scroll"
55
@dragover.prevent="onDragEnter"
66
@dragenter="onDragEnter"
77
@dragleave.self="onDragLeave"
88
@drop.stop.prevent="onDrop"
99
>
10-
<div :style="{'pointer-events': overlayActive ? 'none' : 'auto'}">
11-
<q-layout view="hHh lpR fFf">
12-
<menu-bar v-if="currentPage !== 'start'" />
10+
<div :style="{ 'pointer-events': overlayActive ? 'none' : 'auto' }">
11+
<q-layout view="hHh lpR lFf">
12+
<menu-bar />
1313

1414
<q-drawer
15-
:model-value="currentPage !== 'start'"
15+
behavior="desktop"
1616
bordered
17+
side="left"
18+
:model-value="currentPage === 'annotate'"
1719
:class="$q.dark.isActive ? 'bg-dark' : 'bg-grey-2'"
1820
>
1921
<annotation-sidebar />
@@ -27,7 +29,12 @@
2729
<annotation-page v-if="currentPage === 'annotate'" />
2830
</q-page-container>
2931
</q-layout>
30-
<drag-n-drop-overlay :style="{'visibility': overlayActive && pendingFileDrop == null ? 'visible' : 'hidden'}" />
32+
<drag-n-drop-overlay
33+
:style="{
34+
visibility:
35+
overlayActive && pendingFileDrop == null ? 'visible' : 'hidden',
36+
}"
37+
/>
3138
<exit-dialog
3239
:show="pendingFileDrop != null && currentPage != 'start'"
3340
@hide="pendingFileDrop = null"
@@ -55,7 +62,7 @@ export default {
5562
AnnotationPage,
5663
AnnotationSidebar,
5764
DragNDropOverlay,
58-
ExitDialog
65+
ExitDialog,
5966
},
6067
setup() {
6168
const $q = useQuasar();
@@ -79,19 +86,22 @@ export default {
7986
},
8087
data() {
8188
return {
82-
currentPage: "start",
8389
overlayActive: false,
8490
pendingFileDrop: null,
8591
};
8692
},
8793
computed: {
88-
...mapState(["annotations", "classes"]),
94+
...mapState(["annotations", "classes", "currentPage"]),
8995
},
9096
methods: {
91-
...mapMutations(["loadClasses", "loadAnnotations", "setInputSentences", "clearAllAnnotations", "resetIndex"]),
92-
switchToPage(page) {
93-
this.currentPage = page;
94-
},
97+
...mapMutations([
98+
"loadClasses",
99+
"loadAnnotations",
100+
"setInputSentences",
101+
"clearAllAnnotations",
102+
"resetIndex",
103+
"switchToPage",
104+
]),
95105
onDragEnter() {
96106
this.overlayActive = true;
97107
},
@@ -100,15 +110,15 @@ export default {
100110
},
101111
onDrop(event) {
102112
this.overlayActive = false;
103-
this.pendingFileDrop = event.dataTransfer.files[0]
104-
if (this.currentPage == "start") this.processFileDrop();
113+
this.pendingFileDrop = event.dataTransfer.files[0];
114+
if (this.currentPage == "start") this.processFileDrop();
105115
},
106116
processFileDrop() {
107117
let reader = new FileReader();
108118
reader.onload = (ev) => {
109119
let file = ev.target.result;
110120
try {
111-
if (this.currentPage == "start") throw new Error("Not a text file.");
121+
if (this.currentPage == "start") throw new Error("Not a text file.");
112122
this.loadAnnotations(JSON.parse(file));
113123
this.notify(
114124
"fa fa-check",
@@ -117,7 +127,8 @@ export default {
117127
);
118128
} catch (e) {
119129
try {
120-
if (this.currentPage == "start") throw new Error("Not a text file.");
130+
if (this.currentPage == "start")
131+
throw new Error("Not a text file.");
121132
this.loadClasses(JSON.parse(file));
122133
this.notify(
123134
"fa fa-check",
@@ -129,7 +140,7 @@ export default {
129140
this.setInputSentences(file);
130141
this.clearAllAnnotations();
131142
this.resetIndex();
132-
this.switchToPage('annotate');
143+
this.switchToPage("annotate");
133144
} catch (e) {
134145
this.notify("fas fa-exclamation-circle", "Invalid file", "red-6");
135146
}

src/assets/styles.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/components/AboutDialog.vue

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
<template>
2-
<q-dialog
3-
:model-value="show"
4-
@hide="$emit('hide')"
5-
>
2+
<q-dialog :model-value="show" @hide="$emit('hide')">
63
<q-card style="min-width: 400px; padding: 10px; border-radius: 10px">
74
<q-card-section>
8-
<div class="text-h6">
9-
NER Annotator
10-
</div>
5+
<div class="text-h6">NER Annotator</div>
116
</q-card-section>
127

138
<q-card-section class="q-pt-none">
@@ -19,19 +14,23 @@
1914
</a>
2015
</p>
2116
<p>
22-
<strong>Author:</strong>
23-
@tecoholic (<a href="https://github.com/tecoholic">Github</a>,
24-
<a href="https://github.com/tecoholic">Twitter</a>)
17+
<strong>Contributors: </strong>
18+
<a
19+
href="https://github.com/tecoholic/ner-annotator/graphs/contributors"
20+
>
21+
See on Github
22+
</a>
2523
</p>
24+
<ul>
25+
<li>Author: <a href="https://github.com/tecoholic">tecoholic</a></li>
26+
<li>
27+
Maintainer: <a href="https://github.com/alvi-khan">alvi-khan</a>
28+
</li>
29+
</ul>
2630
</q-card-section>
2731

2832
<q-card-actions align="right">
29-
<q-btn
30-
v-close-popup
31-
flat
32-
label="OK"
33-
color="primary"
34-
/>
33+
<q-btn v-close-popup flat label="OK" color="primary" />
3534
</q-card-actions>
3635
</q-card>
3736
</q-dialog>
@@ -47,7 +46,7 @@ export default {
4746
},
4847
},
4948
emits: ["hide"],
50-
data: function() {
49+
data: function () {
5150
return {
5251
// eslint-disable-next-line no-undef
5352
version: APPLICATION_VERSION,

0 commit comments

Comments
 (0)