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

do not use link_to_add_fields for buttons, its text will be removed from minimize menu #3544

Closed
wants to merge 0 commits into from

Conversation

hefan
Copy link
Contributor

@hefan hefan commented Mar 9, 2020

Description

Problem:
The link_to_add_fields function will (when used for buttons) create the following markup
<a ...> <span class="text">Add Option Value</span> </a>
The span with class text will be removed when the menu is minimized.
So we only see the plus icon with no text when the menu is minimized.

This happens in the option type edit screen and in the product properties index screen.
/admin/option_types/1/edit
/admin/products/ruby-hoodie/product_properties

See Screenshot:
Screenshot from 2020-03-09 16-59-14

Solution:
This PR removes the symbols from the buttons just by using link_to instead of link_to_add_fields.
The Buttons will have no more symbol but the text stays when the menu is minimized.
These two where the only buttons with symbols in the Backend.

@kennyadsl
Copy link
Member

There's another occurrence of this into https://github.com/solidusio/solidus/blob/d3be0c490c3627855dc554c7393c7bf5dc87a774/backend/app/views/spree/admin/product_properties/index.html.erb#L58:L58, can you please check if we can remove that as well, and maybe deprecate the helper if we are not using it anymore in the codebase?

@hefan
Copy link
Contributor Author

hefan commented Mar 10, 2020

ok done in #3547

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