Skip to content

Release 1.2.1: fieldsets after errors, comments in hidden tabs - #4

Open
senid231 wants to merge 1 commit into
1-x-stablefrom
fixes-1x-v1.2.1
Open

senid231 wants to merge 1 commit into
1-x-stablefrom
fixes-1x-v1.2.1

Conversation

@senid231

@senid231 senid231 commented Dec 2, 2026

Copy link
Copy Markdown
Member

Release 1.2.1 for ActiveAdmin 3. It fixes two 1.2.0 bugs that an app's full suite found.

  • HasMany#fieldset(label:) missed a fieldset after a validation error. Rails' field_error_proc wraps the label in div.field_with_errors, and the lookup wanted the label as a direct child of the input wrapper. The other label lookups search descendants, so the wrapper does not affect them.
  • Comments#add failed when the comments panel sits in a tab that the reload hides. The comment was saved, but the check wanted a visible body. It now compares the text of visible and hidden bodies.

The dummy app's labelled has_many now depends on the customer's external id instead of a query parameter, so the form re-rendered with errors keeps the labels.

Verified with the full suite (462 examples) and RuboCop. Both new specs failed before the fix.

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.

🟢 Approval recommended

No active review issues are recorded for the ActiveAdmin form and comment fixes.

No open issues 🎉

What changed in this PR

Releases ActiveAdminPageObjects 1.2.1 with two fixes for ActiveAdmin 3 forms and comments.

Changes:

  • Finds labelled has-many fieldsets when validation errors wrap their labels.
  • Checks saved comments even when a reload hides the comments tab.
  • Adds regression coverage and updates release metadata.
File Description
spec/​dummy/​app/​admin/​customers.rb Adds tabbed comments and preserves labels after validation errors.
spec/​active_admin_page_objects/​text_spec.rb Updates the expected version to 1.2.1.
spec/​active_admin_page_objects/​has_many_spec.rb Covers labelled fieldset lookup after validation errors.
spec/​active_admin_page_objects/​comments_spec.rb Covers adding comments in tabs hidden after reload.
lib/​active_admin_page_objects/​version.rb Bumps the release version to 1.2.1.
lib/​active_admin_page_objects/​has_many.rb Matches labels inside error wrappers.
lib/​active_admin_page_objects/​comments.rb Includes hidden comment bodies in the post-submit check.
CHANGELOG.md Documents both fixes.

Review effort: Balanced

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