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

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

Closed
SimonPistache opened this issue Jul 21, 2024 · 6 comments
Closed

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

SimonPistache opened this issue Jul 21, 2024 · 6 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@SimonPistache
Copy link
Contributor

SimonPistache commented Jul 21, 2024

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

@SimonPistache SimonPistache added topic/ui Change the appearance of the Gitea UI type/bug labels Jul 21, 2024
@SimonPistache SimonPistache changed the title Project issues containing images overflows theirs columns Project issues containing images overflow(-x) theirs columns Jul 21, 2024
@yp05327
Copy link
Contributor

yp05327 commented Jul 23, 2024

Can you create a PR to fix it?
I have done something last year in #26561, but it is.... stopped.

@SimonPistache
Copy link
Contributor Author

SimonPistache commented Jul 23, 2024

Can you create a PR to fix it? I have done something last year in #26561, but it is.... stopped.

I'll have a look this week, it should be possible to make something with both issues. To me toying with devtools is a thing, changing the source code is another level i'm not certain I have yet :)

@yp05327
Copy link
Contributor

yp05327 commented Jul 23, 2024

Never mind. If you want to, then just try it. You can ask for help at any time.

@SimonPistache
Copy link
Contributor Author

Thanks for the support, i'll give it a shot then. 🙂

What about the idea? Having scrollbar on images on card is ok to all?

@yp05327
Copy link
Contributor

yp05327 commented Jul 23, 2024

I think it is not bad, so I suggested you to create a PR.
But I suggest adding some pictures like this: ▊
This may broke the vertical view I think.

SimonPistache added a commit to SimonPistache/gitea that referenced this issue Jul 23, 2024
As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains images, they can overflow the card on its containing column. This aims to fix this issue via snapping scrollbars .
SimonPistache added a commit to SimonPistache/gitea that referenced this issue Jul 23, 2024
…inter cleanup

Remove changes originated from linter,
Revert changes on web_src/css/repo/issue-card.css as it looks like it's not part of the target changes.
SimonPistache added a commit to SimonPistache/gitea that referenced this issue Jul 23, 2024
…inter cleanup

Remove changes originated from linter,
Revert changes on web_src/css/repo/issue-card.css as it looks like it's not part of the target changes.
SimonPistache added a commit to SimonPistache/gitea that referenced this issue Jul 23, 2024
Remove changes originated from linter, as it introduced a lot of visual diff.
@lunny lunny added this to the 1.22.2 milestone Aug 12, 2024
lunny pushed a commit that referenced this issue Aug 12, 2024
…31683)

As discussed in #31667 & #26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue #31667 is open to discussion as there should be room for
improvement.
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Aug 12, 2024
…o-gitea#31683)

As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue go-gitea#31667 is open to discussion as there should be room for
improvement.
lunny pushed a commit that referenced this issue Aug 13, 2024
…31683) (#31823)

Backport #31683 by @SimonPistache

As discussed in #31667 & #26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue #31667 is open to discussion as there should be room for
improvement.

Co-authored-by: Simon Priet <[email protected]>
@lunny
Copy link
Member

lunny commented Aug 14, 2024

Resolved by #31683

@lunny lunny closed this as completed Aug 14, 2024
4kProgrammer pushed a commit to 4kProgrammer/gitea that referenced this issue Aug 20, 2024
Squashed commit:

[e1468e2] Fixes for unreachable project issues when transfer repository from organization (go-gitea#31770)
dfhgfdhfghfg
When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.

Fix for go-gitea#31538

Co-authored-by: Jason Song <[email protected]>

[c39643f] fghfghf

[38a09ea] render plain text file if the LFS object doesn't exist (go-gitea#31812)gfgdfg

We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

[2477511] Add spacing to global error message (go-gitea#31826)

Fixes go-gitea#31717.

Include Typescript files in Tailwind config so they can be
pre-processed.

![Screenshot from 2024-08-13
08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)

[5bcab0b] [skip ci] Updated translations via Crowdin

[fe7c941] Scroll images in project issues separately from the remaining issue (go-gitea#31683)

As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue go-gitea#31667 is open to discussion as there should be room for
improvement.

[8883d99] Support issue template assignees (go-gitea#31083)

Resolve go-gitea#13955
4kProgrammer pushed a commit to 4kProgrammer/gitea that referenced this issue Aug 20, 2024
Squashed commit:

[e1468e2] Fixes for unreachable project issues when transfer repository from organization (go-gitea#31770)
dfhgfdhfghfg
When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.

Fix for go-gitea#31538

Co-authored-by: Jason Song <[email protected]>

[c39643f] fghfghf

[38a09ea] render plain text file if the LFS object doesn't exist (go-gitea#31812)gfgdfg

We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

[2477511] Add spacing to global error message (go-gitea#31826)

Fixes go-gitea#31717.

Include Typescript files in Tailwind config so they can be
pre-processed.

![Screenshot from 2024-08-13
08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)

[5bcab0b] [skip ci] Updated translations via Crowdin

[fe7c941] Scroll images in project issues separately from the remaining issue (go-gitea#31683)

As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue go-gitea#31667 is open to discussion as there should be room for
improvement.

[8883d99] Support issue template assignees (go-gitea#31083)

Resolve go-gitea#13955
4kProgrammer pushed a commit to 4kProgrammer/gitea that referenced this issue Aug 20, 2024
Squashed commit:

[e1468e2] Fixes for unreachable project issues when transfer repository from organization (go-gitea#31770)
dfhgfdhfghfg
When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.

Fix for go-gitea#31538

Co-authored-by: Jason Song <[email protected]>

[c39643f] fghfghf

[38a09ea] render plain text file if the LFS object doesn't exist (go-gitea#31812)gfgdfg

We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

[2477511] Add spacing to global error message (go-gitea#31826)

Fixes go-gitea#31717.

Include Typescript files in Tailwind config so they can be
pre-processed.

![Screenshot from 2024-08-13
08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)

[5bcab0b] [skip ci] Updated translations via Crowdin

[fe7c941] Scroll images in project issues separately from the remaining issue (go-gitea#31683)

As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue go-gitea#31667 is open to discussion as there should be room for
improvement.

[8883d99] Support issue template assignees (go-gitea#31083)

Resolve go-gitea#13955
4kProgrammer pushed a commit to 4kProgrammer/gitea that referenced this issue Aug 20, 2024
Squashed commit:

[e1468e2] Fixes for unreachable project issues when transfer repository from organization (go-gitea#31770)
dfhgfdhfghfg
When transferring repositories that have issues linked to a project
board to another organization, the issues remain associated with the
original project board. This causes the columns in the project board to
become bugged, making it difficult to move other issues in or out of the
affected columns. As a solution, I removed the issue relations since the
other organization does not have this project table.

Fix for go-gitea#31538

Co-authored-by: Jason Song <[email protected]>

[c39643f] fghfghf

[38a09ea] render plain text file if the LFS object doesn't exist (go-gitea#31812)gfgdfg

We had an issue where a repo was using LFS to store a file, but the user
did not push the file. When trying to view the file, Gitea returned a
500 HTTP status code referencing `ErrLFSObjectNotExist`. It appears the
intent was the render this file as plain text, but the conditional was
flipped. I've also added a test to verify that the file is rendered as
plain text.

[2477511] Add spacing to global error message (go-gitea#31826)

Fixes go-gitea#31717.

Include Typescript files in Tailwind config so they can be
pre-processed.

![Screenshot from 2024-08-13
08-44-33](https://github.com/user-attachments/assets/196d7801-e299-4000-8b39-cd9f89917f17)

[5bcab0b] [skip ci] Updated translations via Crowdin

[fe7c941] Scroll images in project issues separately from the remaining issue (go-gitea#31683)

As discussed in go-gitea#31667 & go-gitea#26561, when a card on a Project contains
images, they can overflow the card on its containing column. This aims
to fix this issue via snapping scrollbars.

---
Issue go-gitea#31667 is open to discussion as there should be room for
improvement.

[8883d99] Support issue template assignees (go-gitea#31083)

Resolve go-gitea#13955
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Aug 20, 2024
…issue (gitea#31683)

As discussed in go-gitea/gitea#31667 &
go-gitea/gitea#26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Conflict resolution: none

(cherry picked from commit fe7c9416777243264e8482d3af29e30c2b671074)
(cherry picked from commit 8e46efe)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Aug 20, 2024
…issue (gitea#31683)

As discussed in go-gitea/gitea#31667 &
go-gitea/gitea#26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Conflict resolution: none

(cherry picked from commit fe7c9416777243264e8482d3af29e30c2b671074)
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this issue Aug 21, 2024
…issue (gitea#31683)

As discussed in go-gitea/gitea#31667 &
go-gitea/gitea#26561, when a card on a Project
contains images, they can overflow the card on its containing column.
This aims to fix this issue via snapping scrollbars.

---
Backport: #5029
Conflict resolution: none
Modification: Remove the snapping of the images on the projects cards, the images are way too small to notice that when scrolling you're being snapped to these images and when you do notice it, it doesn't make sense as you wouldn't expect it to be snapped.

(cherry picked from commit 8e46efe)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

3 participants