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

Formula response types #15002

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

mike12345567
Copy link
Collaborator

Description

As demonstrated in watercooler - lab day work to support formula response types.

Currently formulas will generally return strings, the only exception is dynamic Javascript formulas can return native types, however it is quite undefined. Having a method to actually define what the response means that we can coerce the results to check they fit this result type.

For now I've restricted to a couple of core primitive types that can be returned from the rows API - strings, numbers, booleans and datetimes.

This is done at the API layer, so all rows returned from internal/external tables with a formula will now have the correct primitive type based on what is set. Formulas without anything set will continue to have the exact functionality they have today (HBS string, JS less defined).

This also means handlebars can actually return a primitive now from a formula, which can be very helpful.

Screenshots

UI:
image

Grid correctly representing formulas of these response types:
image

@mike12345567 mike12345567 self-assigned this Nov 8, 2024
@mike12345567 mike12345567 requested a review from a team as a code owner November 8, 2024 15:16
@mike12345567 mike12345567 requested review from samwho and removed request for a team November 8, 2024 15:16
Copy link

qa-wolf bot commented Nov 8, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@github-actions github-actions bot added the firestorm Data/Infra/Revenue Team label Nov 8, 2024
@github-actions github-actions bot added the size/m label Nov 8, 2024
Copy link
Member

@aptkingston aptkingston left a comment

Choose a reason for hiding this comment

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

Frontend changes LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firestorm Data/Infra/Revenue Team size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants