Skip to content

Commit 956f0f2

Browse files
committed
2 parents c6c4e08 + 320d9e1 commit 956f0f2

File tree

296 files changed

+12771
-6414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+12771
-6414
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104

105105
- run: uv add ordered-set nuitka
106106

107-
- run: uv run -m nuitka --standalone --assume-yes-for-downloads --include-data-files=VERSION=VERSION --include-data-files=server_config.cfg=server_config.cfg --include-data-dir=static=static --include-data-dir=templates=templates --windows-icon-from-ico=static/favicon.ico ./planarally.py
107+
- run: uv run -m nuitka --standalone --assume-yes-for-downloads --include-data-files=VERSION=VERSION --include-data-dir=static=static --include-data-dir=templates=templates --windows-icon-from-ico=static/favicon.ico ./planarally.py
108108

109109
- run:
110110
name: Zip artifacts

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ server/static/temp/**
1616
venv/
1717
env/
1818
server/.python-version
19+
# This should be symlinked from the server folder if needed
20+
/pyrightconfig.json
1921

2022
# PyInstaller
2123
server/dist/**

CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,93 @@ tech changes will usually be stripped from release notes for the public
1010

1111
## Unreleased
1212

13+
## [2026.1]
14+
15+
### Added
16+
17+
- Custom shape data
18+
- A new tab in the Shape settings UI
19+
- Can be used to freely add custom data and create a rudimentary character sheet
20+
- Currently supported data types are text, number, toggle and dice expressions
21+
- Dice expressions can reference other data entries and open the dice tool with the evaluated expression
22+
- Dice tool has a quick access sidebar to selected shapes with dice expressions
23+
- Dice tool shows auto completion on expression references
24+
- Shape order inconsistency check
25+
- Runs when moving a shape to the back
26+
- Fixes the order of all shapes on the layer and requests a page refresh
27+
- Asset manager icon when a shape has template info
28+
- Notes:
29+
- Campaigns tab (see more general note changes below)
30+
- Create can be confirmed with the enter key
31+
- Tag add now shows a pre-populated list with known tags
32+
- Logging:
33+
- Enabling configuration of the logger via a new logging section
34+
- Allows for multiple logging file streams at different levels
35+
36+
### Changed
37+
38+
- Initiative
39+
- UI rework
40+
- Asset images appear in initiative list
41+
- Prevent large initiative list growing excessively tall
42+
- Allow resizing of initiative list view
43+
- Replace popup modal with less intrusive verification check
44+
- New UI to add effects to entries
45+
- Add group badges for shapes with badges enabled
46+
- [DM] Add button to clear initiative list
47+
- [DM] Add previous/next round buttons
48+
- Add effects with infinite timespan
49+
- Fix names in initiative list not being reactive
50+
- Templates
51+
- Are now stored as proper shapes in the DB
52+
- Will migrate along with other shapes on DB upgrades (old templates could become broken)
53+
- Can be linked with other systems (e.g. custom-data, notes, ...)
54+
- Notes
55+
- No longer hard-linked to 1 particular location
56+
- Can be linked to multiple locations or no location (global/local concept is removed)
57+
- List filters have been redesigned to be mure useful
58+
- Many preferences have been removed as a result
59+
- Pagination is now in the bottom left and clearly notes the amount of pages
60+
- Tags in the note edit panel now have a "search" and "remove" action instead of always removing on click
61+
- [tech] Searching/Filtering/Pagination is now done on the server
62+
- [tech] tags are now stored in their own tables instead of being a json array on notes
63+
- Campaign creator can no longer change their own role or kick themselves
64+
- [tech] refactor of intermediate shape handling on client side (see `transformations.ts`)
65+
- [tech] upgraded pydantic from 1.x to 2.x
66+
- Square grids now have distinct x and y size values
67+
- Keyboard movement now also snaps to the closest grid cell when snapping is relevant
68+
- Variants
69+
- Players may now add variants to shapes they have edit access to
70+
- Players may now swap between variants of shapes they have edit access to
71+
- [tech] Variants' access permissions are now based on the permissions of the parent shape only
72+
73+
### Fixed
74+
75+
- Images in the Token Direction indicator were overflowing
76+
- Prevent shortcut handling when targetting an html select element
77+
- Ampersand in campaign name preventing game load
78+
- Duplicating (copy/paste) or undoing a removal of shapes would lose some info (e.g. notes)
79+
- Undoing a shape removal related to a character did not work
80+
- Undoing a shape removal causing the related group to be removed (i.e. last shape of the group)
81+
- Cutting a rotated polygon would be wrong on refresh
82+
- Resizing a rotated polygon did not correctly recalculate center, causing sudden shifts on move
83+
- Note creation not going straight to edit mode in some cases
84+
- Account settings text overlapping on smaller viewport widths
85+
- Moving special hide/reveal shapes from the fow layer could lead to a niche bug
86+
- Rotation slider not showing current value in text input on component load
87+
- Shapes snapping to square grid sometimes offset from grid
88+
- Shapes attempting to snap to a grid square now collide with walls
89+
- DDraft files no longer being uploadable to the asset manager
90+
- Moving shapes with keyboard keys while ruler was enabled on select tool would move shapes twice as far
91+
- Hovering on an initiative entry that is part of a group but not marked as a group entry would highlight all group members
92+
- Error log about viewports on the server
93+
- Toggling initiative off vision lock interactions
94+
- Initiative cog wheel not opening initiative tab in the client settings
95+
- Initiative entries would remain blurred if the focused entry was removed by another player.
96+
- Group system not properly cleaning up on location changes
97+
- Group badges were not sorted numerically in a shape's group settings when set to the numbers character set.
98+
- Tracker input resets to last value if left empty
99+
13100
## [2025.3]
14101

15102
### Added
@@ -51,6 +138,7 @@ tech changes will usually be stripped from release notes for the public
51138
### Fixed
52139

53140
- Initiative effect rename losing focus after pressing 1 character
141+
- Initiative effect rename losing focus when moving mouse off initiative entry
54142
- Locked shapes not being selectable directly
55143
- DM only auras where no longer rendered due to a bug in the new access logic
56144

CONTRIBUTING.md

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,69 @@ PlanarAlly consists of a client and a server component. If you want to run a dev
88

99
This project uses the gitflow branching strategy. This means that the master branch is intended for releases only. All pull requests should be done on the development branch.
1010

11-
When making a pull request, make sure the code is formatted properly.
11+
### Format & Lint
1212

13-
For the server you can run `black .` in the server folder,
14-
for the client you can run `npm run lint` in the client folder.
13+
All code is required to be formatted and linted before it can be merged. To format and lint the server you need to run
14+
15+
```bash
16+
uv run ruff format src
17+
uv run ruff check src
18+
```
19+
To format and lint the client code you need to run
20+
21+
```bash
22+
npm run format
23+
npm run lint
24+
```
1525

1626
## Server
1727

1828
All code of the server is located in the `server` folder at the root level of the git repository.
1929
The server infrastructure runs on aiohttp, a python async webframework.
2030
Install python >=3.6 (a virtual environment is recommended) and install all the dependencies.
2131

22-
### Example install
32+
### Install & Setup
2333

24-
Lines 2 and 3 are optional. Replace `python` with `python3` if the default is not py3.
34+
This project uses uv to manage its dependencies and run the server so to begin you will need to install UV from its official site. UV will automatically create the virtual environment so you only need to run the application to get going. Optionally you can run `uv sync` in the server directory to install the dependencies.
2535

26-
```
27-
cd server
28-
python -m venv env
29-
source env/bin/activate
30-
pip install -r requirements.txt
36+
> This project uses Python 3 so ensure that python and UV are running with the correct version.
37+
38+
You can create a config.toml in the server/data directory to change settings. You can find the configuration values at the [PlanarAlly Site](https://www.planarally.io/server/management/configuration/)
39+
40+
You can change the host & port configuration in the config.toml to adjust for your application needs. For example
41+
42+
```toml
43+
[webserver.connection]
44+
type = "hostport"
45+
host = "0.0.0.0"
46+
port = 8000
3147
```
3248

33-
Change the server.cfg file to what you wish to use and you can start the webserver with a simple
49+
### Running the server
3450

35-
`python planarserver.py`
51+
You can run the server in either development or production mode. In development mode, requests are redirected to the Vite server, enabling real-time updates while building the client application. In production mode, the server instead serves the static assets generated from the client build.
3652

37-
The above command will start the server in production mode. This expects build js artifacts to be created and available to the server. (These can be created by building a production version of the client).
38-
To use the server together with a development version of the client instead use:
53+
#### Production
3954

40-
`python planarserver.py dev`
55+
The command will start the server in production mode. This expects build js artifacts to be created and available to the server. (These can be created by building a production version of the client).
56+
57+
```bash
58+
uv run planarserver.py
59+
```
60+
61+
#### Development
62+
63+
To use the server together with a development version of the client instead use:
4164

42-
If both server and client are running you can launch PA by visiting http://localhost:8000
65+
`uv run planarserver.py dev`
4366

44-
It is strongly recommended to also install the devdependencies ('requirements-dev.txt) as this contains the formatter that is used for PA.
67+
You will need to then start the client app. Then you will want to launch your browser at the host & port for the PA server (**not the client**). By default that will be: http://localhost:8000
4568

4669
## Client
4770

48-
The client is written in typescript, editing the javascript file directly is strongly discouraged and any pull request that only changes the js file will also be declined.
71+
The client is written in typescript, editing the javascript file directly is strongly discouraged and any pull request that only changes the js file will also be declined.
4972

50-
To get the client side up and running you'll need to install the dependencies with
73+
Ensure you have the correct version of NPM installed (typically latest LTS). You can verify that by checking in the github actions [pull_request.yaml](.github/workflows/pull_request.yaml#65) To get the client side up and running you'll need to install the dependencies with
5174

5275
`npm i`
5376

@@ -57,15 +80,15 @@ To build a production version use:
5780

5881
To build a development version use:
5982

60-
`npm run serve`
83+
`npm run dev`
6184

6285
### Target version
6386

6487
As mentioned in the client and server steps, there's a difference between the development version and the production version. Make sure that you use the same target for both environments when building.
6588

6689
### The result
6790

68-
To actually view and interact with the result whether you use the development or the production version you simply need to browse to your localhost at port 8000 (by default).
91+
To actually view and interact with the client app regardless of if you use the development or the production version. You will need to browse to your localhost at port 8000 (by default).
6992

7093
# Translation
7194

client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install
1515
This requires the server to be ran in development mode as well.
1616

1717
```
18-
npm run serve
18+
npm run dev
1919
```
2020

2121
If both server and client are running you can launch PA by visiting http://localhost:8000

0 commit comments

Comments
 (0)