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

Improve budget investment form #2280

Merged
merged 4 commits into from
Jan 9, 2018
Merged

Improve budget investment form #2280

merged 4 commits into from
Jan 9, 2018

Conversation

MariaCheca
Copy link
Contributor

Where

What

  • Removed external_link input in budget investment form. The database column will remain for previous budgets where the attribute was used, as it could be useful at some point, or just to keep all the original data as it was introduced.
  • Changed location input label.

Screenshots

localhost_3000_budgets_1_investments_new laptop with mdpi screen

Test

As usual.

@@ -58,6 +58,7 @@ es:
map_location: "Ubicación en el mapa"
map_location_instructions: "Navega por el mapa hasta la ubicación y coloca el marcador."
map_remove_marker: "Eliminar el marcador"
location: "Información adicional de la localización"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe to be consistent with other spanish texts around locations the word localización should be changed for ubicación as that's what the map uses 3 times on title/subtitle/checkbox

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

Copy link
Collaborator

@bertocq bertocq left a comment

Choose a reason for hiding this comment

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

If external_url won't be used anymore from the form, maybe its a good idea to also remove it from the permitted params at https://github.com/consul/consul/blob/master/app/controllers/budgets/investments_controller.rb#L106

Also... 🤔 its true we can't destroy the column from the database as many forks have values for it ... but maybe adding a rake that "concats" existing values at the end of the "description" attribute with some html tags... could allow us to remove it in two releases in the future?

@@ -311,7 +311,6 @@ def investments_order
select 'Health: More hospitals', from: 'budget_investment_heading_id'
fill_in 'budget_investment_title', with: 'Build a skyscraper'
fill_in 'budget_investment_description', with: 'I want to live in a high tower over the clouds'
fill_in 'budget_investment_external_url', with: 'http:https://http:https://skyscraperpage.com/'
Copy link
Collaborator

@bertocq bertocq Jan 8, 2018

Choose a reason for hiding this comment

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

I can see 3 more budget_investment_external_url occurences in the codebase 🤔 in two more tests:
https://github.com/consul/consul/blob/master/spec/features/management/budget_investments_spec.rb#L35
https://github.com/consul/consul/blob/master/spec/features/emails_spec.rb#L372

That management one... maybe there is a form for investments at management section ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, in management panel also there is a new budget investment form with this field ☺️

@bertocq
Copy link
Collaborator

bertocq commented Jan 8, 2018

Maybe
https://github.com/consul/consul/blob/master/db/dev_seeds.rb#L441
and
https://github.com/consul/consul/blob/master/spec/factories.rb#L282
should be removed as well

To completly deprecate the usage of the attribute

@MariaCheca MariaCheca force-pushed the 2277-budgets_new_form branch 5 times, most recently from 272892d to ad3850b Compare January 8, 2018 17:15
@@ -51,12 +51,6 @@
</div>
<% end %>

<% if investment.external_url.present? %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

But... we want existing budgets with external_url's but no documents to still show those values right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, we want to disallow this input field, but maintain the existing links 😌

@MariaCheca MariaCheca merged commit 9685919 into master Jan 9, 2018
@MariaCheca MariaCheca deleted the 2277-budgets_new_form branch January 9, 2018 10:55
@MariaCheca MariaCheca changed the title Budgets new form Improve budget investment form Jan 9, 2018
clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
aitbw added a commit to wairbut-m2c/consul that referenced this pull request Aug 31, 2018
The input was removed via consuldemocracy#2280 but due to conflict resolution, it was
accidentally re-introduced. This commit removes it altogether as well
as its associated I18n keys
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.

None yet

3 participants