Skip to content

Make main the 2.x line for ActiveAdmin 4 - #1

Merged
senid231 merged 8 commits into
mainfrom
restructure-vanilla-v4
Dec 2, 2026
Merged

senid231 merged 8 commits into
mainfrom
restructure-vanilla-v4

Conversation

@senid231

@senid231 senid231 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Makes main the 2.x line again: page objects for vanilla ActiveAdmin 4 (activeadmin >= 4.0.0.beta1, < 5.0.0.a), version 2.0.0.alpha. The 1.x line for ActiveAdmin 3 stays on 1-x-stable, and 1.x releases keep shipping from there.

main took the 1-x-stable tree in 7531c9c. This branch merges main with the ours strategy, so the diff shows only 2.x against 1.x and the branch history stays intact. The theme and the date plugins pin 8ec1677 on this branch, so it is not rebased.

What 2.x adds over 1.0.0 is in CHANGELOG.md under 2.0.0.alpha. No tag or release comes with this PR.

Chrome reports text after CSS text-transform, so a status tag the theme uppercases failed exact_text: "verified".

Co-Authored-By: Clanker
ActiveAdmin 4 writes no data-column on the actions cell, so row.cell(:actions)
never matched. Flashes#flash_types lets a theme accept the types it renders.

Co-Authored-By: Clanker
Ports the 1.x comments, has_many and status tag sections to ActiveAdmin 4
markup and adds table sorting. A panel nested in another is now found by
its own title instead of matching the outer panel too.

Co-Authored-By: Clanker
main took the 1-x-stable tree in 7531c9c. This merge records that history and keeps the 2.x files, so main becomes 2.x again and 1.x stays on 1-x-stable.

Co-Authored-By: Clanker
60e84a9 and 8ec1677 both report 2.0.0.alpha, so a theme's check_version! cannot require the StatusTag section that only 8ec1677 has.

Co-Authored-By: Clanker
@senid231 senid231 self-assigned this Dec 1, 2026
@senid231
senid231 requested a balanced review from Copilot December 1, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved defects break batch actions when the menu is already open, prevent selection-cell lookups in ActiveAdmin 4, and discard exact-text constraints when combined with text filters.

3 open issues
1 file not reviewed
  • spec/dummy/package-lock.json: Generated file
What changed in this PR

Moves main back to the 2.x line for vanilla ActiveAdmin 4, adapting the page-object API and test application to its markup and interactions. ActiveAdmin 3 remains on 1-x-stable.

Changes:

  • Updates selectors, navigation, tables, status tags, forms, and comments for ActiveAdmin 4.
  • Removes obsolete components and revises regression coverage.
  • Migrates the dummy app to Propshaft, importmap, and Tailwind, with corresponding dependency, CI, and documentation updates.
File Description
spec/​support/​pages.rb Updates page declarations and adds the order form.
spec/​spec_helper.rb Updates test-record cleanup for line items.
spec/​dummy/​tailwind-active_admin.config.js Configures ActiveAdmin’s Tailwind plugin and content sources.
spec/​dummy/​package.json Adds frontend dependencies and CSS build script.
spec/​dummy/​config/​schema.rb Adds line items and revises comment authors.
spec/​dummy/​config/​importmap.rb Adds the expected importmap configuration file.
spec/​dummy/​config/​application.rb Loads Propshaft and importmap instead of Sprockets.
spec/​dummy/​app/​views/​active_admin/​_html_head.html.erb Loads CSS, theme initialization, and importmap scripts.
spec/​dummy/​app/​tailwind/​active_admin.css Adds the Tailwind stylesheet entry point.
spec/​dummy/​app/​models/​order.rb Enables nested line-item attributes.
spec/​dummy/​app/​models/​line_item.rb Adds the nested-record test model.
spec/​dummy/​app/​models/​customer.rb Removes nested order editing.
spec/​dummy/​app/​models/​admin_user.rb Uses names for comment authors.
spec/​dummy/​app/​controllers/​application_controller.rb Finds the named demo administrator.
spec/​dummy/​app/​assets/​stylesheets/​active_admin.scss Removes the legacy Sass entry point.
spec/​dummy/​app/​assets/​javascripts/​active_admin.js Removes the legacy JavaScript entry point.
spec/​dummy/​app/​assets/​config/​manifest.js Removes the Sprockets asset manifest.
spec/​dummy/​app/​admin/​orders.rb Adds the nested line-item form fixture.
spec/​dummy/​app/​admin/​documents.rb Updates comments and simplifies component fixtures.
spec/​dummy/​app/​admin/​dashboard.rb Adds a nested-panel fixture.
spec/​dummy/​app/​admin/​customers.rb Updates date inputs and removes obsolete fixtures.
spec/​active_admin_page_objects/​utility_navigation_spec.rb Removes legacy utility-navigation tests.
spec/​active_admin_page_objects/​text_spec.rb Tests case-insensitive options and updates version expectations.
spec/​active_admin_page_objects/​tabs_spec.rb Checks the removed-component error.
spec/​active_admin_page_objects/​table_spec.rb Covers updated sorting, cells, and untitled columns.
spec/​active_admin_page_objects/​status_tag_spec.rb Covers status attributes and multi-tag matching.
spec/​active_admin_page_objects/​sidebar_spec.rb Removes legacy sidebar tests.
spec/​active_admin_page_objects/​selectors_spec.rb Tests ActiveAdmin 4 defaults and removed selectors.
spec/​active_admin_page_objects/​section_spec.rb Moves shared checks away from tabs.
spec/​active_admin_page_objects/​rspec_matchers_spec.rb Updates matcher integration fixtures and expectations.
spec/​active_admin_page_objects/​panel_spec.rb Adds nested-panel coverage.
spec/​active_admin_page_objects/​modal_dialog_spec.rb Removes legacy modal-dialog tests.
spec/​active_admin_page_objects/​main_menu_spec.rb Tests expanding collapsed menu parents.
spec/​active_admin_page_objects/​layout_spec.rb Tests ActiveAdmin 4 header elements and layout.
spec/​active_admin_page_objects/​has_many_spec.rb Moves nested-form coverage to line items.
spec/​active_admin_page_objects/​form_spec.rb Updates form fixtures and native-date expectations.
spec/​active_admin_page_objects/​flashes_spec.rb Updates supported flash types and container expectations.
spec/​active_admin_page_objects/​filters_spec.rb Updates filter markup and clear-link coverage.
spec/​active_admin_page_objects/​extension_spec.rb Tests overriding a removed selector.
spec/​active_admin_page_objects/​disabled_fields_spec.rb Removes customer-order fieldset coverage.
spec/​active_admin_page_objects/​comments_spec.rb Tests document comments and named authors.
spec/​active_admin_page_objects/​breadcrumbs_spec.rb Updates breadcrumb label expectations.
spec/​active_admin_page_objects/​batch_actions_spec.rb Updates browser-confirmation coverage.
spec/​active_admin_page_objects/​attributes_table_spec.rb Tests data-row selectors and case-insensitive matching.
spec/​active_admin_page_objects/​action_items_spec.rb Checks removal of action-item dropdowns.
README.md Documents the ActiveAdmin 4 API and setup.
Rakefile Builds dummy-app CSS before specs.
lib/​active_admin_page_objects/​version.rb Sets the 2.x prerelease version.
lib/​active_admin_page_objects/​utility_navigation.rb Removes the legacy navigation section.
lib/​active_admin_page_objects/​text.rb Adds case-insensitive text-option conversion.
lib/​active_admin_page_objects/​tabs.rb Retains a stub for removed tabs.
lib/​active_admin_page_objects/​table/​rows_by_cell.rb Adds actions-cell lookup support.
lib/​active_admin_page_objects/​table.rb Updates column detection, text matching, and sorting.
lib/​active_admin_page_objects/​status_tag.rb Matches tags through data-status attributes.
lib/​active_admin_page_objects/​sidebar.rb Removes the legacy sidebar section.
lib/​active_admin_page_objects/​selectors.rb Replaces defaults with ActiveAdmin 4 selectors.
lib/​active_admin_page_objects/​section.rb Removes legacy class-key and datepicker helpers.
lib/​active_admin_page_objects/​scopes.rb Parses the revised scope-count text.
lib/​active_admin_page_objects/​panel.rb Clarifies nested-panel behavior in comments.
lib/​active_admin_page_objects/​modal_dialog.rb Removes the legacy modal-dialog section.
lib/​active_admin_page_objects/​main_menu.rb Expands parents through toggle buttons.
lib/​active_admin_page_objects/​layout.rb Updates available layout sections.
lib/​active_admin_page_objects/​has_many.rb Updates documentation examples to line items.
lib/​active_admin_page_objects/​form/​date_picker_field.rb Sets native date-input values.
lib/​active_admin_page_objects/​form.rb Uses updated has-many headings and association attributes.
lib/​active_admin_page_objects/​flashes.rb Adds an overridable list of supported flash types.
lib/​active_admin_page_objects/​filters/​date_range_filter.rb Sets native date-range inputs.
lib/​active_admin_page_objects/​filters.rb Removes the outdated JavaScript-only clear comment.
lib/​active_admin_page_objects/​fields.rb Recognizes the date_picker input class.
lib/​active_admin_page_objects/​errors.rb Removes the ActiveAdmin 3-specific error.
lib/​active_admin_page_objects/​dropdown_menu.rb Removes the legacy dropdown section.
lib/​active_admin_page_objects/​declarations.rb Revises declaration documentation.
lib/​active_admin_page_objects/​comments.rb Documents ActiveAdmin 4 comment rendering and titles.
lib/​active_admin_page_objects/​batch_actions.rb Uses browser confirmations for batch actions.
lib/​active_admin_page_objects/​attributes_table.rb Uses data-row keys and case-insensitive matching.
lib/​active_admin_page_objects/​action_items.rb Raises for removed action-item dropdowns.
lib/​active_admin_page_objects.rb Updates component loading and panel-selector registration.
Gemfile Switches development dependencies to ActiveAdmin 4.
CHANGELOG.md Describes the 2.x API and component changes.
active_admin_page_objects.gemspec Targets ActiveAdmin 4 and the main-line changelog.
.gitignore Ignores frontend dependencies and generated CSS.
.github/​workflows/​ci.yml Adds Node setup and CSS builds for CI.

Review effort: Balanced

Comment thread lib/active_admin_page_objects/text.rb Resolved
Covers the three findings of the first review on PR #1.

Co-Authored-By: Clanker

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The dependency range includes ActiveAdmin 4.0.0.beta1, whose comments template lacks the ID required by the new selector, causing Comments section access to raise Capybara::ElementNotFound.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Support the comments markup in ActiveAdmin 4 beta

active_admin_page_objects.gemspec:27

The dependency range admits ActiveAdmin 4.0.0.beta1, but its comments template has no active-admin-comments-form ID. The new comments selector requires that ID, so accessing a Comments section raises Capybara::ElementNotFound on an explicitly supported version. Please support the older markup or raise the minimum dependency and update the documented range.

3 resolved since last review
1 file not reviewed
  • spec/dummy/package-lock.json: Generated file

Review effort: Balanced

The comments section needs the active-admin-comments-form id, which
ActiveAdmin added in beta20, and the suite runs on beta23 only.

Co-Authored-By: Clanker
@senid231

senid231 commented Dec 2, 2026

Copy link
Copy Markdown
Member Author

Fixed in 06b7f8c: the gem now requires activeadmin >= 4.0.0.beta23. #active-admin-comments-form first appears in beta20, and beta23 is the version CI runs and the theme requires.

@senid231
senid231 merged commit 03f03f3 into main Dec 2, 2026
5 checks passed
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