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

Add whitespace after navigation icon #3504

Merged
merged 2 commits into from
Apr 30, 2022

Conversation

fuegas
Copy link
Contributor

@fuegas fuegas commented Apr 4, 2022

As discussed by mshibuya and codealchemy in upgrade to Bootstrap v5 the rendering of icons should not be fixed with CSS but adding a whitespace between the icon and the text.

This change applies that solution to the icons in the sidebar navigation as well.

As discussed by mshibuya and codealchemy in [upgrade to Bootstrap v5](https://github.com/railsadminteam/rails_admin/pull/3455/files#r780533297) the rendering of icons should not be fixed with CSS but adding a whitespace between the icon and the text.

This change applies that solution to the icons in the sidebar navigation as well.
@@ -94,7 +94,7 @@ def root_navigation
actions(:root).select(&:show_in_sidebar).group_by(&:sidebar_label).collect do |label, nodes|
li_stack = nodes.map do |node|
url = rails_admin.url_for(action: node.action_name, controller: 'rails_admin/main')
nav_icon = node.link_icon ? %(<i class="#{node.link_icon}"></i>).html_safe : ''
nav_icon = node.link_icon ? %(<i class="#{node.link_icon}"></i> ).html_safe : ''
Copy link
Member

Choose a reason for hiding this comment

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

We don't need this, since we have link_to nav_icon + " " + wording_for... just below this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, I'll remove this change.

@fuegas
Copy link
Contributor Author

fuegas commented Apr 29, 2022

@mshibuya any update on the status of this PR? 😄

@mshibuya mshibuya merged commit 7301d9b into railsadminteam:master Apr 30, 2022
@mshibuya
Copy link
Member

Sorry for delay, thanks!

@fuegas fuegas deleted the nav-icons-navigation branch April 30, 2022 18:02
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