Skip to content

Commit a94ac66

Browse files
author
BF6 Portal Developer
committed
UI focus + docs polish (1.3.0)
1 parent 2c42c16 commit a94ac66

23 files changed

+1843
-485
lines changed

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Thumbs.db
2626

2727
# Project Specific
2828
.env
29-
=Resources=/
29+
=Resources=/*
3030

3131
# Keep external source metadata in git (but not cached downloads)
3232
!=Resources=/external_sources/
@@ -36,9 +36,15 @@ Thumbs.db
3636
!=Resources=/Portal Blocks/
3737
!=Resources=/Portal Blocks/*.json
3838

39+
# Local scratch workspace (do not commit)
40+
=Resources=/Portal Blocks/custom_draft_workspace.json
41+
3942
# Vendored third-party plugins (explicit allowlist)
4043
!=Resources=/ThirdParty/
4144
!=Resources=/ThirdParty/**
4245

4346
# Local overrides (do not commit)
44-
web_ui/quotes.local.json
47+
web_ui/quotes.local.json
48+
49+
# Local vendor tools (do not commit)
50+
tools/sysinternals/

=Resources=/Portal Blocks/custom_breakthrough_V1.1.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

=Resources=/Portal Blocks/custom_conquest_template_V8.0.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

=Resources=/Portal Blocks/custom_rush_V1.0.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ This project follows a pragmatic changelog style (human-written notes) rather th
44

55
## Unreleased
66

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.
7+
- (nothing yet)
118

129
## v1.3.0
1310

1411
### Features & Improvements (v1.3.0)
1512

1613
- **Header/layout cleanup:** brand/logo aligned left, toolbox search moved into the header, and the app version is shown top-right.
1714
- **Workspace controls in header:** zoom in/out/reset/fit + trash moved to the top-right header to keep the canvas clear.
15+
- **Default focus point on load:** after loading presets/files, the viewport lands at the **top of the MOD block** (start of the rules chain).
1816
- **UI clutter removed:** removed the unused Live Diagnostics overlay and the floating Code Preview button (Code Preview is now a normal header button).
1917
- **Collections UX:** COLLECTIONS toolbox category now dynamically lists existing collections and includes a “Convert selection to collection” action.
2018
- **Collections visuals:** collection call/definition blocks are taller (easier to spot in large workspaces).
@@ -27,6 +25,9 @@ This project follows a pragmatic changelog style (human-written notes) rather th
2725
- **Selection Lists dropdowns:** address cases where dropdowns get stuck on “(loading selection lists…)” by improving runtime asset loading for Electron `file://` contexts.
2826
- **Presets:** allow saving after loading and editing a built-in preset (save-as copy / overwrite flow).
2927

28+
- **Performance polish:** reduced redundant toolbox refresh work after programmatic loads.
29+
- **Console noise reduction:** reduced noisy informational logs during preset loads (opt-in debug via `localStorage.bf6_debug = "1"`).
30+
3031
- **Presets (Electron file://):** built-in preset loading now falls back to reading JSON from disk when `fetch()` is unavailable/restricted in packaged builds.
3132

3233
- **Electron compatibility:** removed remaining native `prompt()` usage by routing prompts through Blockly dialogs (Electron does not support `window.prompt`).

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,27 @@ Changelog: see `CHANGELOG.md`.
1010

1111
## Screenshot
1212

13-
![BF6Portal Tool editor screenshot](docs/screenshots/editor.png)
14-
15-
> Note: The repo currently includes a tiny placeholder image. Replace `docs/screenshots/editor.png` with a real screenshot any time.
16-
17-
## Features
18-
19-
- **Rules toolbox essentials:** a single **RULES** menu containing `MOD_BLOCK`, `RULE_HEADER`, and `CONDITION_BLOCK`.
20-
- **Import compatibility:** loads Blockly JSON exports, including common community/template wrappers like `{ "mod": { ... } }`.
21-
- **Resilient template loading:** missing block `type`s are auto-registered as **placeholder blocks** so templates can still render.
22-
- **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>`”.
24-
- **Code Preview drawer:** resizable bottom drawer showing a TypeScript export of the current workspace state.
25-
- **TypeScript import:** **coming soon** (UI shows the button, but the feature is intentionally disabled until correctness can be guaranteed).
13+
![BF6Portal Tool UI overview](docs/screenshots/UI-overview.png)
14+
15+
## What the UI provides
16+
17+
- **Workspace editor (Blockly):** build rule logic visually.
18+
- **Toolbox search (header):** quickly filter blocks by name.
19+
- **Workspace controls (header):** zoom in/out, reset zoom, zoom-to-fit, and trash/delete selected block.
20+
- **Presets (header dropdown):**
21+
- 3 built-in presets (locked)
22+
- save your own presets, overwrite safely, delete user presets
23+
- **Import / Export:**
24+
- load `.json` (Blockly workspace JSON) and legacy `.xml`
25+
- export Portal JSON (best-effort compatibility wrapper)
26+
- TypeScript snapshot export + TypeScript import (round-trip the workspace state)
27+
- **Variables:** a dedicated VARIABLES toolbox category with:
28+
- “New / Manage Variables”
29+
- pre-filled GET/SET templates for existing variables
30+
- **Collections / Bookmarks:** convert a selected stack into an offscreen definition and keep a compact call/bookmark block.
31+
- **Navigation (“teleport”):** right-click jump helpers (MOD / owning rule / stack root / variables / subroutine call ⇄ definition).
32+
- **Help:** Help modal + right-click per-block help using the local `bf6portal_blocks.json` docs.
33+
- **Code Preview drawer:** resizable bottom drawer that shows a TypeScript representation of the current workspace state.
2634

2735
## Installation & setup
2836

TODO.md

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,10 @@
1-
# TODO
1+
# TODO (user-facing)
22

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.
3+
This file is intended to be *your* current task list.
54

6-
- [x] **UI/UX:** Fix persistent vertical scrollbar appearing next to the toolbox flyout after interacting with menus.
7-
- **Location:** Left side of the screen, adjacent to the Blockly toolbox category list.
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.
5+
## Pending
106

11-
## Completed (v1.3.0)
12-
13-
- [x] **Toolbox search:** restore the search box above the toolbox (above **RULES**) and keep it working in packaged Electron builds.
14-
15-
- [x] **Custom variables imports:** ensure variables from Andy6170 presets (and other imported JSON) are visible in the **VARIABLES** toolbox category and variable dropdowns.
16-
17-
- [x] **Right-click Help:** right-clicking a block should open the local Help topic (not “no help info yet” when we have docs).
18-
19-
- [x] **Help search stability:** typing into Help search should not scramble text (e.g. `MOD` accidentally becoming `DOM` due to caret reset).
20-
21-
- [x] **Selection list colours:** selection-list dropdown blocks (e.g. **Vehicles**) should use a consistent colour (no random red outlier).
22-
23-
- [x] **Portal JSON compatibility:** exported/imported workspace JSON matches Portal-style wrapper (`{"mod":{"blocks":...}}`), and importer accepts both wrapped and raw Blockly workspace formats.
24-
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)
35-
36-
- [ ] **Collections / Snippets (macro library):** let users save a selection of blocks as a reusable “collection” and insert/execute it later.
37-
- UX idea: right-click selection / block → **Save as Collection…**, then a toolbox menu **Collections**.
38-
- Safety: prevent naming collisions with existing block types + reserved names.
39-
- Visual: distinct styling (e.g. bright green outline / unique shape) so collections stand out.
40-
- [x] MVP (bookmark-style): new **COLLECT** call block + offscreen **COLLECTION** definition block.
41-
- [x] Right-click: **Convert to collection (bookmark + move stack)** and **Jump to collection definition**.
42-
- [x] Codegen: call block inlines the definition stack (recursion guarded).
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.
46-
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.
48-
49-
- [ ] **Project cleanup / stabilization (v1.3.0 goal):**
50-
- remove unnecessary comments, dead code paths, and stale file references
51-
- consolidate duplicate logic (especially toolbox/presets/selection-lists)
52-
- ensure naming and folder layout is consistent
53-
- add or update documentation for the final structure
54-
55-
- [ ] **Toolbox parity + ordering:** user-provided lists will define the exact order and membership of blocks in each menu; implement parity checks so we can confirm “everything is present” and in the right spot.
56-
57-
- [ ] **Variables UX:** decide and implement whether “custom variables” should be listed (and where). Ensure variable creation + listing + toolbox generation are consistent across:
58-
- fresh workspaces
59-
- imported community templates
60-
- built-in presets
61-
62-
- [ ] **Selection Lists:** continue hardening edge cases where dropdowns can get stuck on “(loading selection lists…)” under Electron `file://`.
63-
64-
- [ ] **Presets:** richer preset UX (save-as copy / overwrite flow for built-ins, better naming + metadata).
65-
66-
- [ ] **Build outputs:** reduce `dist-*` folder sprawl and add a safe cleanup flow (Windows file locks on `app.asar` are common).
67-
68-
- [ ] **Testing:** keep the headless preset-load smoke test and consider running it in CI for regressions.
7+
- [ ] **Official Portal integration (main goal):** exported workspaces/presets must import correctly into the *official* BF Portal Rules Editor.
8+
- exported JSON should load and display the same workspace (not the default empty Mod + Rule)
9+
- presets exported from this tool should import identically to known-good official presets
10+
- verify file format/schema, encoding, and any required metadata

bf6portal_blocks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,7 @@
29982998
"colour": "#6E47A0",
29992999
"tooltip": "",
30003000
"message": "RULE Name: %1 Event %2 %3\nConditions: %4\nActions: %5",
3001-
"args_json": "[{\"type\": \"field_input\", \"name\": \"RULE_NAME\", \"text\": \"New Rule\"}, {\"type\": \"field_dropdown\", \"name\": \"EVENT_TYPE\", \"options\": [[\"Ongoing\", \"ONGOING\"], [\"OnAIMoveToFailed\", \"ON_AI_MOVE_TO_FAILED\"], [\"OnAIMoveToRunning\", \"ON_AI_AI_MOVE_TO_RUNNING\"]]}, {\"type\": \"field_dropdown\", \"name\": \"SCOPE_TYPE\", \"options\": [[\"Global\", \"GLOBAL\"], [\"AreaTrigger\", \"AREA_TRIGGER\"], [\"CapturePoint\", \"CAPTURE_POINT\"], [\"EmplacementSpawner\", \"EMPLACEMENT_SPAWNER\"]]}, {\"type\": \"input_value\", \"name\": \"CONDITIONS\", \"check\": \"Boolean\"}, {\"type\": \"input_statement\", \"name\": \"ACTIONS\", \"check\": [\"Action\", \"SubroutineReference\", \"ControlAction\"]}]",
3001+
"args_json": "[{\"type\": \"field_input\", \"name\": \"RULE_NAME\", \"text\": \"New Rule\"}, {\"type\": \"field_dropdown\", \"name\": \"EVENT_TYPE\", \"options\": [[\"Ongoing\", \"ONGOING\"], [\"OnAIMoveToFailed\", \"ON_AI_MOVE_TO_FAILED\"], [\"OnAIMoveToRunning\", \"ON_AI_MOVE_TO_RUNNING\"], [\"OnAIMoveToSucceeded\", \"ON_AI_MOVE_TO_SUCCEEDED\"], [\"OnAIParachuteRunning\", \"ON_AI_PARACHUTE_RUNNING\"], [\"OnAIParachuteSucceeded\", \"ON_AI_PARACHUTE_SUCCEEDED\"], [\"OnAIWaypointIdleFailed\", \"ON_AI_WAYPOINT_IDLE_FAILED\"], [\"OnAIWaypointIdleRunning\", \"ON_AI_WAYPOINT_IDLE_RUNNING\"], [\"OnAIWaypointIdleSucceeded\", \"ON_AI_WAYPOINT_IDLE_SUCCEEDED\"], [\"OnCapturePointCaptured\", \"ON_CAPTURE_POINT_CAPTURED\"], [\"OnCapturePointCapturing\", \"ON_CAPTURE_POINT_CAPTURING\"], [\"OnCapturePointLost\", \"ON_CAPTURE_POINT_LOST\"], [\"OnGameModeEnding\", \"ON_GAME_MODE_ENDING\"], [\"OnGameModeStarted\", \"ON_GAME_MODE_STARTED\"], [\"OnMandown\", \"ON_MANDOWN\"], [\"OnMCOMArmed\", \"ON_MCOM_ARMED\"], [\"OnMCOMDefused\", \"ON_MCOM_DEFUSED\"], [\"OnMCOMDestroyed\", \"ON_MCOM_DESTROYED\"], [\"OnPlayerDamaged\", \"ON_PLAYER_DAMAGED\"], [\"OnPlayerDeployed\", \"ON_PLAYER_DEPLOYED\"], [\"OnPlayerDied\", \"ON_PLAYER_DIED\"], [\"OnPlayerEarnedKill\", \"ON_PLAYER_EARNED_KILL\"], [\"OnPlayerEarnedKillAssist\", \"ON_PLAYER_EARNED_KILL_ASSIST\"], [\"OnPlayerEnterAreaTrigger\", \"ON_PLAYER_ENTER_AREA_TRIGGER\"], [\"OnPlayerEnterCapturePoint\", \"ON_PLAYER_ENTER_CAPTURE_POINT\"], [\"OnPlayerEnterVehicle\", \"ON_PLAYER_ENTER_VEHICLE\"], [\"OnPlayerEnterVehicleSeat\", \"ON_PLAYER_ENTER_VEHICLE_SEAT\"], [\"OnPlayerExitAreaTrigger\", \"ON_PLAYER_EXIT_AREA_TRIGGER\"], [\"OnPlayerExitCapturePoint\", \"ON_PLAYER_EXIT_CAPTURE_POINT\"], [\"OnPlayerExitVehicle\", \"ON_PLAYER_EXIT_VEHICLE\"], [\"OnPlayerExitVehicleSeat\", \"ON_PLAYER_EXIT_VEHICLE_SEAT\"], [\"OnPlayerInteract\", \"ON_PLAYER_INTERACT\"], [\"OnPlayerJoinGame\", \"ON_PLAYER_JOIN_GAME\"], [\"OnPlayerLeaveGame\", \"ON_PLAYER_LEAVE_GAME\"], [\"OnPlayerSwitchTeam\", \"ON_PLAYER_SWITCH_TEAM\"], [\"OnPlayerUIButtonEvent\", \"ON_PLAYER_UI_BUTTON_EVENT\"], [\"OnPlayerUndeploy\", \"ON_PLAYER_UNDEPLOY\"], [\"OnRayCastHit\", \"ON_RAY_CAST_HIT\"], [\"OnRayCastMissed\", \"ON_RAY_CAST_MISSED\"], [\"OnRevived\", \"ON_REVIVED\"], [\"OnRingOfFireZoneSizeChange\", \"ON_RING_OF_FIRE_ZONE_SIZE_CHANGE\"], [\"OnSpawnerSpawned\", \"ON_SPAWNER_SPAWNED\"], [\"OnTimeLimitReached\", \"ON_TIME_LIMIT_REACHED\"], [\"OnVehicleDestroyed\", \"ON_VEHICLE_DESTROYED\"], [\"OnVehicleSpawned\", \"ON_VEHICLE_SPAWNED\"]]}, {\"type\": \"field_dropdown\", \"name\": \"SCOPE_TYPE\", \"options\": [[\"Global\", \"GLOBAL\"], [\"AreaTrigger\", \"AREA_TRIGGER\"], [\"CapturePoint\", \"CAPTURE_POINT\"], [\"EmplacementSpawner\", \"EMPLACEMENT_SPAWNER\"], [\"HQ\", \"HQ\"], [\"InteractPoint\", \"INTERACT_POINT\"], [\"LootSpawner\", \"LOOT_SPAWNER\"], [\"MCOM\", \"MCOM\"], [\"Player\", \"PLAYER\"], [\"RingOfFire\", \"RING_OF_FIRE\"], [\"ScreenEffect (deprecated)\", \"SCREEN_EFFECT\"], [\"Sector\", \"SECTOR\"], [\"SFX\", \"SFX\"], [\"SpatialObject\", \"SPATIAL_OBJECT\"], [\"Spawner\", \"SPAWNER\"], [\"SpawnPoint\", \"SPAWN_POINT\"], [\"Team\", \"TEAM\"], [\"Vehicle\", \"VEHICLE\"], [\"VehicleSpawner\", \"VEHICLE_SPAWNER\"], [\"VFX\", \"VFX\"], [\"VO\", \"VO\"], [\"WaypointPath\", \"WAYPOINT_PATH\"], [\"WorldIcon\", \"WORLD_ICON\"]]}, {\"type\": \"input_value\", \"name\": \"CONDITIONS\", \"check\": \"Boolean\"}, {\"type\": \"input_statement\", \"name\": \"ACTIONS\", \"check\": [\"Action\", \"SubroutineReference\", \"ControlAction\"]}]",
30023002
"output_type": null,
30033003
"connections": "Statement"
30043004
},

docs/RELEASE_NOTES_1.3.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Workspace controls moved to the header (top-right): zoom in/out/reset/fit + trash (Blockly’s on-canvas zoom/trash UI is disabled/hidden).
1818
- **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.
1919
- Fixed the persistent toolbox/flyout vertical scrollbar artifact by hiding native scrollbar chrome on Blockly’s inner scroll containers.
20+
- **Default focus point on load:** when you load a preset or import a workspace, the view now lands at the **top of the MOD block** (start of the rules chain) so you don’t have to scroll around to find the beginning.
2021

2122
### Collections
2223

@@ -43,6 +44,8 @@
4344
- Placeholder block auto-registration prevents missing block types from breaking loads.
4445
- Ensured critical Portal structural blocks (like `modBlock` with `RULES`) exist before loading templates.
4546
- Built-in presets load reliably in packaged Electron builds under `file://` by falling back to disk reads when `fetch()` is unavailable.
47+
- **Performance polish:** reduced redundant toolbox refresh work after programmatic loads.
48+
- **Console noise reduction:** noisy informational logs during preset loads are now gated behind an opt-in debug flag (`localStorage.bf6_debug = "1"`).
4649

4750
## Notes
4851

docs/screenshots/UI-overview.png

260 KB
Loading

0 commit comments

Comments
 (0)