Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add google sheets field selection in settings #259

Merged
merged 11 commits into from
Dec 27, 2024

Conversation

shekharnwagh
Copy link
Contributor

@shekharnwagh shekharnwagh commented Dec 20, 2024

Description

Enhancements

  • Extracted field selection input to common FieldsSelection component which can be reused for other data sources (Google Sheets and Airtable for now) (299a7a5)

  • Added custom help text for field selection input to show hints and custom messages (61431f4)

  • Added field selection input for Google Sheets data source. This doesn't yet auto-register blocks for this data source like it happends for Airtable. That would be added in a separate PR. (2b51404)

    Screenshot 2024-12-27 at 12 36 45 AM
    Google Sheets settings form with field selection input

Bugfixes

  • Fixed failure to generate token due to incorrectly parsed credentials input to and from Object to JSON string (bf99106)
  • Fixed form state management for Google Sheets data source add/edit form which prevented creating/editing Google Sheets data source (bf99106)

Testing

  • Before checking out this branch, delete all the existing Google Sheets data sources configured using the plugin settings page. This is required as the new storage schema for Google Sheets Service Config has breaking changes.
  • Start the local development environment (docs)
  • Try adding a new Google Sheets data source using the plugin settings page and verify that:
    • It works without any bugs and that you are able to select fields for the selected sheet.
    • When the fields are selected and you change the spreadsheet, the Sheet and Fields inputs are reset.
    • When the fields are selected and you change the sheet, the Fields input is reset.
    • If the sheet input is not selected, the Fields input is disabled.
    • When the sheet input is selected, the help text for the Fields input shows the message Fetching fields... until the fields are fetched. After the fields are fetched, the input should be enabled and the help text should change to hint regarding the Fields input.

@shekharnwagh shekharnwagh self-assigned this Dec 20, 2024
@shekharnwagh shekharnwagh force-pushed the add/google-sheets-fields-selection branch from 5799e8a to bf99106 Compare December 20, 2024 21:01
@shekharnwagh shekharnwagh marked this pull request as ready for review December 26, 2024 19:15
@chriszarate
Copy link
Member

@shekharnwagh I pushed up some type safety improvements in 97528bd. Notably it adds type safety to handleOnChange.

@shekharnwagh shekharnwagh merged commit 5e9a8e2 into trunk Dec 27, 2024
11 checks passed
@shekharnwagh shekharnwagh deleted the add/google-sheets-fields-selection branch December 27, 2024 09:37
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.

2 participants