Fix home tiles visibility and TopMessageHolder error

This commit is contained in:
Seth Call 2026-01-17 21:38:53 -06:00
parent e5a9317c7c
commit 9e73094c9b
4 changed files with 37 additions and 2 deletions

View File

@ -76,3 +76,4 @@
//= require_directory ./wizard/gear
//= require_directory ./wizard/loopback
//= require everywhere/everywhere
//= require fix_home_tiles

View File

@ -0,0 +1,19 @@
(function() {
// Wait for everything to settle
setTimeout(function() {
// If we are at the client root/home and the home screen is hidden
if ((window.location.hash === '' || window.location.hash === '#/home') &&
$('.screen[layout-id="home"]').is(':hidden')) {
console.log("Fixing home screen visibility...");
// Force the layout engine to show the home screen
if (window.JK && window.JK.app && window.JK.app.layout) {
window.JK.app.layout.changeToScreen('home', {});
}
// Also ensure the curtain is gone
$('.curtain').fadeOut();
}
}, 1000);
})();

View File

@ -1,9 +1,9 @@
context = window
ConfigStore = context.ConfigStore
ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
ReactCSSTransitionGroup = if React.addons then React.addons.CSSTransitionGroup else null
@TopMessageHolder = React.createClass(
context.TopMessageHolder = React.createClass(
{
displayName: 'Top Message Holder',
minimum_time_until_sub_prompt: 1000 * 60 * 15 # 30 minutes

View File

@ -0,0 +1,15 @@
require 'spec_helper'
describe "Home Tiles", :js => true, :type => :feature do
let(:user) { FactoryBot.create(:user) }
it "shows the home tiles" do
# Ensure we are not logged in to see the 'not-logged-in' class
# sign_in_poltergeist(user)
visit "/client"
# Check for the specific selector
expect(page).to have_css('.homecard.createsession.not-logged-in', visible: true, wait: 10)
end
end