Skip to content

Conversation

@rsmithlal
Copy link
Member

This pull request introduces several improvements to the Better Together platform, focusing on enhanced filtering, sorting, and pagination for pages and platform invitations, as well as UI and performance enhancements. The changes include new backend logic for filtering and sorting collections, improved pagination styling, and better preloading of associations to optimize queries.

Platform Invitations: Filtering, Sorting, and Pagination

  • Added comprehensive filtering and sorting logic to the PlatformInvitationsController, allowing invitations to be filtered by status, email, date fields, and sorted by multiple attributes. Pagination is now applied to the invitations list for better usability. [1] [2]
  • Updated controller actions for create, destroy, and resend to consistently redirect to the invitations index page and improved error handling for form submissions. [1] [2] [3]

Pages: Filtering, Sorting, and Performance

  • Refactored the PagesController to support filtering by title and slug, sorting by various attributes, and paginating results. Content blocks are now preloaded with their associations for improved performance. [1] [2]
  • Simplified and modularized permitted parameters for page creation and update, improving maintainability and clarity.

UI and Styles

  • Added a new pagination.scss file and imported it into the main stylesheet, providing custom styles for pagination components and enhancing accessibility and responsiveness. [1] [2]

Performance

  • Improved performance in the events controller by removing unnecessary preloading of text translations for events.

Cleanup

  • Removed the unused event_datetime_controller.js file, cleaning up legacy code related to event time synchronization.

- Removed unused resources from routes.
- Enhanced the index action to support title and slug filtering.
- Implemented sorting by title and slug in the index action.
- Added pagination to the index view.
- Introduced auto-submit functionality for filter inputs.
- Created new JavaScript controllers for person search and auto-submit.
- Added caching for pages and page content to improve performance.
- Updated views to reflect new filtering and sorting features.
- Added new pagination views for better navigation.
- Updated locale files to include new translation keys for filters and pagination.
- Added request specs for pages filtering and sorting functionality.
…vitations management

Improve performance of platform show view by pulling platform invitations into lazy-loaded turbo frame
- Created a new partial `_filter_hidden_fields.html.erb` to preserve filter parameters across form submissions in the platform invitations.
- Updated `_platform_invitation.html.erb` to use caching for table rows.
- Refactored `index.html.erb` to include the new filter hidden fields partial and improved the form structure for filtering and pagination.
- Enhanced localization files (`en.yml`, `es.yml`, `fr.yml`) to include new translations for platform invitation attributes.
- Updated controller specs to reflect changes in the platform invitation model and added tests for filtering, searching, and sorting functionality.
- Adjusted factories for platform invitations and roles to ensure proper associations and unique invitee emails.
… queries

feat(image_helper): enhance profile image handling with optimized URL method

feat(person): add non-blocking profile image variant and URL methods

test(image_helper): add specs for profile_image_tag method

test(performance): add performance tests for profile image loading
@rsmithlal rsmithlal added the enhancement New feature or request label Oct 28, 2025
@rsmithlal rsmithlal merged commit ad712f2 into main Oct 28, 2025
11 of 12 checks passed
@rsmithlal rsmithlal deleted the enhance/load-times branch October 28, 2025 23:59
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 33 to 36
has_rich_text :greeting, encrypted: true

validates :invitee_email, uniqueness: { scope: :invitable_id, allow_nil: true }
validates :invitee_email, presence: true, format: { with: URI::MailTo::EMAIL_REGEXP }
validates :invitee_email, uniqueness: { scope: :invitable_id, allow_nil: true, allow_blank: true }

Choose a reason for hiding this comment

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

P1 Badge Requiring invitee_email blocks guest access invitations

The new presence/format validation on invitee_email means every PlatformInvitation must have an email address. BetterTogether::GuestAccess inherits from this model and intentionally generates shareable links without an email, so this validation now prevents creating any guest access invitation. That breaks a core use case of the subclass (self-registering guests) and will raise validation errors whenever a manager tries to create a guest link.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants