Skip to content

Project issues containing images overflow(-x) theirs columns #31667

Closed
@SimonPistache

Description

@SimonPistache

Description

It is possible to insert images in issues as attachement. When such issues are displayed in Projects, the card often display some images on top of the issue. This is practical as it allow to peek issues by images and illustrations rather than reading titles.

Sometimes, images in cards are resized to fit in, and sometime they are full-sized.

Issue

However, sometime they are wider than the card, and overflow on the column containing the card (on the x axis).

  • It display an horizontal scrollbar on the bottom of the column
  • It move all cards of a column at once when scrolling horizontally
  • It feel weird
Capture d’écran 2024-07-21 à 02 01 27

Also, the images are overflowing the card while dragging it:
Capture d’écran 2024-07-21 à 02 00 52

Suggestion

Make the images scrolls in the card instead:
Enregistrementdelecran2024-07-21a03 03 56-ezgif com-video-to-gif-converter

  • Scrollbars only in card having overflowing images
  • Only scroll images in cards, not all cards of a column
  • Scroll snap to the closest image
  • Overlapping scrollbars on some OS and browsers (Windows 10<, Some Linux distros)
  • Card properly framed while dragging
Capture d’écran 2024-07-21 à 02 52 14

To create this effect I changed the following:

.issue-card {
  /* [...] */
  align-items:stretch;
}

.card-attachment-images {
  /* [...] */
  overflow:scroll;
  cursor: default;
  scroll-snap-type: x mandatory;
}

.card-attachment-images img {
  /* [...] */
  text-align: left;
  scroll-snap-align: center;
}

What do you think ?

Screenshots

Capture d’écran 2024-07-21 à 02 01 27

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

No

Operating System

No response

Browser Version

Firefox 128

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions