Skip to content

Conversation

@LaiArturs
Copy link

This PR adds native support for geopoint properties in FireCMS, addressing the need to store and edit geographic coordinates without custom implementations.

Changes

Geopoint Property Support

  • Implements GeopointFieldBinding component with dual number inputs for latitude and longitude
  • Adds GeopointPropertyPreview component for displaying coordinates in tables and cards
  • Provides geopoint utility functions for parsing, formatting, and normalizing coordinate values
  • Integrates geopoint into default field configurations with LocationOnIcon
  • Updates documentation with usage examples, validation rules, and API references

Features:

  • Built-in validation for latitude (-90 to 90) and longitude (-180 to 180)
  • Formatted coordinate display (e.g., "37.7749, -122.4194")
  • Support for clearable option
  • Compatible with existing GeoPoint class from Firestore

Example usage:

location: buildProperty({
    name: "Location",
    dataType: "geopoint",
    validation: { required: true }
})

Editor Package Fixes

  • Fixes TypeScript build errors in the editor package that were blocking compilation
  • Adds missing @tiptap/extension-list and @tiptap/extensions dependencies
  • Adds type annotations where TipTap type definitions are incomplete

Closes #112

- Add type annotations to Placeholder extension callback parameters
- Cast editor chain commands to any for list toggle methods missing from type definitions
- Add @tiptap/extension-list dependency required by list extensions
- Add @tiptap/extensions dependency required by placeholder extension
Implement full support for geopoint properties in FireCMS, allowing users to store and edit geographic coordinates (latitude/longitude pairs).

Changes:
- Add GeopointFieldBinding component with dual number inputs for latitude and longitude
- Add GeopointPropertyPreview component for displaying coordinates
- Add geopoint utility functions (parse, format, normalize, getGeoPointCoordinates)
- Add geopoint to default field configurations with LocationOnIcon
- Add geopoint rendering in PropertyPreview component
- Add geopoint default value handling in entities utilities
- Update geopoint documentation with usage examples and validation details

The geopoint field includes built-in validation:
- Latitude: -90 to 90
- Longitude: -180 to 180
- Formatted display: "37.7749, -122.4194"
@0xjgv 0xjgv requested a review from fgatti675 January 9, 2026 09:55
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.

Geopoint support

1 participant