Skip to content

Add option field to Google Sheets#617

Merged
madebyisaacr merged 4 commits intomainfrom
sheets-option-field
Apr 7, 2026
Merged

Add option field to Google Sheets#617
madebyisaacr merged 4 commits intomainfrom
sheets-option-field

Conversation

@madebyisaacr
Copy link
Copy Markdown
Collaborator

@madebyisaacr madebyisaacr commented Apr 3, 2026

Description

This pull request adds the option field type to Google Sheets.

Originally I was working on finishing #608 but after fixing the bugs, the code was too complex and the logic was hard to follow. So I started over from scratch with a simpler solution.

Notes:

  • If there are any empty cells, a "None" option is added as the first case.
  • Cases are sorted alphabetically.
  • Cases are updated on each sync.

Slack thread: https://framer-team.slack.com/archives/C06L5H5ADK2/p1774388000311629

Changelog

  • Added option field type.

Testing

Testing sheet - I used the status column as an option field: https://docs.google.com/spreadsheets/d/1qfTkbZqlAzmGmW3SpaYASdu8qWKmKFrxGCvO8YIdblo/edit?gid=0#gid=0

  • Import a sheet with an option field
  • Edit a cell and clear a cell in the column
  • Re-sync the sheet and make sure the option cases were updated

@github-actions github-actions bot added the Auto submit to Marketplace on merge Submits the plugin to the marketplace after merging label Apr 3, 2026
disabled={!isAllowedToManage}
title={isAllowedToManage ? undefined : "Insufficient permissions"}
className="whitespace-nowrap inline-block"
className={cx("whitespace-nowrap", !isPending && "inline-block")}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a fix for the loading spinner being left aligned instead of centered. Not related to the other changes in this PR.

@madebyisaacr madebyisaacr changed the title Add option field Add option field to Google Sheets Apr 4, 2026
@madebyisaacr madebyisaacr assigned kaloyanvi and unassigned kaloyanvi Apr 4, 2026
@madebyisaacr madebyisaacr requested a review from kaloyanvi April 4, 2026 15:13
Comment thread plugins/google-sheets/src/sheets.ts Outdated

const uniqueHeaderRowNames = generateUniqueNames(headerRow)
const enrichedFields = enrichFieldsWithEnumCases(fields, uniqueHeaderRowNames, rows)
const needsFieldSchemaUpdate = !configureFields || enrichedFields.some(field => field.type === "enum")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

configureFields is always false since we never pass it, so this const always evaluates to true.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do we need to pass configureFields: true in the onSubmit handler on L235?

Comment thread plugins/google-sheets/src/sheets.ts Outdated
Copy link
Copy Markdown
Collaborator

@kaloyanvi kaloyanvi left a comment

Choose a reason for hiding this comment

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

Left a few comments, as a whole it looks good if we fix those 💪🏻

@madebyisaacr
Copy link
Copy Markdown
Collaborator Author

@kaloyanvi I fixed configureFields, can you check again?

Copy link
Copy Markdown
Collaborator

@kaloyanvi kaloyanvi left a comment

Choose a reason for hiding this comment

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

Nice one!

@madebyisaacr madebyisaacr added this pull request to the merge queue Apr 7, 2026
@madebyisaacr madebyisaacr removed this pull request from the merge queue due to a manual request Apr 7, 2026
@madebyisaacr madebyisaacr added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit 3887077 Apr 7, 2026
10 of 12 checks passed
@madebyisaacr madebyisaacr deleted the sheets-option-field branch April 7, 2026 09:03
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.

2 participants