-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Add contact-info view #312
Conversation
Pull Request Test Coverage Report for Build 2730
💛 - Coveralls |
@@ -80,9 +80,7 @@ exports[`Sharing renders a sharing component 1`] = ` | |||
</th> | |||
<th | |||
className="" | |||
> |
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.
@cekk this seems to be unrelated to the contact-info view (same for the translation). Did you do this by purpose or accident?
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.
Yes, it's unrelated, but i had this broken test and without this change i can't had green lights
@@ -0,0 +1,238 @@ | |||
/** | |||
* Login container. |
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.
@cekk you forgot to amend the comments here. Should be "ContactInfo" not "Login"
<List.Item href="/contact"> | ||
<FormattedMessage id="Contact" defaultMessage="Contact" /> | ||
<List.Item> | ||
<Link to="contact-info" className="item"> |
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.
@cekk Maybe this is our chance here to rename "/contact-info" to something saner. This is a contact form, right? I never understood why we use "info" here. Especially since Plone does not allow you to edit the contact info page as an editor.
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.
Yes, you're right.
I had a discussion with @robgietema in Tokyo and we decided to keep "contact-info" for retro-compatibility with the plone environment.
But i'd like to change it in "contact" or "contacts" or whatever.
When we decide the name, i could also fix the typo in the other comment.
P.S.: github didn't emailed me yesterday with this review :(
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.
@sneridagh @robgietema I'd prefer to change "contact-info" to "contact-form" but I won't fight for it. My opinioin is that if we don't change things now in Volto for the better, we never will. :)
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.
contact-form is fine for me also
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.
But then we also need to change the classname etc to make in consistant.
@tisto did you received some notifications about my replies on your reviews? |
@cekk yep. Got your comments via email... |
* master: (99 commits) Back to development Prepare for release Fix build for projects created with Please specify the project directory: create-volto-app <project-directory> For example: create-volto-app my-volto-app Run create-volto-app --help to see all options. Back to development Prepare for release 1.5.0 Add support for extending Semantic UI Styling using the semantic theme engine by adding an file Default tile position to center for all the existing tiles Upgrade api/ to Plone 5.1.3. Update README.md Update README.md Update README.md Fix tests Add guards if user enters bad Embed code, and related info (and error) message Update changelog Add supported browsers disclaimer Fix Header scroll in Firefox in case that there are lot of items in the nav Update yarn.lock. Add changelog and documentation Downgrade query-string Try downgrade again ...
@cekk Just merged latest master into the branch. Overall it LGTM, but one question, I was considering two things:
I know that the last one might be an opt-in, in case you configure it, but still we can warn integrators about the fact if they do not configure one... /cc @tisto @robgietema @cekk what do you think? |
If i remember correctly, i tried it but i couldn't check email config because i needed to call a "private" endpoint: the registry one. For captcha field, we need to get the value from registry (from collective.recaptcha), right? |
@cekk having a Plone add-on only to store a string in the registry, then add a service (and a use an XHR call) to retrieve it, and after that validate it (you should also do from the SSR process to not expose the private token), then talk again to the component to give the ok for the code, seems to me like just too much. I don't think that would be that much use cases like this one, but this kind of decisions are the ones that should avoid in the future and we should take it as a strategic policy. It's true that we can still do the validation on Plone, then add a service for it, but it's that worthy? /cc @tisto @robgietema @vangheem @bloodbare what do you think? Probably I can draft something in the next days implementing the solution that I proposed. |
Ok, as I said you're more into Volto than me, so you better know what's the vision/policy about its features ;) |
* master: (86 commits) Back to development Release 1.6.1 Prepare for release Fix regression on position of the add tile button Remove debug dangling logging Fix post release back to development script, by adding semver.inc helper Fix version on back to development manually Back to development Release 1.6.0 Fix imports on false merge with master Add error log in the SSR console. Fix edit forms with richtext fields coming from SSR. Update docs Add changelog Fix images requests that require API auth using a SSR helper Fix not valid <div> tag nested in a <p> tag error on tiles and wysiwyg field Re-add width stmt that was deleted by accident. Set min-width to flating images. Docs polishing, first round Set image width in Volto editor to 50% for images that float left/right. Force use python3 on mkdocs ...
… of the secrets used only in SSR mode for recaptcha feature. Add feature to contact form as first consumer.
@cekk @vangheem ok, first implementation in place. I added a new tokens stash where the private ones are not exposed to the client bundle (tested and works well). I added the recaptcha feature to be generic for all However, after having all implemented, I realised that the mail endpoint is still not protected "as must be" (something that we have in mind), and we probably require to implement the recaptcha validation on it directly for this special case. @bloodbare told me that Guillotina provides this OOTB :) The problem is that we are in a point were doing changes in Plone core is difficult (since 5.2 is feature freezed), although for plone.restapi things are a bit different we will have to introduce a few dependencies (at least the recaptcha verification library) which I don't know if the FWT will be up to it... Anyways, I would go with this implementation and leave the endpoint improvement for some of the upcoming sprints. For now it works for all forms if the prop is enabled, which it already a great feature for me. What do you think? |
@sneridagh how would the user add the recaptcha token? Do I need a create-volto-app app to do this? I think we are missing some docs here. Though, maybe we should agree if that's the way to go before putting more effort into it. @bloodbare @robgietema @vangheem opinions? |
woah, https://plonerestapi.readthedocs.io/en/latest/email-send.html isn't protected? Can we just schedule a team call to discuss these issues? I feel like at this point, we need a longer form discussion to get through everything that is going on related to integration. |
@vangheem it is, because by default only "Manager" role can send mails. We know that it's not the best solution, but for sure it won't be the last implementation. It's on the list of "things to improve". @bloodbare told me how you do it in Guillotina, I'm +1 for using the same approach and expand it to use it in "all forms". However, not the best moment to introduce changes into the core :) then there's also the inclusion of a third party tool in the core is also to be considered carefully. @tisto I was waiting to see if that implementation that I did was good enough, and I was waiting for feedback before documenting it. My idea is to use that approach until we have something better in the back. Also, I was -1 in making the config on the Plone side. |
Could we schedule a call about this to discuss? |
Yep. Let's do that. |
* master: (130 commits) Fix not valid css-loader options Upgrades update css-loader Add Origin to allow_headers in CORS settings, otherwise Firefox is not allowing CORS Back to development Release 2.1.3 Final cleaning up, polish Makefile run build Polish Fix travis Missing Volto build step Fix traviiis Use xenial everywhere Fix travis Last fixes Back to development Release 2.1.2 Add changelog Fix the folder_contents view component bby preventing the SearchableText be empty if you haven't typed anything in the filter fields yet. This is caused by the new ZCatalog in Zope 4. WIP ...
…entation of the secrets used only in SSR mode for recaptcha feature. Add feature to contact form as first consumer." This reverts commit f79a244.
@cekk
So I would merge it right away. |
<List.Item href="/contact"> | ||
<FormattedMessage id="Contact" defaultMessage="Contact" /> | ||
<List.Item> | ||
<Link to="contact-info" className="item"> |
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.
contact-form is fine for me also
<List.Item href="/contact"> | ||
<FormattedMessage id="Contact" defaultMessage="Contact" /> | ||
<List.Item> | ||
<Link to="contact-info" className="item"> |
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.
But then we also need to change the classname etc to make in consistant.
Seems working good.
The only problem that i have, is with the formData.
I need to pass
formData={{ tilesLayoutFieldname: {} }}
to avoid some errors in the Form component.