graphwise-reactodia 0.0.1-TR3 → 0.0.1-TR4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,2 +1,84 @@
1
1
  # graphwise-reactodia
2
- Graphwise wrapper around Reactodia graph explorer
2
+
3
+ Graphwise wrapper (Stencil component) around the [Reactodia](https://github.com/reactodia/reactodia-workspace) graph explorer.
4
+
5
+ Reactodia is vendored as a **git submodule** (`reactodia-workspace/`, pointing at our [fork](https://github.com/Ontotext-AD/reactodia-workspace-fork)).
6
+ It's built first, then consumed by Stencil as a normal ES module via a `file:` dependency.
7
+
8
+ ## Setup
9
+
10
+ After cloning the repo for the first time you will need to update git submodules, which will fetch the Reactodia fork:
11
+ ```bash
12
+ cd graphwise-reactodia
13
+ git submodule update --init --recursive
14
+ ```
15
+
16
+ Install dependencies, which will symlink the Reactodia fork into `node_modules`:
17
+ ```bash
18
+ npm install
19
+ ```
20
+
21
+ ## Develop
22
+ For development run:
23
+ ```bash
24
+ npm start
25
+ ```
26
+
27
+ ## Build
28
+ Build the fork and the Stencil component:
29
+ ```bash
30
+ npm run build
31
+ ```
32
+
33
+ `npm start` and `npm run build` both run `reactodia:build` first, which installs and builds the fork
34
+ (`reactodia:install` + `reactodia:compile`), then runs `reactodia:dedupe-react` to remove the fork's own
35
+ `react`/`react-dom` copies so the bundle ends up with a single React instance.
36
+
37
+ ## Editing the fork
38
+
39
+ Reactodia lives in the `reactodia-workspace/` submodule, which is its own git repo (remote:
40
+ [reactodia-workspace-fork](https://github.com/Ontotext-AD/reactodia-workspace-fork)). The parent repo does not
41
+ store the fork's files — it stores a single pointer to a commit in the fork. So a fork change involves two repos
42
+ and two commits: one in the fork (the source change) and one here (the pointer bump).
43
+
44
+ Simple setup in IntelliJ so you don't switch between projects: map the submodule as a second VCS root
45
+ (Settings → Version Control → Directory Mappings → add `reactodia-workspace`) so both repos appear
46
+ in the branch widget and Commit panel.
47
+
48
+ ### Testing fork changes locally
49
+
50
+ `npm start` and `npm run build` both run `reactodia:build`, which recompiles the fork from its current
51
+ files, so edits are picked up immediately.
52
+
53
+ ### Persisting a fork change
54
+ 1. In the fork (reactodia-workspace/): create a new branch,
55
+ 2. Make edit, commit and push changes
56
+ 3. Open a PR against the fork's `master` (reactodia-workspace-fork).
57
+ 4. Merge the PR.
58
+ 5. In the parent (graphwise-reactodia/):
59
+ 1. `git submodule update --remote` to fetch the fork's new commit and update the pointer,
60
+ 2. Make a branch, commit the pointer bump and push.
61
+
62
+ The parent commit's diff is just the pointer, never the fork's direct file changes.
63
+ Always bump the pointer to a commit that is merged and pushed on the fork's `master`, so
64
+ anyone running `git submodule update` can fetch it.
65
+
66
+ ## Test
67
+
68
+ Cypress runs against the dev server (`http://localhost:3333`), so start the app first in a separate terminal:
69
+
70
+ ```bash
71
+ npm start
72
+ ```
73
+
74
+ Then, in another terminal:
75
+ ```bash
76
+ npm run cy:open # for interactive browser tests
77
+ npm run cy:run # for headless tests
78
+ ```
79
+
80
+ OR run tests in a container
81
+
82
+ ```bash
83
+ docker compose up
84
+ ```