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

Textarea with solo style #51

Closed
guimillet opened this issue Oct 10, 2021 · 3 comments · Fixed by #56
Closed

Textarea with solo style #51

guimillet opened this issue Oct 10, 2021 · 3 comments · Fixed by #56
Labels
bug Something isn't working

Comments

@guimillet
Copy link
Contributor

Description

Textareas with solo style are incorrectly displayed with voila-vuetify, the width is too large:

image

Reproduce

import ipyvuetify as v
solo1 = v.Textarea(solo=True, v_model='Solo')
solo2 = v.Textarea(solo=True, v_model='Solo')
tf1 = v.Textarea(v_model='Default')
tf2 = v.Textarea(v_model='Default')
v.Container(
    _metadata={'mount_id': 'content'},
    children=[
        v.Row(children=[solo1, solo2]),
        v.Row(children=[tf1, tf2])
    ]
)

Render with vuetify-base template.

Expected behavior

In comparison, there is no issue in Jupyterlab or with voila lab template:

image

Context

  • voila version 0.2.16
  • Operating System and version: Ubuntu 20.04.3 LTS
  • Browser and version: Chrome 94.0.4606.54
Troubleshoot Output
        voila                     0.2.16             pyhd8ed1ab_0    conda-forge
        voila-vuetify             0.5.2              pyhd8ed1ab_0    conda-forge
Command Line Output
Paste the output from your command line running `voila` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.

If using JupyterLab

  • JupyterLab version: 3.1.14
Installed Labextensions
.../.local/share/jupyter/labextensions
        jupyter-vuetify v1.8.1 enabled OK

.../conda/share/jupyter/labextensions
jupyter-vue v1.6.0 enabled OK
[...]

@guimillet guimillet added the bug Something isn't working label Oct 10, 2021
@guimillet
Copy link
Contributor Author

The problem also occurs with the outlined style:
image

The width of the v-input__slot section remains equal to that of the parent v-input__control whatever the padding of v-input__slot, hence the overflow (with the lab template, width+padding of v-input__slot = width of v-input__control).

Similar issue with a Container inside a Container.

Another issue, which may not be related, is that the scroll bar on the right is always present.

@ahmadpgh
Copy link

ahmadpgh commented Dec 19, 2021

@guimillet Did you manage to resolve this issue? I have a very similar problem with having scrollbars on popup dialogs and off margins/padding for them

@mariobuikhuizen
Copy link
Member

Looks like the styles we remove because they were giving a lot of conflicts, aren't removed any more, because they are part of index.css in later versions of Voila. See:

if (styleTag.textContent.includes("/* Override Blueprint's _reset.scss styles */")) {
.

I think it's also the cause for #ipyvuetify/200

In the case of this issue, this rule is setting the wrong boxing model:

*,
*::before,
*::after {
 box-sizing: unset;
}

Setting it to the correct boxing model in dev-tools restores the right rendering:
Screenshot 2021-12-20 at 14 43 53

mariobuikhuizen added a commit to mariobuikhuizen/voila-vuetify that referenced this issue Dec 20, 2021
Fixes voila-dashboards#51 and #ipyvuetify/200

Removing the blueprint reset styles doesn't work in newer versions
of Voila, which causes the wrong boxing model to be used.
mariobuikhuizen added a commit that referenced this issue Oct 7, 2022
Fixes #51 and #ipyvuetify/200

Removing the blueprint reset styles doesn't work in newer versions
of Voila, which causes the wrong boxing model to be used.
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

Successfully merging a pull request may close this issue.

3 participants