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

Implement a ContactForm component #5

Merged
merged 3 commits into from
Feb 1, 2019
Merged

Implement a ContactForm component #5

merged 3 commits into from
Feb 1, 2019

Conversation

WebDevelopUa
Copy link
Contributor

No description provided.

Copy link
Member

@viktor-yakubiv viktor-yakubiv left a comment

Choose a reason for hiding this comment

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

Any input component should expose input method. In this case, when it's a form, the methods are onChange or onFieldChange, or onInputChange, onSubmit.

Also, a component should be configurable: it must have a props for options, action, method and so on.

@viktor-yakubiv
Copy link
Member

Please, always commit changes to pages and components in separate commits.

@viktor-yakubiv viktor-yakubiv changed the title add contact form view Implement a ContactForm component Jan 14, 2019
@WebDevelopUa
Copy link
Contributor Author

Provide Reply-to field to contact form

viktor-yakubiv
viktor-yakubiv previously approved these changes Jan 15, 2019
@viktor-yakubiv viktor-yakubiv dismissed their stale review January 15, 2019 15:50

Needs one more review

Copy link
Member

@viktor-yakubiv viktor-yakubiv left a comment

Choose a reason for hiding this comment

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

Improve component logic

.contact-form {
background-color: $gray-100;
position: relative;
//padding: 3em 1em 1em;
Copy link
Member

Choose a reason for hiding this comment

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

Clean code comments up

Copy link
Member

Choose a reason for hiding this comment

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

Other comments are not cleaned

{ value: 'field-three', label: 'Select field #3' },
]

const ContactForm = ({ action, method = 'post', onCancel }) => (
Copy link
Member

Choose a reason for hiding this comment

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

Provide more callbacks, at least onSubmit

>
Send us a message
</Button>
{isToggleOn && (
Copy link
Member

Choose a reason for hiding this comment

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

Consider usage Collapse-component from Reactstrap instead of pure removing of the element.

Copy link
Member

Choose a reason for hiding this comment

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

UncontrolledCollapse is good but we have to control it from two different points so we have to use controlled one with state.

@viktor-yakubiv viktor-yakubiv changed the base branch from content to master January 22, 2019 09:35
Copy link
Member

@viktor-yakubiv viktor-yakubiv left a comment

Choose a reason for hiding this comment

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

Ask me if you have any question about the review.

{ value: 'field-three', label: 'Select field #3' },
]

const ContactForm = ({ action, method = 'post', onCancel, onSubmit }) => (
Copy link
Member

Choose a reason for hiding this comment

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

Pass options through props


const ContactForm = ({ action, method = 'post', onCancel, onSubmit }) => (
<Form className="contact-form my-3" action={action} method={method}>
<FormGroup className="pb-3" row>
Copy link
Member

Choose a reason for hiding this comment

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

Always avoid utility classes

<option disabled selected>
Please choose a subject
</option>
{options.map(option => (
Copy link
Member

Choose a reason for hiding this comment

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

You can destructure option directly to { label, value }

@viktor-yakubiv viktor-yakubiv force-pushed the contact branch 4 times, most recently from 69fe2e5 to c705b09 Compare February 1, 2019 12:13
viktor-yakubiv
viktor-yakubiv previously approved these changes Feb 1, 2019
@viktor-yakubiv viktor-yakubiv merged commit 3147799 into master Feb 1, 2019
@viktor-yakubiv viktor-yakubiv deleted the contact branch February 3, 2019 08:32
valeriibudko added a commit that referenced this pull request Feb 11, 2023
valeriibudko added a commit that referenced this pull request Feb 11, 2023
* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

* Fix/master content (#798)

* HOTIFIX: search endpoint wasn't creating the right query

* Master update from content (#795)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

* [feature] Design v4.9.0. Membership component (#796)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

* [feature] Design v4.9.0. Membership component

* Fix/master content (#798)

* HOTIFIX: search endpoint wasn't creating the right query

* Master update from content (#795)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>
Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>

* Netlify config #4

* Netlify config #5

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>
Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
valeriibudko added a commit that referenced this pull request Feb 11, 2023
* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

* Fix/master content (#798)

* HOTIFIX: search endpoint wasn't creating the right query

* Master update from content (#795)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

* [feature] Design v4.9.0. Membership component (#796)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

* [feature] Design v4.9.0. Membership component

* Fix/master content (#798)

* HOTIFIX: search endpoint wasn't creating the right query

* Master update from content (#795)

* Update faq

* add linking (#754)

* fix missing buttons issue

* feat: CORE-4429 open pdf in new tab

* CORE-4429 babel config

* update dependencies

* [CORE-4431] docs-membership (#773)

* update dataset text

* CORE update api pdf file

* CORE-4458 update terms page (#784)

* update dataset text

* CORE-4458: update terms page

* temporary page

* [bugfix] Config babel/runtime

* Fix. Remove debug code (#794)

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>
Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>

* Netlify config #4

* Netlify config #5

* Netlify config #6

---------

Co-authored-by: mcancellieri <mcancellieri@users.noreply.github.com>
Co-authored-by: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com>
Co-authored-by: Eka <ekachxaidze2@gmail.com>
Co-authored-by: Matteo Cancellieri <matteo.cancellieri@open.ac.uk>
valeriibudko added a commit that referenced this pull request Aug 4, 2023
valeriibudko added a commit that referenced this pull request Aug 4, 2023
valeriibudko added a commit that referenced this pull request Aug 4, 2023
valeriibudko added a commit that referenced this pull request Aug 4, 2023
* Netlify update #5

* Netlify update #6

* Netlify update #7
valeriibudko added a commit that referenced this pull request Aug 4, 2023
* Netlify update #5

* Netlify update #6

* Netlify update #7
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.

2 participants