Skip to content

fix(frontend): keep avatar and name visible in a narrow multiselect - #3714

Open
tink-bot wants to merge 1 commit into
mainfrom
agent/issue-3709
Open

fix(frontend): keep avatar and name visible in a narrow multiselect#3714
tink-bot wants to merge 1 commit into
mainfrom
agent/issue-3709

Conversation

@tink-bot

@tink-bot tink-bot commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Assignee dropdown rendered blank rows when its column got narrow — most visibly in the task detail modal, which caps the task view at 1024px, so a few active attribute fields squeeze the assignees column to ~130px.

Fixes #3709

Two causes, both in the search result row:

  • .search-result-button > span:first-child used flex: 1, a flex-basis of 0. Flexbox splits negative free space by flex-shrink × flex-base-size, so a zero-basis item gets none of it: .hint-text (basis auto) claimed whole row, option content resolved to width 0, then clipped by its own overflow: hidden. flex: 1 1 auto shrinks both proportionally; no change when row has room.
  • Hint is color: transparent until hover, so on cramped row it is invisible column eating width label needs. Dropped via container query — multiselect already declares container-type: inline-size.

.avatar-wrapper also gets flex-shrink: 0: Bulma's img { max-width: 100% } reset caps avatar at wrapper width, so shrinking wrapper collapsed avatar to zero.

How to verify

  1. Create a project with a kanban view and one task, and share the project with two or three other users.
  2. Give the task a priority, a progress value, a due date and a start date, so the task detail view shows five attribute columns.
  3. Open the kanban view and click the task to open it in the modal.
  4. Click "Assign to User" in the action list, then click into the assignee search field.
  5. Expected: every row in the dropdown shows a round avatar followed by the user's name, and clicking a row assigns that user.
    Before this PR: the dropdown opened but every row was blank, with no avatar and no name.

The assignee dropdown rendered blank rows whenever its column got narrow —
most visibly in the task detail modal, which caps the task view at 1024px so
a handful of active attribute fields squeezes the assignees column to ~130px.

Two causes, both in the search result row:

- `.search-result-button > span:first-child` used `flex: 1`, i.e. a flex-basis
  of `0`. Flexbox distributes negative free space in proportion to
  `flex-shrink × flex-base-size`, so a zero-basis item gets no share of it:
  the `.hint-text` sibling (flex-basis `auto`) claimed the whole row and the
  option content resolved to width 0, then got clipped by its own
  `overflow: hidden`. Using `flex: 1 1 auto` makes both items shrink
  proportionally; behaviour when the row has room is unchanged.
- The hint is `color: transparent` until the row is hovered, so on a cramped
  row it is an invisible column eating the width the label needs. Drop it via
  the container query the multiselect already declares a container for.

`.avatar-wrapper` also gets `flex-shrink: 0` — Bulma's `img { max-width: 100% }`
reset caps the avatar at its wrapper's width, so a shrinking wrapper collapsed
the avatar to zero even once the row had space again.

Fixes #3709
@github-actions github-actions Bot added area/avatars User avatar providers (Gravatar, LDAP, upload) and rendering area/frontend Frontend-only code or UI work area/task-editor Task detail view, inline editing, rich text labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-3714.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-3714 latest
https://sha-b1f2815a07256ae603b179afa0005d530f55457c.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-b1f2815a07256ae603b179afa0005d530f55457c b1f2815

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-3714 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-3714
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-3714

Last updated for commit b1f2815

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

Labels

area/avatars User avatar providers (Gravatar, LDAP, upload) and rendering area/frontend Frontend-only code or UI work area/task-editor Task detail view, inline editing, rich text

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assignees Selector Visually broken in Modal view

2 participants