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

Input/refactor #278

Merged
merged 2 commits into from
Aug 20, 2024
Merged

Input/refactor #278

merged 2 commits into from
Aug 20, 2024

Conversation

tulsiojha
Copy link
Contributor

@tulsiojha tulsiojha commented Aug 20, 2024

Summary by Sourcery

Refactor input components to include a 'size' prop for flexible sizing, standardize input field sizes, and enhance code readability with trailing commas.

Enhancements:

  • Add a 'size' prop to various input components to allow for more flexible sizing options.
  • Standardize the size of input fields across multiple components by setting a default size of 'lg'.
  • Improve code readability and maintainability by adding trailing commas in multi-line object and array definitions.

Copy link

sourcery-ai bot commented Aug 20, 2024

Reviewer's Guide by Sourcery

This pull request focuses on refactoring input components and improving consistency across the codebase. The main changes include adding a 'size' prop to various input components, adjusting styling for different input sizes, and making minor code formatting improvements.

File-Level Changes

Files Changes
src/apps/console/routes/_main+/$account+/new-managed-service/_index.tsx
src/apps/console/routes/_main+/$account+/managed-services/handle-backend-service.tsx
src/apps/console/components/name-id-view.tsx
src/apps/console/routes/_main+/$account+/msvc+/$msv+/settings+/general/route.tsx
src/apps/console/routes/_main+/$account+/settings+/image-pull-secrets/handle-image-pull-secret.tsx
Added 'size' prop to input components for consistent sizing across the application
src/design-system/components/atoms/input.tsx Updated styling for different input sizes in the TextInputBase component
src/apps/console/routes/_main+/$account+/new-managed-service/_index.tsx
src/apps/console/routes/_main+/$account+/managed-services/handle-backend-service.tsx
src/apps/console/components/name-id-view.tsx
src/apps/console/routes/_main+/$account+/msvc+/$msv+/settings+/general/route.tsx
src/apps/console/components/search-box.tsx
Improved code formatting, including adding trailing commas and adjusting indentation

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @tulsiojha - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -53,8 +54,9 @@ export const NameIdView = forwardRef<HTMLInputElement, INameIdView>(
isUpdate,
handleChange,
nameErrorLabel,
size = 'lg',
Copy link

Choose a reason for hiding this comment

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

suggestion: Consider using a constant for the default size value

Using a constant (e.g., DEFAULT_INPUT_SIZE = 'lg') for the default size would make it easier to maintain and update this value across the application in the future.

Suggested change
size = 'lg',
const DEFAULT_INPUT_SIZE = 'lg';
// ... other code ...
size = DEFAULT_INPUT_SIZE,

@tulsiojha tulsiojha merged commit 26ac2b5 into release-v1.0.5 Aug 20, 2024
5 checks passed
@tulsiojha tulsiojha deleted the input/refactor branch August 20, 2024 05:57
abdheshnayak pushed a commit that referenced this pull request Oct 28, 2024
tulsiojha added a commit that referenced this pull request Nov 1, 2024
abdheshnayak pushed a commit that referenced this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant