Skip to content

Only hide empty values if compact mode is enabled#3213

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
fuegas:master
Nov 6, 2019
Merged

Only hide empty values if compact mode is enabled#3213
mshibuya merged 1 commit into
railsadminteam:masterfrom
fuegas:master

Conversation

@fuegas

@fuegas fuegas commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

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

mshibuya commented Nov 4, 2019

Copy link
Copy Markdown
Member

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

fuegas commented Nov 5, 2019

Copy link
Copy Markdown
Contributor Author

@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

mshibuya commented Nov 6, 2019

Copy link
Copy Markdown
Member

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