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

fix: ionic 7 tabs don't have any style even on playground #321

Closed
Tragio opened this issue Apr 8, 2023 · 10 comments
Closed

fix: ionic 7 tabs don't have any style even on playground #321

Tragio opened this issue Apr 8, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@Tragio
Copy link

Tragio commented Apr 8, 2023

🐛 The bug

Hi 👋

I was trying out the last version of Ionic, and I noticed that the tabs don't have any style. On my personal app, I also noticed some other quirks. I searched upstream, on the ionic framework git and couldn't find anyone talking about this, so I'm not sure where it's coming from.

There's a bunch of class="undefined".

Playground picture:

CleanShot 2023-04-08 at 08 55 21

🛠️ To reproduce

https://stackblitz.com/github/nuxt-modules/ionic/tree/main/playground

🌈 Expected behaviour

Tabs have style.

ℹ️ Additional context

No response

@Tragio Tragio added the bug Something isn't working label Apr 8, 2023
@therhenals
Copy link

therhenals commented Apr 9, 2023

Hi, the same behavior happens with ion-back-button, I noticed that it only happens the first time when running "npm run dev". If we run it again, everything looks correct and without class="undefined

@rvmourik
Copy link

rvmourik commented May 8, 2023

I can confirm this issue still exists, what @therhenals says is also correct. The second time you run the command they do get loaded. However when using nuxt generate the styles for tabs are not included in the entry.css file. Which results in styles missing in the end build and when you open this in the IOS simulator you also missing the specific styling. For instance the .button-inner specific styles are not included.

@rvmourik
Copy link

rvmourik commented May 8, 2023

I can confirm this issue still exists, what @therhenals says is also correct. The second time you run the command they do get loaded. However when using nuxt generate the styles for tabs are not included in the entry.css file. Which results in styles missing in the end build and when you open this in the IOS simulator you also missing the specific styling. For instance the .button-inner specific styles are not included.

In addition to this, it looks like it is happening with more components. For debugging purposes I added a simple list component.

This is in the browser
image

This is the IOS simulator
image

You see the missing styling, the issue that it runs through the header is because of the missing safe view settings. But I don't think that is related to this problem.

A difference I could find when debugging is that in the source of the browser the "ios" class is present in all components when using the iPhone simulations. However in the IOS simulator when debugging with safari, the "ios" class is only present on the html-tag and the <ion-app>-component. But on all components that are in the router-outlet it start with undefined.

image

Maybe this has something to do with it, because if we take my example of the button-inner-class missing.

image

As you can see the CSS string is bound to the ios platform, so if it can't decide which one it is the css is missing.,

edit
Installed the Android simulator, same problem.

image

@tlebeitsuk
Copy link
Contributor

tlebeitsuk commented May 15, 2023

I'm having the same issue. I need to run "pnpm dev" a second time to get the tab bar to show.

@MarcusAngel
Copy link

Following up on this, not a blocker but having to run dev twice is silly

@then3rdman
Copy link

So for more context it seems that ALL css is missing when this occurs. Its also not consistent

@then3rdman
Copy link

Some further investigation.

We have in development where the error comes up that the page is missing the ion-page tag and we are missing the css.

We have noticed that it happens for me when the Vite client warmed up message appears after the Nitro built in ## message.

Works

✔ Nuxt DevTools is enabled v0.8.2 (experimental)                                                                                                  
ℹ Vite client warmed up in 2487ms                                                                                                                 
✔ Nitro built in 1270 ms   

Doesn't work

✔ Nuxt DevTools is enabled v0.8.2 (experimental)                                                                                                  
✔ Nitro built in 1237 ms                                                                                                                    
ℹ Vite client warmed up in 3189ms

@cernymatej
Copy link

Hi, are there any updates on this issue? Were you able to find a reasonable workaround?

@danielroe danielroe removed their assignment Jan 9, 2024
@danielroe
Copy link
Collaborator

This is not now reproducible. Let me know if you encounter this with the next release and we can reopen.

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@jakubkoje
Copy link

This is not now reproducible. Let me know if you encounter this with the next release and we can reopen.

I encountered the same issue today, after uprgrading nuxt to latest version.
#616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants