-
Couldn't load subscription status.
- Fork 364
groups: better ship search validation #3998
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
groups: better ship search validation #3998
Conversation
|
hope you don't mind me pushing over it. tl;dr is that the lack of separation between the textfield state and the selected state made things a little awkward. Refactored to store them separately and |
|
cc: @tylershuster can you review my changes? |
|
Sure...Where are they? |
|
oh lol i can't push to your repo |
|
I also don’t see the pushed changes here. They exist in limbo …
—
~haddef-sigwen
https://urbit.org
… On Nov 24, 2020, at 11:10 PM, Tyler Shuster ***@***.***> wrote:
Sure...Where are they?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
Reference: |
|
@tylershuster could you cherrypick the changes onto your branch? |
|
Yeah, this looks good. Like I said, I'm not too great with hooks yet so I'll study this as part of my education, but it does the job proper |
|
How do we indicate it's disabled? If I pass bg="white" then it doesn't change when it becomes valid |
|
All we care about is preventing the click. This popover doesn't use buttons like other UI prompts; it's really a button pretending to be an Action in this case. @urcades |
|
For reference, the latest "New DM" modal appears as such: @g-a-v-i-n should probably confirm here if Affirmative Buttons are universally aligned to the right side of the modal, or only right-aligned when another option is presented, ie [cancel] [send] |
|
Every time lol |
|
Also: It's not necessary to pay mind to this entire design, but I've pasted this here because it is the latest art and depicts the state of the inactive indigo button. |
|
Yeah, this button state is good, stamp |
|
@liam-fitzgerald this is related to validateOnBlur...any ideas? |
|
If the button disables anyway, why does it need the onBlur validation as well? |
|
just drop |
|
Ready for review |
|
It's on the list for today ... |
|
Can you revise the commits? |
|
yes |
| ); | ||
|
|
||
| const onBlur = useCallback(() => { | ||
| setInputTouched(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still correct? i thought setTouched needs to be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it needed to be dropped, okay.
Fixes #3824
...or nearly does. There's a problem where when you've entered a ship, then you go to type in another one, it clears the current value (preventing you from selecting multiple). @liam-fitzgerald you know react hooks & formik better than I. Can you point out what I'm doing wrong in
ShipSearch.tsx?A hint: in
onChange,valueis set to a blank array when it fires for the first time after selecting a ship, although the component later on knows that there is something invalue.