Skip to content

Enhance file attachment management and improve room filters UI - #445

Merged
rsmoke merged 7 commits into
stagingfrom
jira_fixes
Jul 6, 2026
Merged

Enhance file attachment management and improve room filters UI#445
rsmoke merged 7 commits into
stagingfrom
jira_fixes

Conversation

@rsmoke

@rsmoke rsmoke commented Jul 6, 2026

Copy link
Copy Markdown
Member

This pull request introduces several improvements to the handling and display of room characteristic definitions, enhances the glossary experience for users, and refines the file attachment deletion flow. The main changes include caching and centralizing room characteristic definitions, improving the UI and navigation for the Room Filters Glossary, providing better definitions and links throughout the UI, and updating the attachment deletion redirect logic to be context-aware.

Room Characteristic Definitions and Glossary Improvements:

  • Added a cached room_characteristic_definitions helper to ApplicationController for efficient, centralized access to room characteristic labels and definitions.
  • Refactored the Room Filters Glossary: categories and filters are now grouped, sorted, and navigable via anchor links; category and filter anchors are generated for smooth in-page navigation. [1] [2] [3]
  • Updated UI components (checkbox filters, room characteristic lists) to display definitions as tooltips or inline, and added info links to glossary entries for signed-in users. [1] [2] [3]

Attachment Deletion Flow:

  • Refined the file attachment deletion logic to redirect users to the relevant parent resource (room, building, or nested floor) after deletion, improving user experience and test coverage. [1] [2] [3] [4]

Minor UI and Content Fixes:

  • Fixed typos and improved instructional content in the room edit page. [1] [2] [3]

Testing:

  • Updated and added request specs to verify glossary rendering and the improved attachment deletion redirects. [1] [2]

rsmoke added 4 commits July 6, 2026 13:56
- Updated the delete_file_attachment method to redirect to the appropriate record page after purging an attachment, improving user experience.
- Added attachment_redirect_path and attachment_redirect_parent methods to handle redirection logic for different record types.
- Modified the building image removal button in the buildings show view to use button_to for better form handling and confirmation.
- Expanded attachment deletion specs to ensure correct redirection for building images and nested floor plans.
- Introduced caching for room characteristic definitions in the ApplicationController to improve performance.
- Updated the PagesController to streamline the room filters glossary, utilizing cached definitions and improving the display of categories and filters.
- Enhanced the room filters glossary view with improved navigation and layout, including links to definitions and better accessibility features.
- Modified the room characteristics partial to conditionally display definitions based on user context.
- Updated specs to ensure the glossary page renders correctly with the new features.
…dit view

- Corrected the spelling of "availability" in the info panel.
- Adjusted formatting for better readability in the list of room management features.
- Fixed list item formatting in the info panel for better readability.
- Updated HTML entities for proper display in the room management features list.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves how room characteristic definitions are retrieved and presented across the Rooms UI and the Room Filters Glossary, and makes attachment deletion redirects return users to the most relevant parent page (room/building/nested floor).

Changes:

  • Centralized and cached room characteristic definitions via ApplicationController#room_characteristic_definitions, and used them for tooltips/inline definitions and glossary rendering.
  • Refactored the Room Filters Glossary UI to group/sort categories and provide anchor-based in-page navigation.
  • Updated attachment deletion redirect logic to be context-aware, with expanded request spec coverage.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/requests/pages_spec.rb Adds assertions for glossary page content rendering.
spec/requests/attachment_deletions_spec.rb Expands redirect coverage for room/building/floor attachment deletions.
app/views/rooms/edit.html.erb Fixes/cleans up instructional copy and HTML structure.
app/views/rooms/_room_characteristic.html.erb Adds optional inline definitions and glossary deep-links for characteristics.
app/views/rooms/_checkbox_filters.html.erb Adds definition tooltips and glossary deep-links to checkbox filters.
app/views/rooms/_characteristics.html.erb Renders characteristics with inline definitions and a distinct cache key variant.
app/views/pages/room_filters_glossary.html.erb Reworks glossary layout with alphabetical nav and anchored sections.
app/views/buildings/show.html.erb Adjusts building image removal UI to use button_to delete flow.
app/helpers/application_helper.rb Adds helper methods for generating glossary anchors.
app/controllers/pages_controller.rb Simplifies glossary action to use prebuilt/cached characteristics data.
app/controllers/application_controller.rb Adds cached definitions helper and context-aware redirect logic for attachment deletions.
app/assets/builds/tailwind.css Updates built Tailwind output to support new/used utility classes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/controllers/application_controller.rb
Comment thread app/views/rooms/edit.html.erb Outdated
rsmoke and others added 3 commits July 6, 2026 17:01
fis typo in not-active

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Updated the delete_file_attachment method to handle ActiveRecord::RecordNotFound separately, improving robustness.
- Enhanced redirection logic in attachment_redirect_path to ensure proper fallback to rooms_path when parent record is not found.
@rsmoke
rsmoke merged commit 878f947 into staging Jul 6, 2026
3 checks passed
@rsmoke
rsmoke deleted the jira_fixes branch July 6, 2026 21:21
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