Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Custom Dropdown component with search support #148

Merged
merged 8 commits into from
Mar 20, 2018

Conversation

AparnaKarve
Copy link
Contributor

@AparnaKarve AparnaKarve commented Mar 14, 2018

This component is a wrapper for bootstrap-select and is a good substitute for react-bootstrap-select

(react-bootstrap-select is unusable because of reasons mentioned here - https://github.com/priley86/miq_v2v_ui_plugin/pull/140#issuecomment-372491569)

screen shot 2018-03-14 at 4 07 44 pm

screen shot 2018-03-14 at 4 08 32 pm

screen shot 2018-03-14 at 4 09 08 pm

Component used in Datastores step -

screen shot 2018-03-19 at 3 47 11 pm

Component used in Networks step -

screen shot 2018-03-19 at 4 10 36 pm

@priley86
Copy link
Member

priley86 commented Mar 16, 2018

thanks a lot @AparnaKarve ! i know it is jquery, but it's the most compatible MIQ typeahead right now (as it matches existing MIQ design), and great job wrapping this w/ React.

I have linked PF-React #54 to formally revisit this pattern later in PatternFly, but this should work fine for now.

I will review it some more first thing tomorrow morning...

@priley86
Copy link
Member

hey @AparnaKarve the typeahead functionality is working great here for me...
screen shot 2018-03-16 at 11 16 07 am

also... tests are still passing 👍

however, when i use the "Continue to Plan" feature on Step 5 Mapping Wizard I am no longer seeing that mapping selected by default in Step 1 of Plan Wizard (seems it is preselecting "Choose" by default). Can you maybe take a look at that one next?

@priley86 priley86 changed the base branch from master to sprint5 March 16, 2018 15:25
@priley86
Copy link
Member

ooOOo this was my browser cache...hard refresh and it working... apologies @AparnaKarve !!

this looks good to go... do you want to try the Mapping Wizard selects next in this same PR?

@AparnaKarve
Copy link
Contributor Author

do you want to try the Mapping Wizard selects next in this same PR?

Sure. Will look into that.

@AparnaKarve
Copy link
Contributor Author

@priley86 Can you review again when you get a chance?

I have added some new screenshots above for Datastores and Network screens where this component is now being used.

Copy link

@serenamarie125 serenamarie125 left a comment

Choose a reason for hiding this comment

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

@AparnaKarve this looks really nice! Thanks for doing this!

return (
<div>
<SourceClusterSelect
Copy link
Member

Choose a reason for hiding this comment

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

Can we delete the SourceClusterSelect component now @michaelkro @AparnaKarve ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fo sho! This is a huge upgrade, nice job @AparnaKarve!

Copy link
Member

Choose a reason for hiding this comment

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

👍 alright sounds good. If we remove SourceClusterSelect I think this PR is good to merge 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback guys -- will be deleting SourceClusterSelect now...

@priley86
Copy link
Member

nice job!!

}
choose_text={`<${__('Select a source cluster')}>`}
render_within_form="true"
form_name={form}
Copy link
Contributor

@michaelkro michaelkro Mar 20, 2018

Choose a reason for hiding this comment

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

So, since we're now hooking the selects into redux-form, this enables us to make a couple improvements

  1. Lift the selectedCluster component state to the redux store
  2. We can now use redux-form validation to handle the next button disabling. Before I had to use a workaround where I was rendering DualPaneMapper, but hiding it (find hack here). We can instead use length from redux-form-validators and go back to conditionally rendering this guy

If we want to make these changes, I imagine it would be best to do it as a separate PR

Copy link
Member

@priley86 priley86 Mar 20, 2018

Choose a reason for hiding this comment

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

yes - i think lifting selectedCluster to redux store is fine (so good w/ # 1).

For # 2 (handle next button disabling)... i think that's probably OK but we have to vet this change w/ @mturley 's wizard abstraction. I believe shouldDisableNextStep(activeStepIndex) callback is called for a step now, so we'd just have to verify we can still map this to redux-form-validators. This should all jive in a future PR... but I'm fine w/ what's been added here...

Copy link
Contributor

@michaelkro michaelkro left a comment

Choose a reason for hiding this comment

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

🚢 when 📗

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants