Skip to content

add frontend for fetching type conversion#2987

Merged
jgao54 merged 7 commits into
mainfrom
type-conversion-frontend
May 30, 2025
Merged

add frontend for fetching type conversion#2987
jgao54 merged 7 commits into
mainfrom
type-conversion-frontend

Conversation

@jgao54

@jgao54 jgao54 commented May 29, 2025

Copy link
Copy Markdown
Contributor

Create frontend for custom column type conversion..

It creates a dropdown of possible conversions determined by the backend. Right now only numeric -> string is supported.
If there are no available conversion, the option for use custom column destination type will be hidden.

Screenshot 2025-05-29 at 06 36 32@2x

Test: locally created a table that contains column with numeric type, create ClickPipe via UI, and see CH table get created with String type.

@jgao54 jgao54 requested a review from Amogh-Bharadwaj May 29, 2025 16:39
@jgao54 jgao54 force-pushed the type-conversion-frontend branch from 17e90ff to 007c8fb Compare May 29, 2025 21:44
@jgao54 jgao54 changed the base branch from main to type-conversion-api May 29, 2025 21:44
@jgao54 jgao54 force-pushed the type-conversion-frontend branch from 007c8fb to dc7d7ca Compare May 30, 2025 00:30
@jgao54 jgao54 requested a review from serprex May 30, 2025 00:32
@jgao54 jgao54 marked this pull request as ready for review May 30, 2025 00:32
@jgao54 jgao54 force-pushed the type-conversion-frontend branch from dc7d7ca to affb62c Compare May 30, 2025 00:34

@jgao54 jgao54 May 30, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note: the maxHeight was blocking the dropdown lists from being fully visible, so removed it here.

@jgao54 jgao54 force-pushed the type-conversion-frontend branch from affb62c to 9fbf048 Compare May 30, 2025 01:08
Comment on lines 56 to 63

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why not memo?

@serprex serprex May 30, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
return destinationTypeMapping[col] || [];
return destinationTypeMapping[col] ?? [];

& elsewhere

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this should be fixed (potentially split out as separate PR)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with the useMemo trick.

@jgao54 jgao54 changed the base branch from type-conversion-api to main May 30, 2025 15:50
@jgao54 jgao54 changed the base branch from main to type-conversion-api May 30, 2025 15:51
@jgao54 jgao54 requested review from heavycrystal and serprex May 30, 2025 17:07
@jgao54 jgao54 force-pushed the type-conversion-api branch from a2f40a6 to b484551 Compare May 30, 2025 22:44
Base automatically changed from type-conversion-api to main May 30, 2025 22:56
jgao54 added a commit that referenced this pull request May 30, 2025
Implement the backend to support [type conversion
frontend](#2987)
@jgao54 jgao54 force-pushed the type-conversion-frontend branch from b988a83 to 319dbe7 Compare May 30, 2025 23:02
@jgao54 jgao54 merged commit 1e40a1e into main May 30, 2025
12 checks passed
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.

3 participants