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

feat(organizations): add theming/story for Mantine TextInput TASK-1378 #5424

Merged
merged 29 commits into from
Jan 29, 2025

Conversation

RuthShryock
Copy link
Member

@RuthShryock RuthShryock commented Jan 16, 2025

🗒️ Checklist

  1. run linter locally
  2. update all related docs (API, README, inline, etc.), if any
  3. draft PR with a title <type>(<scope>)<!>: <title> TASK-1234
  4. tag PR: at least frontend or backend unless it's global
  5. fill in the template below and delete template comments
  6. review thyself: read the diff and repro the preview as written
  7. open PR & confirm that CI passes
  8. request reviewers, if needed
  9. delete this section before merging

📣 Summary

Add theming and storybook for custom TextInput component.

💭 Notes

  • Mantine has different input types that are all based on the same underlying Input and InputWrapper components. The purpose of this PR is to configure TextInput, but most of the theme work has been done in those two base components so we will hopefully not have to repeat it for other input types.
  • This pr just includes the basic functionalities for a TextInput to work for in our organization task so more work will be needed in the future.

👀 Preview steps

  • Check out storybook and make sure that the TextInput is as similar to our TextBox component in terms of visuals and functionalities.

Akuukis and others added 23 commits December 11, 2024 17:48
to make it easier to migrate existing styles
### 📣 Summary
Adds theming and storybook entry for Mantine Menu component.

### 📖 Description
Adds basic theming for the Mantine Menu component, primarily aimed at
providing necessary style and functionality for use in the organization
members list. In this context, the Menu component will be replacing
KoboDropdown, but the latter is used, for example, as a building block
of KoboSelect, so not all uses of KoboDropdown are under consideration
here.

### 👀 Preview steps
Run storybook and compare "Dropdown" story to the Actions dropdown
(right side icon button) currently used in the organization Member
table.

---------

Co-authored-by: Paulo Amorim <[email protected]>
@pauloamorimbr
Copy link
Contributor

In the docs they suggest to use CSS modules due to performance instead of the vars approach, and also I believe it's clearer to set the CSS directly instead of setting the variables. Just my opinion.

I've created a draft PR with some changes fr us to talk about when possible: https://github.com/kobotoolbox/kpi/pull/5444/files

@jamesrkiger
Copy link
Contributor

@magicznyleszek @pauloamorimbr I have updated this PR after working with Paulo on a better approach:
4d9a78b

I removed the wrapped component. The main reason I used a wrapped component was for replacing right-side icons with an error icon when the input has errors. But our designs don't actually include that right-side error icon, so I decided to stick with a simpler implementation.

Copy link
Contributor

@pauloamorimbr pauloamorimbr left a comment

Choose a reason for hiding this comment

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

2 really simple fixes and it seems ready to go! 💯

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like this file is not being used anymore! 🤔

@jamesrkiger jamesrkiger merged commit f84a9de into main Jan 29, 2025
7 checks passed
@jamesrkiger jamesrkiger deleted the task-1378-mantine-text-input branch January 29, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants