Skip to content

Clearer wording of allow_delete template behavior #9209

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

Merged
merged 1 commit into from
Feb 13, 2018
Merged

Clearer wording of allow_delete template behavior #9209

merged 1 commit into from
Feb 13, 2018

Conversation

brooksvb
Copy link
Contributor

@brooksvb brooksvb commented Feb 5, 2018

The allow_delete option has one consequence: if an item of a collection isn't sent on submission, the related data is removed from the collection on the server. The solution is to remove the form element from the DOM.

The solution is to remove the form element from the DOM is a confusing sentence. Saying "the solution" implies that there is some sort of problem with enabling allow_delete that needs to be solved. I found it very confusing what the problem was, and reread the section multiple times to figure out what it was supposed to be.

I finally understood that what it's trying to say is that if you want the intended behavior to work, (not problematic, because you are enabling the behavior intentionally), you have to remove the collection item from the submitted data. In terms of submitting the form through a webpage, that means removing the DOM element.

Also removed has one consequence from the first sentence of the paragraph, because calling it a consequence, again, implies that it's a behavior you don't really want, despite the fact you're enabling it intentionally.

Overall, I think these small changes would prevent some unnecessary confusion like what I experienced.

```
The allow_delete option has one consequence: if an item of a collection isn't sent on submission, the related data is removed from the collection on the server. The solution is to remove the form element from the DOM.
```

*The solution is to remove the form element from the DOM* is a confusing sentence. Saying "the solution" implies that there is some sort of problem with enabling `allow_delete` that needs to be solved. I found it very confusing what the problem was, and reread the section multiple times to figure out what it was supposed to be. 

I finally understood that what it's _trying_ to say is that if you want the *intended* behavior to work, (not problematic, because you are enabling the behavior intentionally), you have to remove the collection item from the submitted data. In terms of submitting the form through a webpage, that means removing the DOM element.

Also removed `has one consequence` from the first sentence of the paragraph, because calling it a consequence, again, implies that it's a behavior you don't really want, despite the fact you're enabling it intentionally.

Overall, I think these small changes would prevent some unnecessary confusion like what I experienced.
@brooksvb
Copy link
Contributor Author

brooksvb commented Feb 5, 2018

This change is relevant for 2.7 and up

@javiereguiluz
Copy link
Member

@woofiewilly this is a perfect first-time contribution to Symfony Docs. You explained the problem in detail and provided a simple solution that improves the docs ... and you used the right branch (2.7), which is usually the tricky part for newcomers. Thanks!

@javiereguiluz javiereguiluz merged commit 13753df into symfony:2.7 Feb 13, 2018
javiereguiluz added a commit that referenced this pull request Feb 13, 2018
…willy)

This PR was merged into the 2.7 branch.

Discussion
----------

Clearer wording of allow_delete template behavior

```
The allow_delete option has one consequence: if an item of a collection isn't sent on submission, the related data is removed from the collection on the server. The solution is to remove the form element from the DOM.
```

*The solution is to remove the form element from the DOM* is a confusing sentence. Saying "the solution" implies that there is some sort of problem with enabling `allow_delete` that needs to be solved. I found it very confusing what the problem was, and reread the section multiple times to figure out what it was supposed to be.

I finally understood that what it's _trying_ to say is that if you want the *intended* behavior to work, (not problematic, because you are enabling the behavior intentionally), you have to remove the collection item from the submitted data. In terms of submitting the form through a webpage, that means removing the DOM element.

Also removed `has one consequence` from the first sentence of the paragraph, because calling it a consequence, again, implies that it's a behavior you don't really want, despite the fact you're enabling it intentionally.

Overall, I think these small changes would prevent some unnecessary confusion like what I experienced.

Commits
-------

13753df Clearer wording of allow_delete template behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants