0

I have a simple App.svelte that shows my problem

<script lang='ts'>
</script>

<frame>
  <page>
    <actionBar title="Hello" />

    <bottomNavigation>
    </bottomNavigation>
  </page>
</frame>

when I run this I get a white screen with nothing, but If I remove the bottomNavigation everyhing works fine. I don't figure out how to get bottomNavigation to work

Fayeure
  • 1,181
  • 9
  • 21

1 Answers1

-1

How to debug this

  1. Remove the contents of bottomNavigation, and replace it with just some text, e.g. "hello". Does that fix it? If so, the problem is something inside your current definition of bottomNavigation

  2. If it doesn't fix it, what if you put some divs above or below the actionBar, with text inside ? If that does it, is the problem the inability of bottomNavigation to cope with the absence of other text?

  3. Once you place text into the page, you should be able to search for it, even if it is appearing very small or white etc.

  4. Finally, there is a venerable trick of setting a style like this:

     <bottomNavigation style="border: 1px solid red;">
       <tabStrip>
         <tabStripItem>
           <label text='My tickets' />
         </tabStripItem>
         <tabStripItem>
           <label text='Buy tickets' />
         </tabStripItem>
         <tabStripItem>
           <label text='Menu' />
         </tabStripItem>
       </tabStrip>
       <tabContentItem>
         <label text='My tickets' />
       </tabContentItem>
       <tabContentItem>
         <label text='Buy tickets' />
       </tabContentItem>
       <tabContentItem>
         <label text='Menu' />
       </tabContentItem>
     </bottomNavigation>
    

That will give a red border to that item. You can use different colours to give different items distinguishable borders, and work out what has happened.

Report back with any problems, ideally with an executable example, that works with the "<>" icon. That will maximise the chance of a solution.

ProfDFrancis
  • 8,816
  • 1
  • 17
  • 26
  • Even when I write a empty i get a white screeen and I tried adding a div above or a label and it didnt work – Fayeure Feb 27 '23 at 23:42
  • EDIT: Even with your styles it didn't work, and the weird thing is that I get no error message in the console either – Fayeure Feb 27 '23 at 23:43
  • CSS doesn't give error messages: it just does what you say. Please paste a minimal reproducible example, using the <> symbol, and then we can try to help you. My style was an example. I would expect you to apply that style to each of the items. If necessary, on `frame` and `page` too. What happened when you added text? – ProfDFrancis Feb 27 '23 at 23:43
  • When I added text nothing happened, I still got the white screen – Fayeure Feb 27 '23 at 23:50
  • I use the preview on my android phone I cant ctrl-f – Fayeure Feb 27 '23 at 23:51
  • I edited my example to show that even with nothing inside it doesn't work – Fayeure Feb 27 '23 at 23:52
  • And even if I put my bottomNavigation inside a layout it still doesn't work – Fayeure Feb 27 '23 at 23:58