[Fixed] Possible bug - Giant Space Inserted In Form

good afternoon

So currently one of my apps has a giant space inserted on all its forms on the top like this

i made no changes to the code and when I inspect element it reverts back to the normal state

heres the form code for the home page which is shown
also to be clear – in the editor it appears normal only when i start the app or visit the link does it do this

I tried reverting the app to an earlier version and still seeing the same behavior

from ._anvil_designer import HomeTemplate
from anvil import *
import anvil.facebook.auth
import anvil.server
import anvil.microsoft.auth
import anvil.users
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables
from ..routing import goLogger,goAdmin,goUserEdit,goLogReport,goCases
from datetime import timedelta,datetime,timezone
import time 

class Home(HomeTemplate):
  def __init__(self, **properties):
    # Set Form properties and Data Bindings.
    self.init_components(**properties)
    anvil.users.login_with_form()
    user = anvil.users.get_user()
    self.user = user
    if user['admin'] == True:
      self.ToAdmin.visible = True
    signed_up = ((user['signed_up'].replace(tzinfo=timezone.utc).astimezone(tz=None)))
    su_stamp = time.mktime(signed_up.timetuple())
    now_stamp = int(time.time())
    if abs(su_stamp - now_stamp) <= 5:
      self.firstLogin = True
      anvil.server.call('checkIfLLR',user)
    else:
      self.firstLogin = False
      self.day.text = user['log_remind_day']
      self.name.text = user['full_name']
      self.position.text = user['role']
      self.email.text = user['email']
    self.title.text = f"Welcome {user['email']}"
    #anvil.server.call('linkUsertoCase')
  
  def toLogger_click(self, **event_args):
    """This method is called when the button is clicked"""
    goLogger()

  def ToAdmin_click(self, **event_args):
    """This method is called when the button is clicked"""
    open_form('Admin')
    goAdmin()

  def editUser_click(self, **event_args):
    """This method is called when the button is clicked"""
    goUserEdit()

  def Container_show(self, **event_args):
    """This method is called when the column panel is shown on the screen"""
    if self.firstLogin == True:
      goUserEdit(firstLogin=True)

  def toHist_click(self, **event_args):
    """This method is called when the button is clicked"""
    goLogReport(user=self.user)

  def toCases_click(self, **event_args):
    """This method is called when the button is clicked"""
    goCases()

  def grid_panel_1_show(self, **event_args):
    """This method is called when the grid panel is shown on the screen"""
    if self.user['log_remind_day'] == None:
      self.day.visible = False
      self.dayL.visible = False
      
      
    



Try to put a return before the login_with_form and run.
If it looks good, put the return before the get_user and run.
Keep going until it doesn’t look good, so you will find which line causes the form to spread apart.

1 Like

so when the line firstloginTrue is commented out it works, but otherwise will not – cannot figure out why

Do you have a component called self.firstLogin?

no its not a component it’s just a flag

Try to comment this out:

If this is what makes the difference, then go inside goUserEdit and keep digging in there.