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

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

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.

@oisincoveney oisincoveney requested review from a team September 6, 2024 22:46
Copy link
Contributor

github-actions bot commented Sep 6, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff 44806ac...e3ac4ac.

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
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