Skip to content

orders: extract work order list geometry - #5900

Open
Robuske wants to merge 2 commits into
DFHack:developfrom
Robuske:orders-work-order-list-refactor
Open

Robuske wants to merge 2 commits into
DFHack:developfrom
Robuske:orders-work-order-list-refactor

Conversation

@Robuske

@Robuske Robuske commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • Extract the Work Orders list geometry calculations into plugins.orders.work_order_list so Lua overlays can share the same row positions and visible range.
  • Update the existing orders search overlay to use the extracted module without changing its behavior.
  • Add focused coverage for list placement, viewport sizing, and end-of-list clamping.
  • Add the required changelog and contributor entries.

Testing

  • Ran the targeted orders tests in a loaded fortress:

    test -d C:/Users/rodbu/Developer/Dwarf/dfhack/test -t orders
    

    Result on this branch: 10/10 tests passed, 48/48 checks passed.

  • The stacked position-overlay branch also passed 14/14 tests and 78/78 checks.

@chdoc

chdoc commented Sep 14, 2026

Copy link
Copy Markdown
Member

While we are far from consistent about this, I would prefer if new libraries were using camel case instead of snake case. This would bring local_module.someThing more in line with dfhack.module.someThing. The global API consistently uses camel case. In particular, given that most of the local imports use single words or acronyms as names.

@Robuske
Robuske force-pushed the orders-work-order-list-refactor branch from 0950ece to 1145d27 Compare September 16, 2026 02:36
@Robuske

Robuske commented Sep 16, 2026

Copy link
Copy Markdown
Author

@chdoc PR has been updated to use camelCase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants