Skip to content

Commit

Permalink
Add documentation CI/CD (#1)
Browse files Browse the repository at this point in the history
* Add documentation CI/CD

* Self-review
  • Loading branch information
QubitPi committed Jun 11, 2024
1 parent efffa1e commit f373561
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,24 @@ BEFORE YOU SUBMIT make sure you've done the following:
More details on contributing can be found in CONTRIBUTING.md in the root of this repository. Thank you for your time and interest in the Neo4j Browser!
-->

Changelog
---------

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

Checklist
---------

* [ ] Test
* [ ] Self-review
* [ ] Documentation
34 changes: 34 additions & 0 deletions .github/workflows/release-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2023 Jiaqi Liu
# Licensed under the terms of the GNU General Public License. Please see LICENSE file distributed with this work for terms.
---
name: Release

"on":
push:
branches:
- master

jobs:
release-documentation:
name: Deploy Documentation to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/site
user_name: QubitPi
user_email: jack20191124@proton.me
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ export class Visualization {
nodeGroups.call(renderer.onGraphChange, this)
)

// register event handler - clicking a node expands menus
nodeMenuRenderer.forEach(renderer =>
nodeGroups.call(renderer.onGraphChange, this)
)
Expand Down Expand Up @@ -234,11 +235,11 @@ export class Visualization {
)

this.forceSimulation.updateRelationships(this.graph)
// The onGraphChange handler does only repaint relationship color
// The onGraphChange handler does only repaint relationship color
// not width and caption, since it requires taking into account surrounding data
// since the arrows have different bending depending on how the nodes are
// connected. We work around that by doing an additional full render to get the
// new stylings
// since the arrows have different bending depending on how the nodes are
// connected. We work around that by doing an additional full render to get the
// new stylings
this.render()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ const attachContextEvent = (
})
}

/**
* When a node is clicked, this function is triggered.
*
* There is a D3 data join in this function that only binds visual element when {@link !getSelectedNode} evaluates to
* true, i.e. only "mouse-clicked" node will have the menu rendering executed
*/
const createMenuItem = function (
selection: Selection<SVGGElement, NodeModel, BaseType, unknown>,
viz: Visualization,
Expand Down

0 comments on commit f373561

Please sign in to comment.