Skip to content

ANW-1023: Default Top Container values#3732

Merged
thimios merged 2 commits intomasterfrom
ANW-1023-Default-Top-Container-measure-by-width
Jan 27, 2026
Merged

ANW-1023: Default Top Container values#3732
thimios merged 2 commits intomasterfrom
ANW-1023-Default-Top-Container-measure-by-width

Conversation

@cpapazoglou
Copy link
Copy Markdown
Collaborator

@cpapazoglou cpapazoglou commented Oct 3, 2025

Description

  • adds Container Profiles default values functionality

Requirement for manual testing - Repository Preferences change

To test this manually to ensure that custom Container Profile default values work, the "Pre-populate Records?" checkbox needs to be checked on the Repository Preferences.

Screenshots

Solution showing the new "Edit Default Values" on the Container Profiles index view

ANW-1023-new-btn

Solution showing the new "Container Profiles Default Values" page

ANW-1023-new-page

Related JIRA Ticket or GitHub Issue

ANW-1023

How Has This Been Tested?

  • automated tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have authority to submit this code.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@cpapazoglou cpapazoglou self-assigned this Oct 3, 2025
@coveralls
Copy link
Copy Markdown

coveralls commented Oct 3, 2025

Pull Request Test Coverage Report for Build 21395944292

Details

  • 12 of 15 (80.0%) changed or added relevant lines in 1 file are covered.
  • 997 unchanged lines in 103 files lost coverage.
  • Overall coverage increased (+0.9%) to 80.159%

Changes Missing Coverage Covered Lines Changed/Added Lines %
frontend/app/controllers/container_profiles_controller.rb 12 15 80.0%
Files with Coverage Reduction New Missed Lines %
backend/app/converters/subject_converter.rb 1 60.61%
frontend/app/models/resource_children.rb 1 66.67%
backend/app/exporters/lib/export_helpers.rb 1 93.13%
backend/app/lib/bulk_import/subject_handler.rb 1 80.26%
backend/app/lib/user_mailer.rb 1 72.73%
backend/app/controllers/container.rb 1 52.38%
backend/app/model/repository.rb 1 89.74%
backend/app/converters/digital_object_converter.rb 1 81.44%
backend/app/controllers/custom_report_template.rb 1 70.59%
backend/app/lib/longpolling.rb 1 91.67%
Totals Coverage Status
Change from base Build 15878865621: 0.9%
Covered Lines: 28450
Relevant Lines: 35492

💛 - Coveralls

Comment thread backend/spec/controller_default_values_spec.rb Outdated
Comment thread backend/spec/controller_default_values_spec.rb Outdated
Copy link
Copy Markdown
Collaborator

@thimios thimios left a comment

Choose a reason for hiding this comment

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

@thimios thimios marked this pull request as draft October 17, 2025 16:20
@cpapazoglou cpapazoglou marked this pull request as ready for review November 1, 2025 19:22
thimios
thimios previously requested changes Nov 4, 2025
Comment thread backend/spec/controller_default_values_spec.rb Outdated
Comment thread e2e-tests/staff_features/shared/step_definitions.rb Outdated
Comment thread frontend/spec/features/default_values_spec.rb Outdated
Comment thread e2e-tests/staff_features/resources/step_definitions/resource_tree_navigate.rb Outdated
@@ -48,7 +48,9 @@

wait_for_ajax if current_url.include?("resources/#{@resource_id}/edit") ||
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

let's remove the whole if line and just wait_for_ajax in any case here

Comment thread e2e-tests/staff_features/shared/step_definitions.rb Outdated
Comment thread frontend/app/controllers/container_profiles_controller.rb Outdated
Comment thread frontend/app/controllers/container_profiles_controller.rb Outdated
@cpapazoglou
Copy link
Copy Markdown
Collaborator Author

Multiple tests are not passing after a conflict resolution with master. I need to investigate this.

@cpapazoglou cpapazoglou force-pushed the ANW-1023-Default-Top-Container-measure-by-width branch from 4eba066 to 84699d8 Compare January 4, 2026 15:29
@thimios thimios force-pushed the ANW-1023-Default-Top-Container-measure-by-width branch 4 times, most recently from 0ddc24e to 4f79c83 Compare January 26, 2026 16:47
@thimios thimios requested a review from brianzelip January 26, 2026 17:59
@brianzelip brianzelip force-pushed the ANW-1023-Default-Top-Container-measure-by-width branch from 4f79c83 to 948cbfb Compare January 27, 2026 11:46
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@thimios these changes make the Container Profiles default values page consistent with other default value pages.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@thimios this didn't test what we wanted. It sets the wrong preferences ("Global Prefs" here do not override the "Repository Prefs"), plus it only asserts the prior-unwanted default of "Height".

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@thimios This new test asserts base defaults, then customizes defaults and asserts the new defaults are present when creating a new record.

Copy link
Copy Markdown
Collaborator

@brianzelip brianzelip left a comment

Choose a reason for hiding this comment

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

@thimios I updated the PR a bit for visual consistency and better testing.

@brianzelip brianzelip dismissed thimios’s stale review January 27, 2026 11:54

Issues are resolved

@thimios thimios merged commit 6bd05b8 into master Jan 27, 2026
64 of 68 checks passed
@thimios thimios deleted the ANW-1023-Default-Top-Container-measure-by-width branch January 27, 2026 16:16
@cdibella cdibella added this to the 4.2.0 milestone Mar 9, 2026
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.

5 participants