Giter VIP home page Giter VIP logo

Comments (4)

snazzyfox avatar snazzyfox commented on June 11, 2024

Adding a couple screenshots to illustrate my point: with the vuetify docs site itself, at 1280x720, the example table is perfectly readable:

image

When I reduce the viewport by 1px, the table goes into mobile mode, which now makes the page completely unreadable as the rest of the page is still designed for desktop mode:

image

from vuetify.

webdevnerdstuff avatar webdevnerdstuff commented on June 11, 2024

You can set the mobile prop to false and it will disable it. You can also specifically set which breakpoint it should break to mobile by setting the same prop using useDisplay. 1280 is a default mobile size so that is correct, so personally I like to set it as smAndDown.

Basic example

from vuetify.

snazzyfox avatar snazzyfox commented on June 11, 2024

Thanks. Yes, I understand that this can be adjusted or disabled manually so a workaround exists.

I'd still consider this a bug though since it's not working "as advertised". I think it makes the most sense for the mobile layout to be disabled by default and only enabled if a breakpoint is explicitly set. Other components such as stepper is already done this way. There are a few reasons for it:

  • DataTable isn't a page layout component and don't have to scale with the screen, so it doesn't make sense to change layouts based on the viewport size. The desktop and mobile layouts are also significantly different which means they may require separate design attention. This is what sets it apart from most other automatically-responsive components like nav drawer, toolbar, etc.
  • The breakpoint isn't one-size-fits-most unlike other components. What fits in a certain width varies depending on the content inside. So picking 1280px arbitrarily is counter-productive since this default isn't necessarily "better most of the time".
  • It's more likely for someone to leave the default in by accident, than actually wanting the default behavior. Someone designing for mobile would be already testing at different sizes and setting breakpoints anyways. But someone who doesn't care about mobile likely won't even know the mobile layout is a feature, and end up leaving it in resulting in a bug down the line.
  • It's also a silent behavior change from 3.5, so it can easily be added to existing apps by accident.

from vuetify.

webdevnerdstuff avatar webdevnerdstuff commented on June 11, 2024

You do make some good points to be considered.

from vuetify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.