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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

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 and this implementation is just for the TextInput. So, in the storybook, there is no option to change the type of input.
  • 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.
  • The Icon color styling in the TextInput was tricky and the simplest implementation was to use our custom IconColors so the icon color does not match perfectly to the TextBox icon color.

👀 Preview steps

  • Check out storybook and make sure that the TextInput is as similar to our TextBox component in terms of visuals and functionalities.
  • If you want to test a TextInput in action, edit the Project Name TextBox to be a TextInput in projectSettings.es6:
import {TextInput} from 'js/components/common/TextInput';

  {/* Project Name */}
  <div className={styles.input}>
      <TextInput
          value={this.state.fields.name}
          onChange={this.onNameChange.bind(this)}
          error={this.hasFieldError('name') ? t('Please enter a title for your project!') : false}
          label={addRequiredToLabel(this.getNameInputLabel(this.state.fields.name))}
          placeholder={t('Enter title of project here')}
          data-cy='title'
      />
  </div>
          

verify that...

  • the project name is correctly updated when changed
  • errors are displayed for an empty input

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

4 participants