Git Product home page Git Product logo

Comments (6)

arjunvegda avatar arjunvegda commented on August 11, 2024 1

Do you have a CSB that I can play around with? I'd like to avoid adding a new option if possible in this case.

Setting padding-bottom: 0px as !important on userland might be a good workaround for now, I suppose.

body {
  padding-bottom: 0px !important;
}

from jotai-devtools.

arjunvegda avatar arjunvegda commented on August 11, 2024 1

Thanks for the CSB! Let me think of other solutions.

I'm not a huge fan of modifying the body's style, it leads to hacks like !important on userland, and it's also a side-effect from the library's point of view. So, I'm inclining towards removing the padding-bottom feature entirely. I think the majority of the users would naturally expect the component to float on top of their content anyways. We could provide a copy-pastable snippet to the users that may need this functionality ๐Ÿค”

Another temporary workaround (while we land on a proper fix) would be to set the height of #root to 100vh, like this?

#root {
  height: 100vh;
}

BTW, your app looks cool!

from jotai-devtools.

arjunvegda avatar arjunvegda commented on August 11, 2024 1

@PrettyCoffee - I releasedย the fix as part of ^0.4.0 ๐Ÿ™Œ Please feel free to re-open the issue if the problem still persists.

from jotai-devtools.

PrettyCoffee avatar PrettyCoffee commented on August 11, 2024

Here is a somewhat downsized codesandbox example of the problem:
https://codesandbox.io/s/jotai-devtools-padding-owp02c?file=/src/styles.css

That's what I am currently working on (for more context):
image

What I am trying to do with the devtools is something like this, when pressing a specific key:
image

I am able to achieve most of these things by using it's css classes and existing props, but the body padding requires me to use !important which I would prefer not to do, since !important is a bad practice in my opinion and not an option for me.

That being said, my problem seems to be pretty specific since I got this 100% height layout. And there is also always the option to use useAtomDevtools, if you prefer not to introduce an option for the padding. ๐Ÿ™‚

from jotai-devtools.

PrettyCoffee avatar PrettyCoffee commented on August 11, 2024

Very good point.
Usually I try to avoid height: 100vh; since that can introduce laggy behavior for mobile devices, but this doesn't matter here since the app does not have a scope for mobile devices. Therefore I will just use that for now and wait for the fix, thank you! ๐Ÿ™‚

from jotai-devtools.

PrettyCoffee avatar PrettyCoffee commented on August 11, 2024

Working perfectly, thank you!

from jotai-devtools.

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.