Skip to content

Fix option box responsive cards#688

Open
Creylay wants to merge 2 commits into
developfrom
fix/option-box-responsive-cards
Open

Fix option box responsive cards#688
Creylay wants to merge 2 commits into
developfrom
fix/option-box-responsive-cards

Conversation

@Creylay
Copy link
Copy Markdown
Collaborator

@Creylay Creylay commented Jun 5, 2026

Summary

Improved the responsiveness of the option card grid shown on module home pages (Models, Datasets, Generative). Cards now adapt their column count based on the actual content area width rather than the viewport, so opening/closing sidebars correctly reflows the layout. Card height is fixed per viewport breakpoint to keep all cards the same size. Also shortened the ImageClassificationTask description to be consistent in length with other tasks.


Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • DashAI/back/tasks/image_classification_task.py: Shortened DESCRIPTION to a single concise sentence per language, consistent with other tasks.
  • DashAI/front/src/components/threeSectionLayout/OptionBox.jsx: Replaced fixed height: 250 with responsive breakpoint values; fixed description truncation bug caused by flexGrow conflicting with -webkit-line-clamp by wrapping the text in a container Box.
  • DashAI/front/src/components/threeSectionLayout/SelectOptionMenu.jsx: Added useContainerColumns hook using ResizeObserver to compute column count from the actual container width instead of the viewport, so the grid reflows correctly when sidebars are toggled.

Testing

  • Open the Models module and toggle the left/right sidebars — the card grid should reflow between 1, 2, and 3 columns based on available space.
  • Verify that description text is never clipped mid-word and the ... only appears at the end of the last visible line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant