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

Add mantine theme #1287

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Add mantine theme #1287

wants to merge 8 commits into from

Conversation

ErnestTeluk
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the Area: Infra Affects the repository itself (e.g., CI, dependencies) label Oct 10, 2023
package.json Outdated Show resolved Hide resolved
packages/uniforms-mantine/README.md Show resolved Hide resolved
packages/uniforms-mantine/__tests__/index.ts Show resolved Hide resolved
packages/uniforms-mantine/package.json Outdated Show resolved Hide resolved
packages/uniforms-mantine/src/AutoField.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot added the Area: Docs Affects the documentation or reproductions seed label Oct 10, 2023
@MDrooker
Copy link

MDrooker commented Mar 7, 2024

Was this abandoned?

@ErnestTeluk
Copy link
Contributor Author

ErnestTeluk commented Mar 8, 2024

No, I will get back to it next week. We must wait for the bump React to v18.

@ErnestTeluk ErnestTeluk self-assigned this Mar 15, 2024
Copy link
Collaborator

@piotrpospiech piotrpospiech left a comment

Choose a reason for hiding this comment

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

  1. List items should be full width.
image
  1. Delete button in the ListField has weird position.
image
  1. NestField label is <p> tag. We usually use label there. Only in the material and MUI we used a different tag - legend.

class _ extends parent {
static Mantine = Mantine;

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions -- comes from uniform's core
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this eslint comment needed? I didn't see it previously in other themes.

parent.onChange(value);
}}
>
<IconTrash size="1rem" color="white" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

In other themes, we have icon props with default value. You did it like this in the ListAddField.

required={tooltip ? false : required}
error={showInlineError && !!error && errorMessage}
>
<ListMantine listStyleType="none" w="100%" {...filterDOMProps(props)}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

You did List as ListMantine, but in RadioField you wrote Radio as MantineRadio. Stick to one convention.

placeholder={placeholder}
required={required ?? false}
defaultValue={[]}
value={value as string[]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't be forced to do that.

placeholder={placeholder}
required={required ?? false}
defaultValue={null}
value={value as string}
Copy link
Collaborator

Choose a reason for hiding this comment

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

as above


return (
<Button
mb="xs"
Copy link
Collaborator

Choose a reason for hiding this comment

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

In other themes, we don't add margin to the SubmitField

);
}

Text.defaultProps = { type: 'text' };
Copy link
Collaborator

Choose a reason for hiding this comment

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

defaultProps is deprecated. Set the default type value when destructuring props.

placeholder={placeholder}
readOnly={readOnly}
ref={inputRef}
type={type ?? 'text'}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove it. It should be by default text if not defined.

ref={inputRef}
type={type ?? 'text'}
value={value ?? ''}
w="100%"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have full width by default in other themes? Material theme receives fullWidth from theme props, for example.

@@ -0,0 +1,30 @@
import React from 'react';
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the multiple files you imported React, but it isn't used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Docs Affects the documentation or reproductions seed Area: Infra Affects the repository itself (e.g., CI, dependencies)
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants