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

Typing grid clipboard store #15250

Merged
merged 5 commits into from
Dec 31, 2024
Merged

Typing grid clipboard store #15250

merged 5 commits into from
Dec 31, 2024

Conversation

adrinr
Copy link
Collaborator

@adrinr adrinr commented Dec 27, 2024

Description

Typing grid clipboard store

Copy link

qa-wolf bot commented Dec 27, 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 firestorm Data/Infra/Revenue Team size/s labels Dec 27, 2024
@adrinr adrinr requested a review from aptkingston December 30, 2024 10:52
| {
value: string | null | undefined
multiCellCopy: false
}
Copy link
Member

Choose a reason for hiding this comment

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

This is really cool - I didn't know you can basically conditionally type it based on the value of another field like this.

const clipboard = writable({
type ClipboardStoreData =
| {
value: string[][]
Copy link
Member

Choose a reason for hiding this comment

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

value here can be any cell value, so it doesn't need to just be a string. We could be specific about the range possible types but it can be any data type that we support, so any is probably appropriate.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that the value would always be stringified. Updated to any

@adrinr adrinr requested a review from aptkingston December 30, 2024 21:20
Base automatically changed from typing/stores-grid-ui to master December 31, 2024 10:24
@adrinr adrinr merged commit c5f1334 into master Dec 31, 2024
11 checks passed
@adrinr adrinr deleted the typing/stores-grid-clipboard branch December 31, 2024 10:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
firestorm Data/Infra/Revenue Team size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants