[DREAM-688] Use BorderBoxList for enumerations - #23485
Closed
myabc wants to merge 2 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the admin enumerations index to render its list using the shared OpenProject::Common::BorderBoxListComponent, while adding a focused component spec to keep drag-and-drop-related markup covered by tests.
Changes:
- Replaces the hand-rolled
Primer::Beta::BorderBoxcomposition withOpenProject::Common::BorderBoxListComponentin the enumerations index view. - Adds a component spec ensuring the BorderBox list markup, controls, and drag-and-drop data attributes are present for both empty and non-empty states.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/components/admin/enumerations/index_component.html.erb | Switches enumeration list rendering to the shared BorderBoxList component while keeping drag-and-drop data attributes. |
| spec/components/admin/enumerations/index_component_spec.rb | Adds component-level coverage for header/actions, row rendering, and drag-and-drop dataset attributes. |
myabc
force-pushed
the
implementation/74940-migrate-enumerations-to-border-box-list
branch
from
June 16, 2026 18:48
22a29ff to
70873c9
Compare
myabc
marked this pull request as ready for review
June 16, 2026 18:56
myabc
force-pushed
the
implementation/74940-migrate-enumerations-to-border-box-list
branch
from
June 16, 2026 19:01
70873c9 to
5822734
Compare
Migrate the enumerations admin index from hand-rolled BorderBox header and row markup to the shared BorderBoxListComponent, exercising the primitive in a real drag-and-drop reordering context. The header now renders as an h3 to match sibling admin lists. Adds spec coverage. https://community.openproject.org/wp/DREAM-688
Migrate the document types admin index to BorderBoxListComponent, mirroring the enumerations migration. The old two-column header (Type / Documents) is replaced by the list header with a type count; each row renders its document count as a Counter using the same options as the list header counter, minus the primary scheme. Adds spec coverage. https://community.openproject.org/wp/DREAM-688
myabc
force-pushed
the
implementation/74940-migrate-enumerations-to-border-box-list
branch
from
June 16, 2026 21:05
5822734 to
14c37c0
Compare
HDinger
requested changes
Jun 17, 2026
Contributor
There was a problem hiding this comment.
The code changes themeselves look fine. However, I have two visual remarks:
- I am not convinced by the decision to get rid of the second column in the documents table. Please bring that to the UX/UI and also reflect that in the ticket if it gets agreement
- The "default" badge looks different in the two tables. I am aware that this was not necessarily part of the change, but I guess it makes sense to harmonize that quickly to use the
Labelin both places
4 tasks
Contributor
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
https://community.openproject.org/wp/DREAM-688
What are you trying to accomplish?
Migrate the enumerations and document-types admin index lists to the shared
OpenProject::Common::BorderBoxListComponent, validating the primitive in real drag-and-drop reordering contexts. Header, rows, empty state, and DnD wiring are preserved and covered by component specs that share a"a reorderable Border Box List"example.Screenshots
What approach did you choose and why?
Replaced the bespoke
border_box_containerheader/row markup with the list component's slots (with_header,with_item,with_empty_state). The document-types per-row document count now renders as aCounterusing the same options as the list header counter.Merge checklist