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 blue focus on text inputs #8343

Merged
merged 12 commits into from
Nov 6, 2024
Merged

Add blue focus on text inputs #8343

merged 12 commits into from
Nov 6, 2024

Conversation

FelixMalfait
Copy link
Member

We removed the blue focus on phone/domain/array/email floating inputs but we want to keep it in the app settings.

Screenshot 2024-11-05 at 15 55 04 Screenshot 2024-11-05 at 15 55 23 Screenshot 2024-11-05 at 15 55 33 Screenshot 2024-11-05 at 15 55 41 Screenshot 2024-11-05 at 15 56 07 Screenshot 2024-11-05 at 15 56 31

@charlesBochet charlesBochet marked this pull request as ready for review November 6, 2024 13:19
@charlesBochet charlesBochet merged commit b627c55 into main Nov 6, 2024
17 of 18 checks passed
@charlesBochet charlesBochet deleted the blue-focus-on-text-inputs branch November 6, 2024 13:23
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR implements consistent text input focus styling across the app settings while removing it from specific input types like phone/domain/array/email floating inputs.

  • Added blue focus state with light blue box shadow in TextInputV2.tsx using theme colors
  • Increased default dropdown width from 160px to 200px across multiple components for better text accommodation
  • Replaced DropdownMenuInput with TextInputV2 in view picker components to maintain consistent styling
  • Added automatic email continuation in SignInUpForm.tsx when no auth providers are available
  • Simplified input visual structure by making icons absolute positioned overlays in TextInputV2.tsx

9 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +76 to +83
if (
signInUpStep === SignInUpStep.Init &&
!authProviders.google &&
!authProviders.microsoft &&
!authProviders.sso
) {
continueWithEmail();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: This side effect should be moved to a useEffect hook to avoid potential render loop issues

Comment on lines +71 to +76
&:focus {
${({ theme }) => {
return `box-shadow: 0px 0px 0px 3px ${RGBA(theme.color.blue, 0.1)};
border-color: ${theme.color.blue};`;
}};
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The focus state uses a semi-transparent blue shadow (0.1 opacity) which may be too subtle for accessibility. Consider increasing the opacity for better visibility.

Comment on lines +56 to 58
padding-left: ${({ theme, LeftIcon }) =>
LeftIcon ? `calc(${theme.spacing(4)} + 16px)` : theme.spacing(2)};
width: 100%;
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The left padding calculation assumes a fixed icon size of 16px. Consider using theme.icon.size.md instead for consistency.

@@ -57,7 +57,7 @@ describe('useDropdown', () => {
wrapper: Wrapper,
});

expect(result.current.dropdownWidth).toBe(160);
expect(result.current.dropdownWidth).toBe(200);
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: default width changed from 160 to 200 - ensure this change is intentional and coordinated with the dropdownWidthComponentState default value

Comment on lines +82 to 89
<TextInputV2
value={viewPickerInputName}
onChange={(event) => {
onChange={(value) => {
setViewPickerIsDirty(true);
setViewPickerInputName(event.target.value);
setViewPickerInputName(value);
}}
autoFocus
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

style: TextInputV2 may need a placeholder prop to match previous DropdownMenuInput behavior

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.

2 participants