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

Edit Company Name Offset Input #5416

Closed
brendanlaschke opened this issue May 14, 2024 · 2 comments · Fixed by #5426
Closed

Edit Company Name Offset Input #5416

brendanlaschke opened this issue May 14, 2024 · 2 comments · Fixed by #5426
Labels
T type: bug Something isn't working

Comments

@brendanlaschke
Copy link
Contributor

Bug Description

Bildschirmfoto 2024-05-14 um 13 46 59

Offset of input.

Expected behavior

Input should be centered.

@brendanlaschke brendanlaschke added the type: bug Something isn't working label May 14, 2024
Copy link

greptile-apps bot commented May 14, 2024

Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).
To fix the offset issue for the company name input, follow these steps:

  1. Locate the FieldInput component in /packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx.
  2. Identify the specific input component used for the company name. It is likely one of the text input components such as TextFieldInput.
  3. Navigate to the relevant input component in /packages/twenty-front/src/modules/ui/input/components/TextInput.tsx or similar.
  4. Adjust the CSS styling to ensure the input is centered. For example, you can add or modify the style or className prop to include centering styles:
const StyledTextInput = styled.input`
  display: block;
  margin: 0 auto;
  text-align: center;
`;
  1. Apply the StyledTextInput to the input component:
<TextInput className={StyledTextInput} {...props} />

This should center the input field as expected.

References

/packages/twenty-front/src/modules/object-record/record-field/components/FieldInput.tsx
/packages/twenty-front/src/modules/ui/input/components

Ask Greptile

@FelixMalfait
Copy link
Member

FelixMalfait commented May 15, 2024

Good catch!

Screenshot 2024-05-15 at 07 53 38

Could be linked to this which we just merged: #4789

@FelixMalfait FelixMalfait added the T label May 15, 2024
charlesBochet pushed a commit that referenced this issue May 15, 2024
## Description

This PR fixes a display issue when editing the company name or the name
of a person where the edit input would be offset to the left instead of
being in the middle.


![image](https://github.com/twentyhq/twenty/assets/36916632/beb91dc1-2d3c-46a5-93aa-f8189913fece)

Fixes #5416

### Type of change

<!-- Please delete options that are not relevant. -->

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T type: bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants
@FelixMalfait @brendanlaschke and others