Skip to content

Implemented structured State → City → LGA location selection with ext…#14

Open
PleasantRon wants to merge 1 commit intoIwuchukwuDivine:masterfrom
PleasantRon:feat/precise-location-selector
Open

Implemented structured State → City → LGA location selection with ext…#14
PleasantRon wants to merge 1 commit intoIwuchukwuDivine:masterfrom
PleasantRon:feat/precise-location-selector

Conversation

@PleasantRon
Copy link

…ernal data fetching

  • Added a reusable LocationSelector component to handle State → City/LGA → Street input flow with searchable custom dropdowns.

  • Implemented full validation for state, city, LGA, and street address, enforcing required structured location input.

  • Enabled two-way form binding by emitting v-model updates from the selector component.

  • Applied consistent dark UI styling to dropdowns using layered z-indexing, slate backgrounds, amber borders, and shadow effects.

  • Introduced a useLocation composable to centralize location data fetching logic.

  • Integrated Nigerian state fetching via the CountriesNow API with client-side caching for performance.

  • Implemented city and LGA fetching per selected state, including fallback resolution from multiple public GitHub JSON sources.

  • Added final LGA resolution logic to ensure consistent downstream usage.

  • Defined strongly typed location models to improve type safety and maintainability.

  • Refactored the complaint form to replace free-text location input with the structured LocationSelector component.

  • Constructed display-ready location strings from structured values prior to API submission.

  • Integrated selector-level validation via an exposed validateLocation() method.

  • Added fallback handling for incomplete or missing LGA data with graceful null checks.

  • Introduced browser debug logs to trace state counts and fallback usage during fetching.

Description

Related Issue

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Tests (adding or updating tests)

How to Test

Screenshots

Checklist

  • I have read the Contributing Guide.
  • My code follows the project's code style.
  • I have tested my changes locally.
  • All existing tests pass (npm run test).
  • I have added tests for new functionality (if applicable).
  • I have updated documentation (if applicable).
  • My changes don't introduce new warnings or errors.

…ernal data fetching

- Added a reusable LocationSelector component to handle State → City/LGA → Street input flow with searchable custom dropdowns.
- Implemented full validation for state, city, LGA, and street address, enforcing required structured location input.
- Enabled two-way form binding by emitting v-model updates from the selector component.
- Applied consistent dark UI styling to dropdowns using layered z-indexing, slate backgrounds, amber borders, and shadow effects.

- Introduced a useLocation composable to centralize location data fetching logic.
- Integrated Nigerian state fetching via the CountriesNow API with client-side caching for performance.
- Implemented city and LGA fetching per selected state, including fallback resolution from multiple public GitHub JSON sources.
- Added final LGA resolution logic to ensure consistent downstream usage.

- Defined strongly typed location models to improve type safety and maintainability.
- Refactored the complaint form to replace free-text location input with the structured LocationSelector component.
- Constructed display-ready location strings from structured values prior to API submission.
- Integrated selector-level validation via an exposed validateLocation() method.

- Added fallback handling for incomplete or missing LGA data with graceful null checks.
- Introduced browser debug logs to trace state counts and fallback usage during fetching.
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.

1 participant