Skip to content

Google sheets plugin - image alt text support#673

Merged
djohalo2 merged 11 commits into
mainfrom
feat/google-sheets-image-alt-text-support
Jul 20, 2026
Merged

Google sheets plugin - image alt text support#673
djohalo2 merged 11 commits into
mainfrom
feat/google-sheets-image-alt-text-support

Conversation

@djohalo2

@djohalo2 djohalo2 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

Adds image alt-text support to the Google Sheets plugin, including field mapping, synchronization, persisted assignments, and automatic cleanup when image field types change.

google-sheets-plugin-alt-text.mov

Fixes: #423

Changelog

  • Added support for mapping Google Sheets columns as alt text for CMS image fields.

Testing

  • Image alt text imports correctly
    • Map a text column to an image field as Alt Text
    • Confirm no CMS field is created for the alt-text column
    • Confirm the rendered image has the expected alt value
  • Alt-text mappings persist and update
    • Reopen the plugin and confirm the mapping is restored
    • Change the alt text and run automatic sync
    • Confirm the rendered alt text updates
  • Alt text can be cleared
    • Sync an image with populated alt text
    • Clear the corresponding sheet cell and sync again
    • Confirm the previous alt text is removed
  • Existing collections remain compatible after upgrading
    • Sync without changing field mappings
    • Confirm existing fields, items, images, and ignored columns remain unchanged
  • Mapping changes are handled safely
    • Remap the alt-text column to another image
    • Change the target image to another field type
    • Confirm no stale or incorrect mapping remains
  • Sheet structure changes are handled safely
    • Reorder the mapped columns
    • Rename or remove a mapped column
    • Confirm existing CMS fields are not corrupted

@djohalo2
djohalo2 marked this pull request as ready for review July 20, 2026 09:57
Copilot AI review requested due to automatic review settings July 20, 2026 09:57
@github-actions github-actions Bot added the Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging label Jul 20, 2026
@djohalo2
djohalo2 requested review from tom-james-watson and removed request for Copilot July 20, 2026 09:58

@tom-james-watson tom-james-watson 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.

Great work!

The only problem I see is it lets you assign multiple fields to the same alt text.

Image

I guess the reasonable fix there would be to remove already-used fields from the list?

@djohalo2

Copy link
Copy Markdown
Contributor Author

Great work!

The only problem I see is it lets you assign multiple fields to the same alt text.

Image I guess the reasonable fix there would be to remove already-used fields from the list?

Good point! I agree, let's filter out assigned fields from the list. This also makes it easier to assign if you have multiple images in your table. The only trade off is that switching them is a bit harder, since you will have to manually un assign. But that's more of an edge case.

Copilot AI review requested due to automatic review settings July 20, 2026 11:55

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

Adds image alt-text support to the Google Sheets plugin by introducing a virtual “alt text” column type that can be mapped to an image column, persisted across sessions, and applied during sync by attaching alt to image field data.

Changes:

  • Extend sync schema with altText virtual column configs and persist altTextAssignments in plugin data.
  • Update row processing so alt-text columns don’t create CMS fields and instead populate alt on image field values.
  • Update the field-mapping UI to support choosing “Alt Text → ” via a context-menu selector.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plugins/google-sheets/src/sheets.ts Adds altText virtual type, builds/stores alt-text assignments, and applies alt values when syncing image fields.
plugins/google-sheets/src/pages/MapSheetFields.tsx Updates mapping flow to treat alt-text as virtual (no CMS field) and sends per-column configs to sync.
plugins/google-sheets/src/components/Icons.tsx Adds a chevron-down icon used by the new selector UI.
plugins/google-sheets/src/components/FieldTypeSelectField.tsx New component to choose field types (including alt-text mapping) via context menu.
plugins/google-sheets/src/App.tsx Updates sync-only path to pass columnConfigs (incl. alt-text assignments) into syncSheet.

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

Comment thread plugins/google-sheets/src/components/FieldTypeSelectField.tsx
Comment thread plugins/google-sheets/src/pages/MapSheetFields.tsx
Comment thread plugins/google-sheets/src/App.tsx
@tom-james-watson

Copy link
Copy Markdown
Contributor

Maybe instead it should be disabled instead of removed, actually

@djohalo2

Copy link
Copy Markdown
Contributor Author

Maybe instead it should be disabled instead of removed, actually

I think you're right, should give the user a little more to understand what's happening. What I liked about filtering them out is that for big sheets we kind of make it easier for the user to configure their mapping, but I agree disabling makes more sense.

@djohalo2
djohalo2 added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 4e9135a Jul 20, 2026
9 checks passed
@djohalo2
djohalo2 deleted the feat/google-sheets-image-alt-text-support branch July 20, 2026 13:09
@djohalo2
djohalo2 deployed to production July 20, 2026 13:09 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support image alt text in Google Sheets plugin

3 participants