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

[🐛 BUG] Selector defaults to occupying the full width #2377

Open
1 of 7 tasks
arcanaxion opened this issue Jan 3, 2025 · 6 comments
Open
1 of 7 tasks

[🐛 BUG] Selector defaults to occupying the full width #2377

arcanaxion opened this issue Jan 3, 2025 · 6 comments
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed 🔒 Staff only Can only be assigned to the Taipy R&D team

Comments

@arcanaxion
Copy link
Contributor

arcanaxion commented Jan 3, 2025

What went wrong? 🤔

Before 4.0, selectors would not occupy the full width unless it had the "fullwidth" stylekit class.

Since 4.0, it occupies the full width by default.

from taipy.gui import Gui
import taipy.gui.builder as tgb

value="Item 2"

with tgb.Page() as page:
    tgb.text("# Selector fullwidth", mode="md")
    tgb.selector("{value}", lov="Item 1;Item 2;Item 3")

if __name__ == "__main__":
    gui = Gui(page=page)
    gui.run(run_browser=False, use_reloader=True)

Screenshots

image

Browsers

Chrome

OS

Windows, Linux

Version of Taipy

develop

Acceptance Criteria

  • A unit test reproducing the bug is added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@arcanaxion arcanaxion added the 💥Malfunction Addresses an identified problem. label Jan 3, 2025
@xyfer17
Copy link

xyfer17 commented Jan 16, 2025

@arcanaxion I would like to pick this issue.

@FlorianJacta
Copy link
Member

I think it is intended. What are your thoughts @arcanaxion ?

@arcanaxion
Copy link
Contributor Author

I think it is intended. What are your thoughts @arcanaxion ?

So I guess from inspect tool the old behavior is that it had max-width: 15rem, which is now 100%. As someone with no affinity for design, I don't like having to explicitly specify a width.

To me, it was good when taipy decided for me that 15rem looks like a pretty good default for a selector. Then I could use stylekit "fullwidth", or god forbid, explicitly specify a width if my text was longer than that.

Also, docs say selector width property has a default of 360px

@FlorianJacta
Copy link
Member

I think the doc has an issue. What are your thoughts? @FabienLelaquais @FredLL-Avaiga It was done on purpose, right?

@jrobinAV jrobinAV added 🖰 GUI Related to GUI 🆘 Help wanted Open to participation from the community 🟩 Priority: Low Low priority and doesn't need to be rushed and removed 🆘 Help wanted Open to participation from the community 🟩 Priority: Low Low priority and doesn't need to be rushed labels Jan 17, 2025
@jrobinAV
Copy link
Member

After an internal discussion here is what has been decided.

We believe the 4.0 implementation is the right thing to do. However, we need to update the documentation. We also need to ensure the behavior is consistent across all the visual elements.

@jrobinAV jrobinAV added 🟨 Priority: Medium Not blocking but should be addressed 🔒 Staff only Can only be assigned to the Taipy R&D team labels Jan 24, 2025
@FlorianJacta
Copy link
Member

The problem is that it is inconsistent with number and input for example:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed 🔒 Staff only Can only be assigned to the Taipy R&D team
Projects
None yet
Development

No branches or pull requests

4 participants