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

refactor(VSlideGroup): replace css transform with native scroll #17286

Merged
merged 17 commits into from
Apr 23, 2024

Conversation

men232
Copy link
Contributor

@men232 men232 commented May 3, 2023

Replacement of css transform which repeats native scroll functionality but makes it impossible to use the touchpad.

  • RTL support implemented
  • Vertical direction implemented
  • Scroll animation implemented
<template>
  <v-app>
    <v-locale-provider>
      <v-container max-height="600" max-width="600">
        <v-card>
          <v-tabs
            v-model="tab2"
            bg-color="deep-purple-darken-4"
            show-arrows
            center-active
          >
            <v-tab value="1">One</v-tab>
            <v-tab value="2">Two</v-tab>
            <v-tab value="3">Three</v-tab>
            <v-tab value="4">Four</v-tab>
            <v-tab value="5">Five</v-tab>
            <v-tab value="6">Six</v-tab>
            <v-tab value="7">Seven</v-tab>
            <v-tab value="8">Eight</v-tab>
            <v-tab value="9">Nine</v-tab>
            <v-tab value="10">Ten</v-tab>
            <v-tab value="11">Eleven</v-tab>
            <v-tab value="12">Twelve</v-tab>
            <v-tab value="13">Thirteen</v-tab>
            <v-tab value="14">Fourteen</v-tab>
            <v-tab value="15">Fifteen</v-tab>
            <v-tab value="16">Sixteen</v-tab>
            <v-tab value="17">Seventeen</v-tab>
            <v-tab value="18">Eighteen</v-tab>
            <v-tab value="19">Nineteen</v-tab>
            <v-tab value="20">Twenty</v-tab>
          </v-tabs>
        </v-card>
      </v-container>
    </v-locale-provider>

    <v-container>
      <v-card>
        <v-toolbar color="primary">
          <v-toolbar-title>User Profile</v-toolbar-title>
        </v-toolbar>
        <div class="d-flex flex-row">
          <v-tabs
            v-model="tab"
            direction="vertical"
            color="primary"
            class="flex-shrink-0"
          >
            <v-tab value="option-1">
              <v-icon start> mdi-account </v-icon>
              Option 1
            </v-tab>
            <v-tab value="option-2">
              <v-icon start> mdi-lock </v-icon>
              Option 2
            </v-tab>
            <v-tab value="option-3">
              <v-icon start> mdi-access-point </v-icon>
              Option 3 13123123123
            </v-tab>
          </v-tabs>
          <v-window v-model="tab">
            <v-window-item value="option-1">
              <v-card flat>
                <v-card-text>
                  <p>
                    Sed aliquam ultrices mauris. Donec posuere vulputate arcu.
                    Morbi ac felis. Etiam feugiat lorem non metus. Sed a libero.
                  </p>

                  <p>
                    Nam ipsum risus, rutrum vitae, vestibulum eu, molestie vel,
                    lacus. Aenean tellus metus, bibendum sed, posuere ac, mattis
                    non, nunc. Aliquam lobortis. Aliquam lobortis. Suspendisse
                    non nisl sit amet velit hendrerit rutrum.
                  </p>

                  <p class="mb-0">
                    Phasellus dolor. Fusce neque. Fusce fermentum odio nec arcu.
                    Pellentesque libero tortor, tincidunt et, tincidunt eget,
                    semper nec, quam. Phasellus blandit leo ut odio.
                  </p>
                </v-card-text>
              </v-card>
            </v-window-item>
            <v-window-item value="option-2">
              <v-card flat>
                <v-card-text>
                  <p>
                    Morbi nec metus. Suspendisse faucibus, nunc et pellentesque
                    egestas, lacus ante convallis tellus, vitae iaculis lacus
                    elit id tortor. Sed mollis, eros et ultrices tempus, mauris
                    ipsum aliquam libero, non adipiscing dolor urna a orci.
                    Curabitur ligula sapien, tincidunt non, euismod vitae,
                    posuere imperdiet, leo. Nunc sed turpis.
                  </p>

                  <p>
                    Suspendisse feugiat. Suspendisse faucibus, nunc et
                    pellentesque egestas, lacus ante convallis tellus, vitae
                    iaculis lacus elit id tortor. Proin viverra, ligula sit amet
                    ultrices semper, ligula arcu tristique sapien, a accumsan
                    nisi mauris ac eros. In hac habitasse platea dictumst. Fusce
                    ac felis sit amet ligula pharetra condimentum.
                  </p>

                  <p>
                    Sed consequat, leo eget bibendum sodales, augue velit cursus
                    nunc, quis gravida magna mi a libero. Nam commodo suscipit
                    quam. In consectetuer turpis ut velit. Sed cursus turpis
                    vitae tortor. Aliquam eu nunc.
                  </p>

                  <p>
                    Etiam ut purus mattis mauris sodales aliquam. Ut varius
                    tincidunt libero. Aenean viverra rhoncus pede. Duis leo.
                    Fusce fermentum odio nec arcu.
                  </p>

                  <p class="mb-0">
                    Donec venenatis vulputate lorem. Aenean viverra rhoncus
                    pede. In dui magna, posuere eget, vestibulum et, tempor
                    auctor, justo. Fusce commodo aliquam arcu. Suspendisse enim
                    turpis, dictum sed, iaculis a, condimentum nec, nisi.
                  </p>
                </v-card-text>
              </v-card>
            </v-window-item>
            <v-window-item value="option-3">
              <v-card flat>
                <v-card-text>
                  <p>
                    Fusce a quam. Phasellus nec sem in justo pellentesque
                    facilisis. Nam eget dui. Proin viverra, ligula sit amet
                    ultrices semper, ligula arcu tristique sapien, a accumsan
                    nisi mauris ac eros. In dui magna, posuere eget, vestibulum
                    et, tempor auctor, justo.
                  </p>

                  <p class="mb-0">
                    Cras sagittis. Phasellus nec sem in justo pellentesque
                    facilisis. Proin sapien ipsum, porta a, auctor quis, euismod
                    ut, mi. Donec quam felis, ultricies nec, pellentesque eu,
                    pretium quis, sem. Nam at tortor in tellus interdum
                    sagittis.
                  </p>
                </v-card-text>
              </v-card>
            </v-window-item>
          </v-window>
        </div>
      </v-card>
    </v-container>
  </v-app>
</template>

<script>
  export default {
    name: 'Playground',
    setup () {
      return {
      //
      }
    },
    data: () => ({
      tab2: '1',
      items: [
        { tab: 'One', content: 'Tab 1 Content' },
        { tab: 'Two', content: 'Tab 2 Content' },
        { tab: 'Three', content: 'Tab 3 Content' },
        { tab: 'Four', content: 'Tab 4 Content' },
        { tab: 'Five', content: 'Tab 5 Content' },
        { tab: 'Six', content: 'Tab 6 Content' },
        { tab: 'Seven', content: 'Tab 7 Content' },
        { tab: 'Eight', content: 'Tab 8 Content' },
        { tab: 'Nine', content: 'Tab 9 Content' },
        { tab: 'Ten', content: 'Tab 10 Content' },
      ],
      tab: 'option-1',
    }),
  }
</script>

men232 added 2 commits May 3, 2023 23:12
Replacement of css transform which repeats native scroll functionality but makes it impossible to use the touchpad.

- RTL support implemented
- Vertical direction implemented
- Scroll animation implemented
@men232
Copy link
Contributor Author

men232 commented May 4, 2023

There is failed swipe test but most likely it’s a testing problem, swipe works on mobile devices.

@KaelWD KaelWD added T: enhancement Functionality that enhances existing features C: VTabs VTabs C: VSlideGroup labels May 16, 2023
@KaelWD KaelWD added this to the v3.4.0 (Blackguard) milestone May 16, 2023
@KaelWD KaelWD force-pushed the master branch 8 times, most recently from 45b3d9c to 742779f Compare May 21, 2023 13:20
@github-actions
Copy link
Contributor

github-actions bot commented May 21, 2023

🚀 Nightly release published to @vuetify/nightly@3.3.0-pr-17286.f05fa71.

@KaelWD KaelWD force-pushed the master branch 2 times, most recently from 51899ee to 3e2b5cb Compare May 21, 2023 14:11
@KaelWD KaelWD added this to the v3.6.0 (Nebula) milestone Apr 19, 2024
@johnleider johnleider assigned KaelWD and unassigned men232 Apr 22, 2024
@KaelWD KaelWD merged commit 93bd7b5 into vuetifyjs:dev Apr 23, 2024
10 checks passed
@KaelWD KaelWD changed the title refactor(VSlideGroup): replacement of css transform with native scroll refactor(VSlideGroup): replace css transform with native scroll Apr 23, 2024
@jenngreiner
Copy link

jenngreiner commented May 14, 2024

@KaelWD I am trying to use v-chip-group (vuetify version 3.6.4, but this happens on any version after 3.6.0) and am getting an error about goTo and VSlideGroup.. I cant recreate in the vuetify playground otherwise i would make a bug ticket for this.. do you have any idea how to resolve this error? It's causing v-chip-group to not render.
Error: [Vuetify] Could not find injected goto instance
Vue warn]: injection "Symbol(vuetify:goto)" not found. at <VSlideGroup centerActive=false direction="horizontal" symbol= Symbol(vuetify:v-slide-group) ... > at <VChipGroup>

@johnleider
Copy link
Member

The goTo instance is registered when Vuetify is registered. I would need to see your application.

@jenngreiner
Copy link

@johnleider I'm not able to provide access to my application but is there something specific that needs to be included in order to support goTo when registering vuetify?

@johnleider
Copy link
Member

Instantiating Vuetify should be enough.

@jenngreiner
Copy link

Is there any reason why this would work in all versions prior to 3.6.0? Nothing has changed about the way i am instantiating vuetify.

@johnleider
Copy link
Member

Nothing changed that I would expect to cause your issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VSlideGroup C: VTabs VTabs T: enhancement Functionality that enhances existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants