The New Way to Build with AI! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Browse ReUI Pro

Rails bug report: defaultThemeMode and jstree images


Hello, found two issues in the Rails starter app for Metronic 8.1.7 with the initial default theme and then with jstree.

First, app/views/partials/theme-mode/_init.html.erb has a typo that causes formatting issues until the light, dark, or system theme is selected by the user.

Line 3 of the file is currently set to:
var defaultThemeMode = "{% getModeDefault %}";
but needs to be set to:
var defaultThemeMode = "<%= getModeDefault() %>";

Second, the jstree plugin uses four .png and two .gif files, but the current CSS file doesn't point to those files correctly.

For example, in lib/assets/plugins/custom/jstree/jstree.bundle.css:

#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
background-image: url("images/jstree/40px.png");
background-position: 0 -200px;
background-size: 120px 240px;
}


As a quick fix, I pointed to the CDN versions, but I'm sure there's a better way to fix this.
For example:

#jstree-dnd.jstree-dnd-responsive > .jstree-ok {
background-image: url("
background-position: 0 -200px;
background-size: 120px 240px;
}


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)

 
Deleted comment
 
Deleted comment
 
Deleted comment

Hi Ian Adams,

Thank you for your feedback. Appreciate your help with suggested fixes. We will include the fix as soon as possible.

Thanks



The corrected line should read:
var defaultThemeMode = "< %= getModeDefault() % >";
(remove the space between the < and %)


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
buy metronic keenthemes mega bundle

ReUI

Open-source React components, blocks and templates built on shadcn/ui and Tailwind CSS by Keenthemes.