vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.0.0] V-App-Bar Collapse On Reload Page

Open BlackYuzia opened this issue 2 years ago • 10 comments

Environment

Vuetify Version: 3.0.0-beta.3 Vue Version: 3.2.36 Browsers: Chrome 102.0.0.0 OS: Windows 10

Steps to reproduce

  1. You should run server (npm install && npm run dev OR npm install && npm run build && npm run start)
  2. Open / page
  3. Reload page
  4. Look at app bar
  5. Bar collapse for a few seconds (in run dev mode this collapse a bit longer)

Expected Behavior

App bar didn't collapse or something, duo page reload

Actual Behavior

Bar collapse on every page reload. After a few seconds, bar return to valid position. If you disable javascript, app bar didn't return to required position.

Reproduction Link

https://gitlab.com/BlackYuzia/nuxt-vuetify

Screenshots

Collapse example: image

Un Collapsed after a few seconds: image

BlackYuzia avatar Jun 03 '22 09:06 BlackYuzia

I have the same issue working on Nuxt 3 and Vuetify 3.0.0-beta.3 Is there any workaround ? I tried to use the <Suspense> but it's not working in Nuxt, I tried in layouts and App.vue as well

Cheers

besnikh avatar Jun 26 '22 14:06 besnikh

Same issue here. Nuxt 3 and Vuetify 3.0.0-beta.5. Similar issue if I tried replacing it with a v-toolbar instead (except v-toolbar starts bigger then contracts). Even without a drawer, it still starts each reload in the small state before expanding to the full width of the screen once the page is fully loaded.

Using a card as a workaround for now.

r-this avatar Jul 17 '22 18:07 r-this

This is the workaround I made using layouts

inside your template v-app v-if="!loading" etc...

richardordinario avatar Nov 25 '22 11:11 richardordinario

<v-app-bar style="width: 100%">

Is what I use as a workaround

ChristopheCVB avatar Dec 12 '22 02:12 ChristopheCVB

Workaround for height collapsing:

<template>
    <div>
        <v-app>
            <v-app-bar ... style="width: 100%">
            ...
            </v-app-bar>
            <v-fade-transition leave-absolute>
                <div v-if="isExtraSpaceAdded" style="height: 48px" />
            </v-fade-transition>
            ...
        </v-app>
    </div>
</template>

<script setup>
const isExtraSpaceAdded = ref(true)

onMounted(() => {
  isExtraSpaceAdded.value = false
})
</script>

height: 48px is a heigth value of the v-app-bar.

Hope this bug will be fixed soon.

cheetamaru avatar Dec 19 '22 18:12 cheetamaru

Nice, thanks for this

On Mon, Dec 19, 2022, at 12:40 PM, cheetamaru wrote:

Workaround for height collapsing:

heigth: 48px is a heigth value of the v-app-bar.

Hope this bug will be fixed soon.

— Reply to this email directly, view it on GitHub https://github.com/vuetifyjs/vuetify/issues/15202#issuecomment-1358085661, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUNXNSED66I4FXQCMFBDATWOCT3BANCNFSM5XX6XE4Q. You are receiving this because you commented.Message ID: @.***>

r-this avatar Dec 20 '22 13:12 r-this

Still waiting ... @cheetamaru workaround is working, but it is a hack ...

pavloniym avatar Feb 15 '23 17:02 pavloniym

This bug is resolved as of the latest version.

If you have any questions, please reach out to us in our Discord community.

johnleider avatar May 01 '23 21:05 johnleider

again and again and again? :eyes:

BlackYuzia avatar May 03 '23 09:05 BlackYuzia

This is still blocked by https://github.com/vuejs/core/pull/6095

KaelWD avatar May 03 '23 09:05 KaelWD

I have the same issue working on [email protected] and [email protected] Is there any workaround?

mostafaznv avatar Jul 18 '23 12:07 mostafaznv

I have the same issue working on [email protected] and [email protected] Is there any workaround?

try using <client></client>

richardordinario avatar Jul 24 '23 03:07 richardordinario

If you're wrapping the whole page in <client> you might as well just disable ssr entirely.

KaelWD avatar Sep 10 '23 05:09 KaelWD

For you can simply set following styles on VMain to overcome this issue:

<VApp
  <VAppBar>
    ... your content here
  </VAppBar>
  <VMain
      style="
        --v-layout-left: 0px;
        --v-layout-right: 0px;
        --v-layout-top: 64px;
        --v-layout-bottom: 44px;
      "
    >
    ... your content here
  </VMain>
</VApp>

mubaidr avatar Oct 06 '23 05:10 mubaidr

This should be better on newer versions, but we're still waiting on upstream.

johnleider avatar Oct 09 '23 18:10 johnleider

https://github.com/vuejs/core/pull/7290 is released in vue 3.4 rc.1 Maybe it can be fixed now?

kingyue737 avatar Dec 26 '23 07:12 kingyue737

Mh i tried it with vue 3.4.0 rc3 but still weird rendering https://stackblitz.com/edit/github-wudebh-ppjcxg?file=plugins%2Fvuetify.ts

devonik avatar Dec 27 '23 05:12 devonik

@devonik https://github.com/vuetifyjs/vuetify/pull/15229 has not been merged

kingyue737 avatar Dec 27 '23 05:12 kingyue737

ui thanks there are so many issues regarding this. Must be a good feeling to able to finish them all

devonik avatar Dec 27 '23 06:12 devonik

Any news for this ?

devonik avatar Jan 08 '24 06:01 devonik

Working on it. Since we use TSX, Vue 3.4 requires changes on our end.

johnleider avatar Jan 08 '24 23:01 johnleider

We have the same bug

Link: https://bitsong.studio Repo: https://github.com/bitsongofficial/studio

https://github.com/vuetifyjs/vuetify/assets/1754055/33e7a6a2-59ec-489b-af17-e10e77a22644

angelorc avatar Feb 13 '24 15:02 angelorc