Skip to content

[#73688] Spike porting Angular boards to React (with Primer React)#22666

Draft
myabc wants to merge 17 commits intodevfrom
spike/boards-primer-react
Draft

[#73688] Spike porting Angular boards to React (with Primer React)#22666
myabc wants to merge 17 commits intodevfrom
spike/boards-primer-react

Conversation

@myabc
Copy link
Copy Markdown
Contributor

@myabc myabc commented Apr 6, 2026

Ticket

https://community.openproject.org/wp/73688

What are you trying to accomplish?

This spike moves the boards UI toward Primer React, but the intended shippable subset is intentionally narrow for now: free boards and action boards with attribute == "status".

Other board types such as version, assignee, subproject, and subtasks should continue to use the existing Angular path until their move semantics and UI behavior are ported deliberately.

Screenshots

image

What approach did you choose and why?

The approach is to keep the existing feature flag, add an explicit React support boundary, and harden the supported subset against the current board behavior instead of broadening support prematurely.

That means reusing the existing board semantics for filters, query ordering, status transitions, and smoke-test selectors, while falling back to Angular for unsupported board types. The goal is to make the spike safe and testable now, and leave broader board-type parity as a follow-up pass built on the same abstractions.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

myabc and others added 14 commits April 6, 2026 20:11
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds `@primer/react` ^38.14.0 for use in React-based UI components
rendered via the Angular-to-React bridge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a "Configure" menu item to status action board columns that opens
a Primer `SelectPanel` modal for selecting which statuses a column
displays. Uses a new Angular-to-React bridge (`ReactBridge`) to render
React components within the Angular app, wrapped in Primer's
`ThemeProvider`.

Key pieces:
- `ReactBridge.openDialog()` — Promise-based helper that mounts a React
  component into a temporary DOM container and resolves on submit/cancel
- `PrimerProviderWrapper` — applies OpenProject's light/dark theme to
  Primer components
- `StatusMappingDialog` — `SelectPanel` with multi-select, search, and
  color-coded status items
- `BoardStatusMappingService` — Angular service that loads available
  statuses, opens the dialog, and persists filter changes to the board

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a `boards_react` feature flag that toggles between the
existing Angular board view and a new React-based board view.

When the flag is active, the `show` action loads the
`Boards::Grid` model and renders with the base layout. The
show template conditionally renders a `#react-board-root`
mount div with data attributes for the board configuration.

When the flag is inactive (default), the existing Angular
behavior is preserved unchanged.
BoardApp root with QueryClient + Primer providers.
BoardContext for board-level state (id, project, permissions).
Components: BoardCanvas, BoardColumn, BoardCard, CardList,
ColumnHeader, BoardToolbar, BoardFilterBar, DropIndicator,
AddCardAction, AddColumnAction. Includes Pragmatic DnD
integration for card dragging and live-region accessibility.
Self-initializing entrypoint mounts BoardApp onto
#react-board-root. Handles DOMContentLoaded and Turbo
Drive lifecycle. Imported from main.ts as side-effect.
The query API returns work packages under
`_embedded.results._embedded.elements`, not at a top-level
`results` key. Updates `QueryResult` type and `BoardColumn`
to read from the correct path.

Also fixes filter parsing to handle HAL filter objects
(with `_links.filter.href` and `_links.values[].href`)
instead of the simple `{status_id: ...}` format used in
widget options.
@myabc myabc changed the base branch from dev to spike/boards-react-column-status-mapping-board-cards April 6, 2026 19:17
@myabc myabc changed the base branch from spike/boards-react-column-status-mapping-board-cards to spike/boards-react-column-status-mapping April 6, 2026 19:17
@myabc myabc force-pushed the spike/boards-primer-react branch from 599e24d to ea3ee37 Compare April 6, 2026 19:17
@myabc myabc added experiment javascript Pull requests that update Javascript code DO NOT MERGE pullpreview labels Apr 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Deploying openproject with PullPreview

Field Value
Latest commit abd429b
Job deploy
Status ✅ Deploy successful
Preview URL https://pr-22666-boards-primer-re-ip-138-199-225-62.my.opf.run:443

View logs

@myabc myabc changed the title Spike/boards primer react Spike porting Boards to Primer React, implementing new Agile functionality Apr 6, 2026
@myabc myabc changed the title Spike porting Boards to Primer React, implementing new Agile functionality [#73688] Spike porting Boards to Primer React, including new Sprint functionality Apr 6, 2026
@myabc myabc changed the title [#73688] Spike porting Boards to Primer React, including new Sprint functionality [#73688] Spike porting Angular boards to React (with Primer React) Apr 6, 2026
@myabc myabc changed the base branch from spike/boards-react-column-status-mapping to dev April 6, 2026 21:34
myabc added 3 commits April 6, 2026 23:46
Tighten the supported React board subset to free boards and
status action boards, with Angular fallback for the rest.

Fix project scoping, persisted filters, Turbo mounting, and the
React board DnD/state plumbing. Add focused frontend coverage
plus controller and supported-path smoke specs.

https://community.openproject.org/wp/73688
Normalize board query ids, stop column polling, and align the React API
client with OpenProject's authenticated request headers. Also surface
backend workflow errors through the existing toast service so invalid
status transitions are visible to users.

https://community.openproject.org/wp/73688
Bring the React board card styling closer to the Figma direction, reuse
the existing type highlight classes, and avoid duplicating status text
when no assignee is present.

https://community.openproject.org/wp/73688
@myabc myabc force-pushed the spike/boards-primer-react branch from 472e688 to abd429b Compare April 6, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE experiment javascript Pull requests that update Javascript code

Development

Successfully merging this pull request may close these issues.

1 participant