refactor: decompose OrganisationServicesAccordion into focused components#251
Merged
james-cross merged 1 commit intostagingfrom Feb 19, 2026
Conversation
…ents - Extract ServiceTypeBadges, AccommodationDetails, ServiceAddress, ServiceLocationDetails, and ServiceLocationPicker components - Consolidate duplicate badge rendering into single ServiceTypeBadges - Replace inline styles with Tailwind utility classes throughout - Eliminate deeply nested IIFEs with declarative JSX and helper components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Breaks down the 836-line OrganisationServicesAccordion monolith into six focused components, each with a single responsibility. Replaces inline CSS variable styles with Tailwind utility classes and eliminates deeply nested IIFEs.
Changes
ServiceTypeBadges(75 lines) - consolidates duplicate badge rendering for phone, 24/7, appointment, and accommodation type indicatorsAccommodationDetails(256 lines) - all accommodation info sections (contact, cost, resident criteria, facilities, support) with helper sub-componentsServiceAddress(62 lines) - address display with Google Maps and Apple Maps linksServiceLocationDetails(110 lines) - composes sub-components for a single location's detailsServiceLocationPicker(122 lines) - multi-location buttons with distance and open/closed statustext-brand-k,bg-brand-b,border-l-brand-h,bg-[#f0f9f7], etc.)Testing