Skip to content

Conversation

nadr0
Copy link
Contributor

@nadr0 nadr0 commented Aug 12, 2025

issue

Provide a faster shorthand for common domains for our application

implementation

  • Added 3 supported domains as fast click options
  • Added a show advanced options to set the custom domain and pool
  • Used the headless v1.7 UI for the radio group
  • Fixed dark mode CSS in the input fields for the domain and pool, they were not supported properly
  • The 3 radio options will be synced to environment.txt or the domain input field so it will automatically highlight and sync the input field if they open the custom option
Screenshot from 2025-08-12 10-02-07

New logo icons with bg stuff

Image updates

image image

@nadr0 nadr0 requested a review from a team as a code owner August 12, 2025 15:30
Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
modeling-app Ready Ready Preview Comment Aug 29, 2025 2:16pm

@nadr0 nadr0 changed the title chore: Improve supported domain initial workflow chore: improve supported domain initial workflow Aug 12, 2025
@franknoirot
Copy link
Contributor

franknoirot commented Aug 12, 2025

Sorry not at my laptop, tiny CSS feedback:

  1. Add some inline padding to the text inputs like px-1 or 2
  2. I think in dark mode the whit non-selected options are popping more than the blue selected option. Is there any reason we can't leave those without a background? If one option is always selected it'll imply the others are clickable.
  3. I don't think we use that big of a border radius on UI anywhere else, could you try bumping the options' radius down to something like rounded? I could be convinced to leave it though
  4. When it's open "show" advanced options doesn't make as much sense. Would Advanced options say enough?
  5. Add a bit more vertical padding between the two groups of controls if you can, and between the advanced options items to let it breathe a bit more

Comment on lines 41 to 43
className={`text-xs px-1 ${
checked ? 'text-white' : 'text-white'
}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

The conditional class assignment here is redundant since both branches apply text-white. This appears to be unintentional, as the text color should typically differ between selected and unselected states. Consider updating to something like:

className={`text-xs px-1 ${checked ? 'text-white' : 'text-chalkboard-70'}`}

This would provide better visual distinction between the selected and unselected radio options.

Suggested change
className={`text-xs px-1 ${
checked ? 'text-white' : 'text-white'
}`}
className={`text-xs px-1 ${
checked ? 'text-white' : 'text-chalkboard-70'
}`}

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yarp I fixed it.

Advanced options
<CustomIcon
name="caretDown"
className={`w-4 h-4 ${!showCustomInput ? '' : 'ui-open:rotate-180'} `}
Copy link
Contributor

Choose a reason for hiding this comment

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

The ui-open:rotate-180 class is designed for Headless UI disclosure components where the ui-open: modifier is automatically applied. Since this is a standard button toggle using React state, the rotation should be directly tied to the state variable:

className={`w-4 h-4 ${showCustomInput ? 'rotate-180' : ''}`}

This will ensure the caret rotates correctly when the advanced options are toggled.

Suggested change
className={`w-4 h-4 ${!showCustomInput ? '' : 'ui-open:rotate-180'} `}
className={`w-4 h-4 ${showCustomInput ? 'rotate-180' : ''} `}

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Comment on lines +171 to +179
{showCustomInput && (
<Combobox.Input
className="gap-1 rounded h-6 border px-2 flex items-center dark:hover:bg-chalkboard-80 text-xs text-chalkboard-70 dark:text-chalkboard-30 dark:bg-chalkboard-90"
placeholder="auto"
onChange={(event) =>
setSelectedEnvironment(event.target.value)
}
/>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

UI State Synchronization Issue

There's a potential state synchronization issue between the radio group selection and the custom domain input. When a user:

  1. Selects a predefined domain via the radio group
  2. Opens advanced options (the custom input will show this selected value)
  3. Closes advanced options without modifying the input

The application maintains the selectedEnvironment value but the UI no longer clearly indicates which input method is active. This creates a disconnected state where the selected value exists but isn't visibly represented in the UI.

Consider one of these approaches:

  • Maintain separate state for radio selection vs. custom input, with logic to reconcile them
  • Add synchronization logic to ensure the radio group reflects the current selectedEnvironment when toggling advanced options
  • Implement a clear visual indication of which input method is currently controlling the domain value

This would improve the user experience by maintaining a consistent relationship between the UI state and the underlying domain value.

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@pierremtb
Copy link
Contributor

@nadr0 Could you check the conflicts when you have a chance? Ty!

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.

4 participants