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
Feature/redmine4.0 #112
Feature/redmine4.0 #112
Conversation
# Conflicts: # .travis.yml
* Minor cleanups.
* Fixed crashing bulk generation for previous versions.
* Set allowed failures to only ruby v2.6.1.
After testing everything manually, it turned out that some things didn't work as expected. |
An exception was raised in our form fields generation because false values passed to include_blank in a Fixed it in #112 |
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.
Good work! This PR contains a lot of white-space changes - it's best practice to keep those to a minimum, to allow better tracking of the real changes.
@@ -2,4 +2,4 @@ | |||
.label | |||
= form.label :activity_id | |||
.input | |||
= form.collection_select :activity_id, TimeEntryActivity.applicable(entry.project), :id, :name, {include_blank: !local_assigns[:required]}, disabled: local_assigns[:disabled], required: local_assigns[:required] | |||
= form.collection_select :activity_id, TimeEntryActivity.applicable(entry.project), :id, :name, { include_blank: local_assigns[:required] }, disabled: local_assigns[:disabled], required: local_assigns[:required] |
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.
This seems odd. Removing the !
changed the logic?
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.
Does this still work with the old Redmine / Rails versions?
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.
We have the following two cases:
- Select tag is not required -> include a blank field
- Select tag is required -> no blank field
What has changed is that we can no longer have a required select tag without a blank option.
The reason is that the HTML5 standard requires that behavior and rails 5 adopted it.
This leads to a changing behavior in the 2. case and the closest behavior we can create is imo to always include a blank field in a select tag.
aac7c39
to
777fab7
Compare
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.
looks good to me.
No description provided.