47 Commits

Author SHA1 Message Date
1cabbd0224 Merge pull request 'test: add ResizeHandle enum unit tests' (#22) from issue-12/resize-handle-tests into master
All checks were successful
CI / build-and-test (push) Successful in 18s
Reviewed-on: #22
2026-03-27 18:06:55 +00:00
8635770755 test: add ResizeHandle enum unit tests
All checks were successful
CI / build-and-test (pull_request) Successful in 18s
Add 10 tests covering the ResizeHandle enum:
- Verify all 8 handles exist
- Verify each handle name (NW, N, NE, E, SE, S, SW, W)
- Verify each handle maps to the correct java.awt.Cursor constant
- Verify valueOf() round-trip for all handles
- Verify valueOf() with invalid name throws IllegalArgumentException

Closes #12
2026-03-27 18:06:49 +00:00
2ccea4b107 Merge pull request 'test: add SVGDraftman direct visitor tests' (#18) from issue-9/svg-draftman-tests into master
All checks were successful
CI / build-and-test (push) Successful in 17s
Reviewed-on: #18
2026-03-27 17:19:14 +00:00
3623928bb6 test: add SVGDraftman direct visitor tests
All checks were successful
CI / build-and-test (pull_request) Successful in 18s
Add 27 tests covering each visit*() method in isolation:
- visitRectangle: dimensions, filled/stroked/both/neither color combos
- visitCircle: center calculation, fill/stroke variants
- visitTriangle: polygon points, fill style, stroke style
- visitText: content, position offset, font attributes, color fallbacks
- visitCollection: empty, multiple children, nested collections
- generateSVG: XML declaration, SVG namespace, closing tag, shape content

Closes #9
2026-03-27 17:05:48 +00:00
8d56e941fc Merge pull request 'test: add HTMLDraftman direct visitor tests' (#19) from issue-10/html-draftman-tests into master
All checks were successful
CI / build-and-test (push) Successful in 18s
Reviewed-on: #19
2026-03-27 17:05:37 +00:00
d3c993eb2d test: add HTMLDraftman direct visitor tests
All checks were successful
CI / build-and-test (pull_request) Successful in 18s
Add 32 tests covering each visit*() method in isolation:
- visitRectangle: div+id, position, dimensions, filled/stroked/both/neither
- visitCircle: div+class, border-radius prefixes, position, id consistency
- visitTriangle: div+class, CSS border trick, position, fill color,
  regression test for hashCode mismatch (this.hashCode vs shape.hashCode)
- visitText: content, id consistency, position, font attrs, color, nowrap,
  null color fallback
- visitCollection: empty, multiple children, nested
- generateHTML: DOCTYPE, structure, stylesheet ref, shape content

Closes #10
2026-03-27 17:02:17 +00:00
4f4eb00baa Merge pull request 'Add SelectionAttributes unit tests' (#16) from issue-6/selection-attributes-tests into master
All checks were successful
CI / build-and-test (push) Successful in 17s
Reviewed-on: #16
2026-03-27 17:01:32 +00:00
bcbbcef321 Add SelectionAttributes unit tests
All checks were successful
CI / build-and-test (pull_request) Successful in 19s
Test core data type for selected/unselected state, default values,
ID constant, interface compliance, and instance independence.

8 tests covering all public API of SelectionAttributes.

Closes #6
2026-03-27 16:56:45 +00:00
692a03ee88 Merge pull request 'test: add ColorAttributes unit tests' (#17) from issue-7/color-attributes-tests into master
All checks were successful
CI / build-and-test (push) Successful in 17s
Reviewed-on: #17
2026-03-27 16:56:35 +00:00
e83a6ba7d1 test: add ColorAttributes unit tests
All checks were successful
CI / build-and-test (pull_request) Successful in 18s
Add 16 tests covering constructor behavior, fill/stroke flags and colors,
null color handling, ID constant, Attributes interface, toString output,
and instance independence.

Closes #7
2026-03-27 17:51:13 +01:00
c264e7a7fc Merge pull request 'Fix POM warnings: upgrade JaCoCo, pin dependency versions, add plugin version' (#29) from issue-28/fix-pom-warnings into master
All checks were successful
CI / build-and-test (push) Successful in 17s
Reviewed-on: #29
2026-03-27 16:49:58 +00:00
f7646f99ba fix(pom): upgrade JaCoCo, pin dependency versions, add compiler plugin version
All checks were successful
CI / build-and-test (pull_request) Successful in 17s
- Upgrade jacoco-maven-plugin 0.8.11 → 0.8.13 (fixes 'Unsupported class file major version 69' with JDK 25)
- Pin slf4j-api to 2.0.16 and logback-classic to 1.5.12 (replaces deprecated RELEASE)
- Add maven-compiler-plugin version 3.13.0

Closes #28
2026-03-27 17:49:22 +01:00
29d202c156 Merge pull request 'Add parameterized ShapeContractTest for Shape interface invariants' (#15) from issue-8/shape-contract-test into master
All checks were successful
CI / build-and-test (push) Successful in 18s
Reviewed-on: #15
2026-03-27 16:21:22 +00:00
7ddef4d8ab Add parameterized ShapeContractTest for Shape interface invariants
All checks were successful
CI / build-and-test (pull_request) Successful in 18s
Verify clone(), getBounds(), and translate() contracts across all Shape
implementations (SRectangle, SCircle, STriangle, SText, SCollection)
using @ParameterizedTest + @MethodSource.

Also adds junit-jupiter-params dependency to pom.xml.

Closes #8
2026-03-27 16:11:55 +00:00
c51ae8cfbb Merge pull request 'fix(ci): use Maven wrapper instead of system mvn' (#26) from issue-25/maven-wrapper into master
All checks were successful
CI / build-and-test (push) Successful in 18s
Reviewed-on: #26
2026-03-27 16:09:54 +00:00
bd59c76c1a fix(ci): use gitea-upload-artifact instead of actions/upload-artifact
All checks were successful
CI / build-and-test (pull_request) Successful in 24s
actions/upload-artifact@v4 refuses to run on Gitea (detected as GHES).
Use the Gitea-compatible fork from gitea.com/actions/gitea-upload-artifact.
2026-03-27 17:05:18 +01:00
73156b69d7 fix(ci): use Maven wrapper instead of system mvn
Some checks failed
CI / build-and-test (pull_request) Failing after 16s
The Gitea runner image does not include Maven, causing 'mvn: command not found'.
Add Maven wrapper (mvnw) so CI downloads Maven automatically.

Closes #25
2026-03-27 16:58:04 +01:00
2db2ed19a0 Merge pull request 'ci: add JaCoCo coverage gate and Gitea CI pipeline' (#24) from issue-14/jacoco-ci-pipeline into master
Reviewed-on: #24
2026-03-27 15:41:41 +00:00
651cc4459e ci: add JaCoCo coverage gate and Gitea CI pipeline
- Add JaCoCo maven plugin (0.8.11) with prepare-agent, report, and check goals
- Set 50% bundle-level line coverage gate (to be raised as test coverage grows)
- Exclude UI classes (App, Controller, ShapesView, etc.) from coverage checks
  since they require a display and cannot be unit-tested
- Add Gitea Actions workflow: checkout → JDK 16 → mvn verify → upload report

Closes #14
2026-03-27 15:41:24 +00:00
ba37b199de fix(html): fix hashCode for triangle
The bug caused HTML class and CSS selector to have different IDs, breaking triangle rendering.
2026-03-27 16:39:10 +01:00
da70c9f568 test: add HTML and SVG exporter unit tests
- Add HTMLExporterTest covering HTML structure, rectangle/circle div generation,
  empty and nested collections, and constructor
- Add SVGExporterTest covering SVG structure, rectangle/circle elements,
  color attributes, nested collections, and constructor
2026-03-27 14:29:38 +01:00
211f15658b test: add core unit tests
- Add JUnit 5 Jupiter dependencies to pom.xml
- Add maven-surefire-plugin for test execution
- Add AbstractShapeTest for base class methods
- Add SCircleTest, SRectangleTest, STriangleTest, STextTest

Tests cover: creation, bounds, clone, resize (AbstractShape)
2026-03-27 14:24:25 +01:00
b0e3428696 feat(ui): add box selection feature
- Selection: add addAll() method for bulk shape addition
- Controller: box selection with mouse drag on empty space
- ShapeDraftman: drawSelectionBox() for rubber-band rendering
- ShapesView: currentSelectionBox field and setter
2026-03-26 23:56:01 +01:00
3a6f98455a fix: fix resize and dragging
- AbstractShape: make bounds protected for subclass access
- STriangle: refactor resize logic
- SCircle: refactor resize logic (preserves equal dimensions)
- SText: add reasonable default bounds for hit testing
2026-03-26 23:55:38 +01:00
fbe3714182 update TODO.md 2026-03-19 23:05:40 +01:00
0d357853ae Merge pull request 'Resize shapes' (#4) from resize-feature into master
Reviewed-on: #4
2026-03-19 21:33:43 +00:00
fcd68be51b Fix bugs: stroke condition, logging typo, NPE in clone(), mutable bounds 2026-03-19 22:32:53 +01:00
b34ad6a2e4 implement resize feature 2026-03-19 22:32:49 +01:00
332ac76a23 Merge pull request 'feat/text-shapes' (#3) from feat/text-shapes into master
Reviewed-on: #3
2026-03-19 21:24:08 +00:00
f8a6d786ee feat: implement SText shape 2026-03-19 21:45:54 +01:00
bd9c6c4b7d add TODO.md 2026-03-19 20:21:20 +01:00
f424735a7b Add STriangle 2026-03-19 20:03:28 +01:00
b8ecf9859b Implement SVG export 2026-03-19 19:06:12 +01:00
ad45eddbf5 fix confusion between circle radius and diameter
classic shite
2026-03-19 19:05:12 +01:00
dd59c7d51a sync edit menu checkbox state with the selected shape 2026-03-19 16:29:56 +01:00
ce6d0b0815 fix drag of multiple selected shapes with shift 2026-03-19 14:51:12 +01:00
02dd84c1f4 handle multiple selection with shift 2025-02-19 13:44:23 +01:00
5f0bcda8ba Import menu items from original project 2025-02-19 12:57:48 +01:00
75bd5997df add menubar 2025-02-19 12:15:39 +01:00
55e74b5e4b Add HTML export action 2025-02-19 11:45:32 +01:00
1b0284cb4d Add change color action 2025-02-19 11:39:50 +01:00
aea90f5a93 Implement copy action 2025-02-19 11:27:45 +01:00
b4eac668c8 Add delete shape operation 2025-02-19 10:50:27 +01:00
98b05e435e Add SCircle 2019-03-19 21:56:00 +01:00
5be59b37f0 Avoid use of try-catch as control flow 2019-03-19 21:37:11 +01:00
51885d8c53 Base java event POC 2019-03-19 21:29:26 +01:00
95cb82d419 Init repository 2019-03-19 20:40:20 +01:00