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

Only hide empty values if compact mode is enabled #3213

Merged
merged 1 commit into from
Nov 6, 2019
Merged

Only hide empty values if compact mode is enabled #3213

merged 1 commit into from
Nov 6, 2019

Conversation

fuegas
Copy link
Contributor

@fuegas fuegas commented Oct 28, 2019

If a value is an empty string, it currently is hidden regardless of the setting compact_show_view.

I think an empty string should only be hidden if compact mode is enabled. This PR enables that behaviour.

@mshibuya
Copy link
Member

mshibuya commented Nov 4, 2019

Could you write a spec for this issue? Best place will be:
https://github.com/sferik/rails_admin/blob/master/spec/integration/actions/show_spec.rb

@fuegas
Copy link
Contributor Author

fuegas commented Nov 5, 2019

@mshibuya : Tests have been added. When you run these without the parentheses in the view the test shows blank fields will fail:

  2) Show action when compact_show_view is disabled shows blank fields
     Failure/Error: is_expected.to have_css('.logo_url_field')
       expected #has_css?(".logo_url_field") to return true, got false
     # ./spec/integration/actions/show_spec.rb:95:in `block (3 levels) in <top (required)>'

@mshibuya mshibuya merged commit 77571f2 into railsadminteam:master Nov 6, 2019
@mshibuya
Copy link
Member

mshibuya commented Nov 6, 2019

Perfect, thanks!

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