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

Convert ChartType components to Mantine #47745

Merged
merged 44 commits into from
Sep 27, 2024
Merged

Conversation

oisincoveney
Copy link
Contributor

Converts the ChartType components to Mantine. This will help us with theming and customization within the Embedding SDK, and also just gives us a few more Mantine components to work with 😄

oisincoveney and others added 27 commits September 4, 2024 14:56
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After playing around with this type, I've noticed that we don't use it, and it produces some very sketchy looking buttons. We're better off using the default filled variant and specifying a color.

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff d489654...fe78c1e.

Notify File(s)
@kdoh frontend/src/metabase/ui/components/buttons/ActionIcon/ActionIcon.styled.tsx
frontend/src/metabase/ui/components/utils/Space/index.ts
frontend/src/metabase/ui/components/utils/index.ts

Base automatically changed from split-files-in-chart-type-sidebar to master September 6, 2024 23:18
Copy link
Member

@alxnddr alxnddr left a comment

Choose a reason for hiding this comment

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

Looks great! Please have a look at a couple of minor comments

import { ChartTypeOption, type ChartTypeOptionProps } from "../ChartTypeOption";

export type ChartTypeListProps = {
visualizationList: ChartTypeOptionProps["visualizationType"][];
Copy link
Member

Choose a reason for hiding this comment

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

nit: using just underlying types like CardDisplayType here would be a bit more readable

};

describe("ChartTypeOption", () => {
Object.entries(EXPECTED_VISUALIZATION_VALUES).forEach(
Copy link
Member

Choose a reason for hiding this comment

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

EXPECTED_VISUALIZATION_VALUES is an object where key is also in the value. Wdyt about making it an array, and then using it.each(EXPECTED_VISUALIZATION_VALUES)? It would help to remove type casts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes!

@oisincoveney oisincoveney added the no-backport Do not backport this PR to any branch label Sep 17, 2024
@oisincoveney oisincoveney requested a review from a team as a code owner September 23, 2024 16:18
@oisincoveney oisincoveney requested a review from a team September 25, 2024 15:54
@oisincoveney oisincoveney merged commit a387bc6 into master Sep 27, 2024
122 checks passed
@oisincoveney oisincoveney deleted the mantine/chart-type-migration branch September 27, 2024 09:06
@github-actions github-actions bot added this to the 0.51 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/Embedding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants