Skip to content

fix: improve full name input styling to match radio buttons #40727

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

Merged
merged 8 commits into from
May 26, 2025

Conversation

jacquesikot
Copy link
Contributor

@jacquesikot jacquesikot commented May 22, 2025

Summary

This PR updates the styling of the user full name input field on the onboarding screen to match the styling of the radio button groups, creating a more consistent and polished UI.

Problem

The full name input field in the onboarding form had inconsistent styling compared to the radio button groups, which created a visually disjointed user experience.

Solution

  • Created a styled version of FormTextField that matches the styling of radio buttons
  • Added proper spacing with a dedicated InputSection component
  • Removed unnecessary vertical spacing elements
  • Ensured consistent typography, sizing, and spacing across form elements

Changes

  • Added StyledFormTextField with custom CSS to match radio button styling:
    • Same font size and weight for labels
    • Consistent height, padding, and border-radius
    • Full width input field
  • Created InputSection for consistent vertical spacing
  • Replaced original FormTextField with the styled version
  • Removed redundant Space components

Screenshots

Before | After

Automation

/ok-to-test tags="@tag.Sanity, @tag.Authentication"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/15205128744
Commit: 6e26d5a
Cypress dashboard.
Tags: @tag.Sanity, @tag.Authentication
Spec:


Fri, 23 May 2025 08:33:29 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • New Features
    • Added a required full name field to the non-super user profiling form, displayed when cloud billing is enabled.
  • Style
    • Improved input field appearance and adjusted vertical spacing for a cleaner form layout.
  • Refactor
    • Streamlined form styling by introducing new styled components and localizing spacing definitions.

@jacquesikot jacquesikot self-assigned this May 22, 2025
Copy link
Contributor

coderabbitai bot commented May 22, 2025

Walkthrough

The update adds a required fullName field to the non-super user profiling form with custom styling via new StyledFormTextField and InputSection components. Validation and error messaging for fullName are implemented. Additionally, a local Space component replaces an imported one in DetailsForm.tsx. A new error message constant is introduced.

Changes

File(s) Change Summary
app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx Added fullName field with validation and error message; introduced StyledFormTextField and InputSection styled components; refactored form layout to use these; adjusted spacing and conditional rendering.
app/client/src/ce/constants/messages.ts Added WELCOME_FORM_FULL_NAME_ERROR_MESSAGE constant returning "Please enter your full name".
app/client/src/pages/setup/DetailsForm.tsx Removed import of external Space component; defined local Space styled component with fixed height.

Suggested labels

Low, Needs Triaging

Poem

A name now asked, with style and care,
Wrapped in forms with space to spare.
Validation guards the entry gate,
Errors prompt to not be late.
Components styled, the code refined,
A smoother form for all to find.
📝✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed63e00 and 6e26d5a.

📒 Files selected for processing (3)
  • app/client/src/ce/constants/messages.ts (1 hunks)
  • app/client/src/pages/setup/DetailsForm.tsx (1 hunks)
  • app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • app/client/src/ce/constants/messages.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/client/src/pages/setup/DetailsForm.tsx (1)
app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (1)
  • Space (71-73)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (2)
app/client/src/pages/setup/DetailsForm.tsx (2)

80-82: Good decoupling of the Space component.

Defining the Space component locally instead of importing it from another file improves component independence and reduces cross-file dependencies.

However, note that the height has changed from 20px (in the original file) to 40px. Verify this spacing change aligns with the intended design.


80-82: Inconsistency between PR objectives and actual changes.

The PR objectives describe styling improvements for full name input fields to match radio buttons, including new StyledFormTextField and InputSection components. However, the only visible change in this file is the local Space component definition.

Likely an incorrect or invalid review comment.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jacquesikot jacquesikot added the ok-to-test Required label for CI label May 22, 2025
@github-actions github-actions bot added the Bug Something isn't working label May 22, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (1)

60-63: Be cautious of component name collision.

There's already an InputSection component in the design system (app/client/packages/design-system/ads/src/Input/Input.styles.tsx). Consider using a more specific name or reusing the existing component to maintain consistency.

-// Input section container for consistent spacing
-const InputSection = styled.div`
+// Container for consistent form section spacing
+const FormSectionContainer = styled.div`
  margin-bottom: ${(props) => props.theme.spaces[10]}px;
`;
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d64361e and a8ae89d.

📒 Files selected for processing (1)
  • app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (2)
app/client/packages/design-system/ads/src/Input/Input.styles.tsx (1)
  • InputSection (75-80)
app/client/src/ce/constants/messages.ts (1)
  • WELCOME_FORM_FULL_NAME (1593-1593)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
🔇 Additional comments (2)
app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx (2)

36-58: Good implementation of a styled input component.

The StyledFormTextField effectively customizes the form input to match the radio button styling with appropriate CSS targeting for width, height, border-radius, padding, and typography.


107-116: Clean implementation of the input field with consistent spacing.

The refactored code improves UI consistency by replacing previously used Space components with a styled container approach.

Comment on lines 36 to 63
// Styled Input to match the radio button group styling
const StyledFormTextField = styled(FormTextField)`
.ads-v2-input {
width: 100%;
max-width: none;
}

.ads-v2-input__input {
height: 36px;
border-radius: var(--ads-v2-border-radius);
padding: var(--ads-v2-spaces-3);
font-size: var(--ads-font-size-4);
width: 100%;
box-sizing: border-box;
}

.ads-v2-input__label {
font-size: var(--ads-font-size-4);
font-weight: var(--ads-font-weight-bold-xl);
color: var(--ads-v2-color-gray-700);
margin-bottom: 0.5rem;
}
`;

// Input section container for consistent spacing
const InputSection = styled.div`
margin-bottom: ${(props) => props.theme.spaces[10]}px;
`;
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify validation for the full name field.

The validation function doesn't include checks for the fullName field. If validation is required, consider adding it to the validation function.

Also applies to: 107-116


🏁 Script executed:

#!/bin/bash
# Check if fullName is used elsewhere for validation
rg "fullName.*validation|validate.*fullName" --type ts

Length of output: 56


To pinpoint where—and if—a validation schema exists (and to confirm whether fullName is included), let’s inspect the profiling questions component directly:


🏁 Script executed:

#!/bin/bash
# Locate the file path
fd NonSuperUserProfilingQuestions.tsx

# Search within that file for any validation logic or schema definitions
rg -n "validate|Yup|validationSchema" app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx

# Check for direct references to fullName in this file
rg -n "fullName" app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx

Length of output: 371


Let’s inspect the validate implementation to confirm what fields are checked:


🏁 Script executed:

#!/bin/bash
# Show the validate function body
rg -n "const validate" -A40 -B5 app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx

Length of output: 1644


Add fullName to the validation schema

The validate function in NonSuperUserProfilingQuestions.tsx (lines 80–94) currently only checks proficiency and useCase, but you’ve added a fullName field (lines 112–116). If fullName is required, update the validator accordingly—for example:

 const validate = (values: any) => {
   const errors: any = {};

   if (!values.proficiency) {
     errors.proficiency = createMessage(WELCOME_FORM_PROFICIENCY_ERROR_MESSAGE);
   }

   if (!values.useCase) {
     errors.useCase = createMessage(WELCOME_FORM_USE_CASE_ERROR_MESSAGE);
   }

+  // Ensure fullName is provided when billing is enabled
+  if (values.isCloudBillingEnabled && !values.fullName?.trim()) {
+    errors.fullName = createMessage(WELCOME_FORM_FULL_NAME_ERROR_MESSAGE);
+  }

   return errors;
 };

• File: app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx
• Validator: lines 80–94
• fullName input: lines 112–116

🤖 Prompt for AI Agents
In app/client/src/pages/setup/NonSuperUserProfilingQuestions.tsx around lines 80
to 94, the validate function currently checks only proficiency and useCase
fields but does not validate the fullName field added at lines 112 to 116. To
fix this, update the validate function to include validation logic for fullName,
ensuring it checks for required input or any other necessary constraints
consistent with the other fields.

@jacquesikot jacquesikot merged commit ed940a6 into release May 26, 2025
45 checks passed
@jacquesikot jacquesikot deleted the feat/improve-ui-of-signup-user-name-input branch May 26, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants