Skip to content

Conversation

@fridgepoet
Copy link
Contributor

@fridgepoet fridgepoet commented Dec 2, 2025

This PR makes it possible to choose a default spreadsheet ID in the Config Editor.
Once the datasource is saved, the user can use the dropdown menu (similar to the Query Editor) and choose the default query. They do need to save again.

This closes #108

Screenshot 2025-12-02 at 17 37 39 Screenshot 2025-12-02 at 17 37 48 Screenshot 2025-12-02 at 17 38 14

@fridgepoet fridgepoet marked this pull request as ready for review December 3, 2025 11:22
@fridgepoet fridgepoet requested a review from a team as a code owner December 3, 2025 11:22
@fridgepoet fridgepoet changed the title Add default spreadsheet ID to config editor feature: add default spreadsheet ID to config editor Dec 9, 2025
@yesoreyeram yesoreyeram self-assigned this Dec 12, 2025
@fridgepoet
Copy link
Contributor Author

fridgepoet commented Dec 15, 2025

Sorry, merged in #377 but forgot it could be a separate PR (on main instead later). Let me know if you want me to separate it and if I need to redo the changelog.

@yesoreyeram yesoreyeram self-requested a review December 15, 2025 13:20
@yesoreyeram yesoreyeram moved this to In Progress in OSS Big Tent Dec 16, 2025
Comment on lines 154 to 162
const options = await datasource.getSpreadSheets();
const { query } = this.props;
if (query.spreadsheet) {
const matchingOption = options.find((opt) => opt.value === query.spreadsheet);
if (matchingOption && this.state.selectedSheetOption !== matchingOption) {
this.setState({ selectedSheetOption: matchingOption });
}
}
return options;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems we are duplicating the code here. Can we extract into function reuse along with updateSelectedSheetOption

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you check and see if it's what you had in mind?

Copy link
Contributor

@yesoreyeram yesoreyeram left a comment

Choose a reason for hiding this comment

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

Thanks @fridgepoet . Sorry this took long. Overall LGTM. some nit changes needed for consistency.

@yesoreyeram yesoreyeram moved this from In Progress to Awaiting Response in OSS Big Tent Dec 16, 2025
@fridgepoet
Copy link
Contributor Author

No problem, thanks for having a look @yesoreyeram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting Response

Development

Successfully merging this pull request may close these issues.

Default Sheet ID

4 participants