Skip to content

Commit 487b3d0

Browse files
author
BF6 Portal Developer
committed
feat: v1.3.0 UI + collections + selection lists
1 parent 3343a15 commit 487b3d0

30 files changed

+23082
-511
lines changed

CHANGELOG.md

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,87 @@
22

33
This project follows a pragmatic changelog style (human-written notes) rather than auto-generated commit dumps.
44

5-
## Unreleased (planned for v1.3.0)
5+
## Unreleased
6+
7+
> Target release: **v1.3.0** (first official release). We’re still finishing/polishing this version.
8+
9+
- **UI/UX:** eliminate the persistent toolbox/flyout vertical scrollbar artifact by hiding scrollbar chrome on Blockly’s inner scroll containers (not just the outer toolbox div).
10+
- **Window default:** app now opens maximized with a 1920×1080 (1080p) target size (clamped to the display work area) so the editor fills the screen by default.
11+
12+
## v1.3.0
13+
14+
### Features & Improvements (v1.3.0)
15+
16+
- **Header/layout cleanup:** brand/logo aligned left, toolbox search moved into the header, and the app version is shown top-right.
17+
- **Workspace controls in header:** zoom in/out/reset/fit + trash moved to the top-right header to keep the canvas clear.
18+
- **UI clutter removed:** removed the unused Live Diagnostics overlay and the floating Code Preview button (Code Preview is now a normal header button).
19+
- **Collections UX:** COLLECTIONS toolbox category now dynamically lists existing collections and includes a “Convert selection to collection” action.
20+
- **Collections visuals:** collection call/definition blocks are taller (easier to spot in large workspaces).
21+
- **Variables toolbox:** restored a working VARIABLES category (manage/create button + existing variables listed as pre-filled GET/SET blocks).
22+
- **Selection Lists:** regenerated `selection-lists.md` so `widget 1` uses the base enum name (no `Item` suffix).
23+
- **Selection Lists dropdowns:** runtime lookups are now case-insensitive and support alias mapping for mismatched enum names.
24+
25+
### Fixes (v1.3.0)
626

7-
### Fixes
827
- **Selection Lists dropdowns:** address cases where dropdowns get stuck on “(loading selection lists…)” by improving runtime asset loading for Electron `file://` contexts.
928
- **Presets:** allow saving after loading and editing a built-in preset (save-as copy / overwrite flow).
1029

11-
### Credits
30+
- **Presets (Electron file://):** built-in preset loading now falls back to reading JSON from disk when `fetch()` is unavailable/restricted in packaged builds.
31+
32+
- **Electron compatibility:** removed remaining native `prompt()` usage by routing prompts through Blockly dialogs (Electron does not support `window.prompt`).
33+
- **Presets/imports:** ensure critical Portal structural types (like `modBlock` with a `RULES` statement) are defined before loading templates.
34+
- **Version label:** app version now resolves in both dev and packaged `app.asar` layouts.
35+
36+
### Credits (v1.3.0)
37+
1238
- Add explicit credit for the **Portal Docs** dataset used to populate block help/tooltips:
13-
- https://github.com/battlefield-portal-community/portal-docs
39+
- [battlefield-portal-community/portal-docs](https://github.com/battlefield-portal-community/portal-docs)
40+
41+
### CI/CD (v1.3.0)
1442

15-
### CI/CD
1643
- GitHub Actions: release automation on tag push (creates GitHub Release and uploads Windows artifacts).
1744

18-
### Notes / Investigations log
45+
### Notes / Investigations log (v1.3.0)
46+
1947
These are the key issues encountered recently and how they were fixed:
48+
2049
- **“Container menuBarContainer not found”**: fixed by guarding MenuBar initialization when optional container isn’t present.
2150
- **Preset templates failing to load (`MissingConnection` / `modBlock` RULES)**: fixed by ensuring `modBlock` always provides a `RULES` statement input before loading presets.
2251
- **Packaged app missing `selection-lists.md`**: Electron build excludes `*.md`, so runtime now ships/loads `selection-lists.txt` instead.
2352
- **Code Preview stopped showing TypeScript**: caused by loading two Blockly instances (global script + webpack import) and serializing a workspace created by the “other” instance. Fixed by making the webpack Blockly instance the global `window.Blockly` and explicitly initializing the preview after workspace creation.
2453

2554
## v1.2.9
2655

27-
### Features & Improvements
56+
### Features & Improvements (v1.2.9)
57+
2858
- **Collections / Bookmarks (MVP):** convert a stack into an offscreen collection definition and leave a compact call/bookmark block in place.
29-
- Right-click: **Convert to collection (bookmark + move stack)**
30-
- Right-click: **Jump to collection definition** (teleport)
59+
- Right-click: **Convert to collection (bookmark + move stack)**
60+
- Right-click: **Jump to collection definition** (teleport)
3161
- **Canvas navigation (right-click teleport):** fast jumping around large workspaces.
32-
- MOD: jump to the MOD container
33-
- Rules: jump to owning Rule / first Rule
34-
- Variables: jump between first getter/setter
35-
- Generic: jump to stack root
36-
- Subroutines: jump Call ↔ Definition
62+
- MOD: jump to the MOD container
63+
- Rules: jump to owning Rule / first Rule
64+
- Variables: jump between first getter/setter
65+
- Generic: jump to stack root
66+
- Subroutines: jump Call ↔ Definition
67+
68+
### Fixes (v1.2.9)
3769

38-
### Fixes
3970
- **Portal JSON compatibility:** export wrapped Portal-style JSON (`{"mod":{"blocks":...}}`) and accept both wrapped + raw Blockly workspace JSON on import.
4071
- **Help system:** stable search input (no scrambled text while typing) and right-click help opens the same local docs as the main Help UI.
4172

4273
## v1.2.8
4374

44-
### Features & Improvements
75+
### Features & Improvements (v1.2.8)
76+
4577
- Presets dropdown restored with **3 locked built-ins** (Andy6170 templates) + user save/delete.
4678
- Placeholder block auto-registration so community templates still render even if some block types are missing.
4779
- Selection list blocks use dynamic dropdowns (values sourced from `selection-lists` data).
4880

49-
### Fixes
81+
### Fixes (v1.2.8)
82+
5083
- Guarded UI init to avoid runtime errors when optional containers aren’t present.
5184
- Improved preset loading resilience and viewport focus (avoid “loaded offscreen / looks empty”).
5285

53-
### Known Issues
86+
### Known Issues (v1.2.8)
87+
5488
- A persistent vertical scrollbar may still appear next to the toolbox flyout in certain states.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# BF6Portal Tool
22

3-
![Version](https://img.shields.io/badge/version-1.2.8-blue.svg)
3+
![Version](https://img.shields.io/badge/version-1.3.0-blue.svg)
44
![License](https://img.shields.io/badge/license-ISC-green.svg)
55

6-
Release notes: see `docs/RELEASE_NOTES_1.2.8.md`.
6+
Release notes: see `docs/RELEASE_NOTES_1.3.0.md`.
77
Changelog: see `CHANGELOG.md`.
88

99
**BF6Portal Tool** is a standalone visual logic editor for **Battlefield 6 Portal**, built with **Electron** + **Google Blockly**. It aims to replicate the Portal Rules Editor workflow in a desktop app, with offline editing and quality-of-life tooling.
1010

1111
## Screenshot
1212

13-
<img src="docs/screenshots/editor.png" alt="BF6Portal Tool editor screenshot" width="1100" />
13+
![BF6Portal Tool editor screenshot](docs/screenshots/editor.png)
1414

1515
> Note: The repo currently includes a tiny placeholder image. Replace `docs/screenshots/editor.png` with a real screenshot any time.
1616
@@ -20,7 +20,7 @@ Changelog: see `CHANGELOG.md`.
2020
- **Import compatibility:** loads Blockly JSON exports, including common community/template wrappers like `{ "mod": { ... } }`.
2121
- **Resilient template loading:** missing block `type`s are auto-registered as **placeholder blocks** so templates can still render.
2222
- **Presets:** 3 locked built-ins (Andy6170 templates) + user save/delete via `localStorage`.
23-
- **Help modal + right-click help:** offline docs from `bf6portal_blocks.json` and per-block “Help: <type>”.
23+
- **Help modal + right-click help:** offline docs from `bf6portal_blocks.json` and per-block “Help: `<type>`”.
2424
- **Code Preview drawer:** resizable bottom drawer showing a TypeScript export of the current workspace state.
2525

2626
## Installation & setup
@@ -39,7 +39,7 @@ git clone https://gitlab.com/Neuro1977/bf6-portal-tool.git
3939
cd BF6Portal-Tool
4040
```
4141

42-
2) Install dependencies:
42+
1) Install dependencies:
4343

4444
```bash
4545
npm install
@@ -48,7 +48,7 @@ npm install
4848
cd ..
4949
```
5050

51-
3) Run the app:
51+
1) Run the app:
5252

5353
```bash
5454
npm start
@@ -83,7 +83,7 @@ Utilities live in `tools/` (used to generate/inspect blocks/toolboxes from Porta
8383
## Credits
8484

8585
- Block help/tooltips and Portal data are derived from **Portal Docs** by the Battlefield Portal Community:
86-
- https://github.com/battlefield-portal-community/portal-docs
86+
- [battlefield-portal-community/portal-docs](https://github.com/battlefield-portal-community/portal-docs)
8787

8888
## License
8989

TODO.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# TODO
22

3-
- [ ] **UI/UX:** Fix persistent vertical scrollbar appearing next to the toolbox flyout after interacting with menus.
3+
- [x] **Docs:** keep `CHANGELOG.md` and `docs/RELEASE_NOTES_*.md` aligned with the current shipped app version.
4+
- [x] **Docs:** update `README.md` version badge + release notes link.
5+
6+
- [x] **UI/UX:** Fix persistent vertical scrollbar appearing next to the toolbox flyout after interacting with menus.
47
- **Location:** Left side of the screen, adjacent to the Blockly toolbox category list.
5-
- **Current State:** CSS attempts to hide scrollbars on `.blocklyToolboxDiv`, `.blocklyToolbox`, and `.blocklyFlyout` have reduced but not fully eliminated the artifact in some states.
6-
- **Potential Cause:** Electron/Chromium native scrollbar rendering on a dynamic container created by Blockly or the custom search bar injection.
8+
- **Fix:** Hide scrollbar chrome on the actual inner scroll containers Blockly uses in this build (e.g. `.blocklyToolboxContents`, `.blocklyToolboxContentsWrapper`, `.blocklyTreeRoot`) plus a defensive `::-webkit-scrollbar` rule for nested elements.
9+
- **Notes:** This keeps scrolling functional but removes the persistent native scrollbar artifact under Electron/Chromium.
710

8-
## Upcoming (target: v1.3.0)
11+
## Completed (v1.3.0)
912

1013
- [x] **Toolbox search:** restore the search box above the toolbox (above **RULES**) and keep it working in packaged Electron builds.
1114

@@ -19,7 +22,16 @@
1922

2023
- [x] **Portal JSON compatibility:** exported/imported workspace JSON matches Portal-style wrapper (`{"mod":{"blocks":...}}`), and importer accepts both wrapped and raw Blockly workspace formats.
2124

22-
- [ ] **TypeScript import:** add a TypeScript → Blocks import flow. For now, show an **Import TS (Coming soon)** button until we can guarantee correctness.
25+
- [x] **TypeScript import (placeholder):** show an **Import TS (Coming soon)** button until we can guarantee correctness of a full TypeScript → Blocks import flow.
26+
27+
- [x] **Navigation / Teleport (right-click):** jump helpers to quickly move around the canvas.
28+
- [x] Subroutines: Call ↔ Definition
29+
- [x] MOD: jump to MOD container
30+
- [x] Rules: jump to owning Rule / first Rule
31+
- [x] Variables: jump between first getter/setter
32+
- [x] Generic: jump to stack root
33+
34+
## Next (post v1.3.0)
2335

2436
- [ ] **Collections / Snippets (macro library):** let users save a selection of blocks as a reusable “collection” and insert/execute it later.
2537
- UX idea: right-click selection / block → **Save as Collection…**, then a toolbox menu **Collections**.
@@ -28,17 +40,11 @@
2840
- [x] MVP (bookmark-style): new **COLLECT** call block + offscreen **COLLECTION** definition block.
2941
- [x] Right-click: **Convert to collection (bookmark + move stack)** and **Jump to collection definition**.
3042
- [x] Codegen: call block inlines the definition stack (recursion guarded).
31-
- [ ] Next: make the call block use a dropdown of existing collections (avoid typos).
32-
- [ ] Next: optional “Export for Portal” flow that expands collections and strips tool-only blocks.
33-
34-
- [x] **Navigation / Teleport (right-click):** jump helpers to quickly move around the canvas.
35-
- [x] Subroutines: Call ↔ Definition
36-
- [x] MOD: jump to MOD container
37-
- [x] Rules: jump to owning Rule / first Rule
38-
- [x] Variables: jump between first getter/setter
39-
- [x] Generic: jump to stack root
43+
- [x] Next: toolbox **COLLECTIONS** flyout dynamically lists existing collections.
44+
- [x] Next: make the call block itself use a dropdown of existing collections (avoid typos), while still allowing manual entry when importing older workspaces.
45+
- [x] Next: optional “Export for Portal” flow that expands collections and strips tool-only blocks.
4046

41-
- [ ] **External reference:** review `deluca-mike/bf6-portal-scripting-template` for ideas (TS bundling, debug UI patterns). **Do not reuse code** unless a license/permission is clarified; keep notes/attribution up to date.
47+
- [ ] **External reference:** review `deluca-mike/bf6-portal-scripting-template` for ideas (TS bundling, debug UI patterns). Permission has been confirmed; still respect any upstream license/restrictions and keep attribution up to date.
4248

4349
- [ ] **Project cleanup / stabilization (v1.3.0 goal):**
4450
- remove unnecessary comments, dead code paths, and stale file references

docs/RELEASE_NOTES_1.2.9.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Release Notes - v1.2.9
2+
3+
## Screenshot
4+
5+
<img src="screenshots/editor.png" alt="BF6Portal Tool editor screenshot" width="1100" />
6+
7+
## Highlights
8+
9+
- **Collections / Bookmarks (MVP):** convert a stack into an offscreen collection definition and leave a call/bookmark block in place.
10+
- **Right-click teleport / navigation:** faster movement around large workspaces (MOD, Rules, Subroutines, stack root, etc.).
11+
- **Portal JSON compatibility:** exports in Portal wrapper format (`{ "mod": { "blocks": ... } }`) and imports accept multiple common shapes.
12+
13+
## Features & Improvements
14+
15+
- **Collections toolbox improved:** the **COLLECTIONS** category now dynamically lists existing collections and includes a **Convert selection to collection** action.
16+
- **Collections visuals:** collection call/definition blocks are taller (easier to spot; less “lost in the soup”).
17+
- **Header/UI polish:**
18+
- brand/logo aligned on the left
19+
- toolbox search moved into the header
20+
- version label shown top-right
21+
- Code Preview opened via a normal header button
22+
- **Variables toolbox restored:** VARIABLES category provides a **New / Manage Variables** button and lists existing variables as pre-filled GET/SET blocks.
23+
24+
## Fixes
25+
26+
- **Selection Lists dataset:** regenerated `selection-lists.md` so `widget 1` uses the base enum name (no `Item` suffix).
27+
- **Selection Lists dropdown robustness:** case-insensitive lookups + alias mapping for enum naming mismatches.
28+
- **UI clutter:** removed the unused Live Diagnostics overlay and floating Code Preview toggle.
29+
30+
## Credits
31+
32+
- Portal data and block help/tooltips are derived from **Portal Docs** by the Battlefield Portal Community:
33+
- https://github.com/battlefield-portal-community/portal-docs
34+
35+
## Known Issues
36+
37+
- A persistent vertical scrollbar may still appear next to the toolbox flyout in certain states. This is tracked for a future fix.

docs/RELEASE_NOTES_1.3.0.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Release Notes - v1.3.0
2+
3+
## Highlights
4+
5+
- **Collections / Bookmarks (quality-of-life):** COLLECTIONS is now a dynamic toolbox category with a one-click “Convert selection to collection” action and improved visuals.
6+
- **Navigation (“teleport”):** right-click jump helpers expanded (MOD / rules / stack root / variables / subroutine call ⇄ definition).
7+
- **Cleaner workspace controls:** zoom in/out/reset/fit + trash moved to the top-right header (no on-canvas zoom/trash UI).
8+
- **Preset workflow stability:** built-in presets remain locked, but you can save copies and overwrite your own presets safely.
9+
- **Import resilience:** community/Portal JSON imports now auto-register placeholder blocks for missing types so templates still load instead of failing hard.
10+
11+
## Changes
12+
13+
### UI / UX
14+
15+
- Header/layout cleanup: brand/logo aligned left, toolbox search moved into the header, app version shown top-right.
16+
- Reduced UI clutter: Code Preview is a normal header button; removed unused diagnostics overlay.
17+
- Workspace controls moved to the header (top-right): zoom in/out/reset/fit + trash (Blockly’s on-canvas zoom/trash UI is disabled/hidden).
18+
- **Default window size / fullscreen feel:** the app now opens maximized with a 1920×1080 (1080p) target size (clamped to your display work area) so it fills the screen on standard 1080p desktops.
19+
- Fixed the persistent toolbox/flyout vertical scrollbar artifact by hiding native scrollbar chrome on Blockly’s inner scroll containers.
20+
21+
### Collections
22+
23+
- Collection call/definition blocks are taller and more visible.
24+
- Toolbox flyout lists existing collections and can create one from the current selection.
25+
- Context menus support convert, jump, and rename flows.
26+
27+
### Variables
28+
29+
- Restored a working VARIABLES category:
30+
- “New / Manage Variables” button.
31+
- Existing variables appear as pre-filled GET/SET templates.
32+
- **Electron compatibility:** replaced native `prompt()` flows with a Blockly dialog prompt modal (Electron doesn’t support `window.prompt`).
33+
34+
### Selection Lists
35+
36+
- Regenerated `selection-lists` enums so widget naming is normalized (no `Item` suffix where it shouldn’t be).
37+
- Runtime dropdown lookup is case-insensitive and supports alias mapping.
38+
- Packaged builds load `selection-lists.txt` (Electron builds exclude `*.md`).
39+
40+
### Import / Presets compatibility
41+
42+
- Portal/community wrapper formats supported (e.g. `{ "mod": { ... } }`).
43+
- Placeholder block auto-registration prevents missing block types from breaking loads.
44+
- Ensured critical Portal structural blocks (like `modBlock` with `RULES`) exist before loading templates.
45+
- Built-in presets load reliably in packaged Electron builds under `file://` by falling back to disk reads when `fetch()` is unavailable.
46+
47+
## Notes
48+
49+
- Windows icon assets are sourced from the project’s `web_ui/assets/img/` and built into the installer via electron-builder.

0 commit comments

Comments
 (0)