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

Table and AreaChart components for React #362

Merged
merged 1 commit into from
May 7, 2024
Merged

Conversation

csansoon
Copy link
Contributor

@csansoon csansoon commented May 2, 2024

Describe your changes

Added support for visualization components to react.

For this one, only Table and AreaChart were implemented. More visualizations will be implemented in a different PR.

@csansoon csansoon added the WIP label May 2, 2024
Copy link

changeset-bot bot commented May 2, 2024

🦋 Changeset detected

Latest commit: 0538c15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@latitude-data/svelte Patch
@latitude-data/client Patch
@latitude-data/react Minor
@latitude-data/server Patch
example-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@csansoon csansoon changed the base branch from main to improved-theming-api-and-docs May 2, 2024 07:45
@csansoon csansoon force-pushed the improved-theming-api-and-docs branch 2 times, most recently from 756fd69 to a666591 Compare May 2, 2024 08:05
@csansoon csansoon changed the title React components React visualization components May 2, 2024
@csansoon csansoon force-pushed the react-components branch 5 times, most recently from e55b4ea to 9ab566b Compare May 2, 2024 13:59
@geclos
Copy link
Contributor

geclos commented May 2, 2024

Don't bundle all the components in this PR, merge as you go so that we can begin QAing as we ship stuff. Also easier to review.

@csansoon csansoon force-pushed the improved-theming-api-and-docs branch 2 times, most recently from bc298f1 to 89aae27 Compare May 3, 2024 08:44
@csansoon csansoon force-pushed the react-components branch 2 times, most recently from 705e701 to db0ae52 Compare May 3, 2024 09:11
@csansoon csansoon force-pushed the improved-theming-api-and-docs branch from 89aae27 to 47be7b5 Compare May 3, 2024 09:12

function QueryTable({ queryPath, params, download = false, tanstaskQueryOptions, ...rest }: Props) {
const { data, isLoading, error, download: downloadFn } = useQuery({ queryPath, params, tanstaskQueryOptions })
const result = useMemo(() => new QueryResult(data), [data])
Copy link
Contributor

Choose a reason for hiding this comment

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

Should useQuery return query result? I guess is something we're going to do everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think it should...

Copy link
Contributor

Choose a reason for hiding this comment

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

just wrap useQuery in another hook and use that to avoid repetition. We can explore a breaking change further down the line.

@geclos
Copy link
Contributor

geclos commented May 3, 2024

image

@csansoon 🔴 1k lines should be enough for this PR

@csansoon csansoon changed the base branch from improved-theming-api-and-docs to basic-react-components May 3, 2024 10:15
@csansoon csansoon force-pushed the basic-react-components branch 5 times, most recently from 66a0b79 to ea94dca Compare May 7, 2024 12:35
Base automatically changed from basic-react-components to next May 7, 2024 12:57
@csansoon csansoon force-pushed the react-components branch 10 times, most recently from d5617b6 to e83100e Compare May 7, 2024 14:31
Copy link
Contributor

@geclos geclos left a comment

Choose a reason for hiding this comment

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

looks good!

@csansoon csansoon force-pushed the react-components branch 2 times, most recently from 15f5fae to de462fa Compare May 7, 2024 15:00
@csansoon csansoon merged commit c26e405 into next May 7, 2024
4 checks passed
@csansoon csansoon deleted the react-components branch May 7, 2024 15:15
@github-actions github-actions bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants