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

feat(#31666): Set the columns height to hug all its contents #31726

Merged

Conversation

SimonPistache
Copy link
Contributor

@SimonPistache SimonPistache commented Jul 29, 2024

In Projects, columns heights are defined by the sum of all contents height of the biggest column, rather than a fraction of the viewport height. It default to 60vh when there is no cards to display.


See issue #31666

In Projects, columns heights are defined by the sum of all contents height of the biggest column, rather than a fraction of the viewport height. It default to 60vh when there is no cards to display.
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 29, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 29, 2024
@SimonPistache SimonPistache marked this pull request as ready for review July 29, 2024 15:29
@SimonPistache
Copy link
Contributor Author

I noticed a visual bug while dragging issues around

Enregistrement.de.l.ecran.2024-07-29.a.19.58.42.mov

Looking for a fix

@SimonPistache SimonPistache marked this pull request as draft July 29, 2024 18:01
@SimonPistache SimonPistache changed the title feat(#31666): Set the columns height to hug all its contents WIP: feat(#31666): Set the columns height to hug all its contents Jul 29, 2024
SimonPistache and others added 2 commits August 6, 2024 09:09
As demonstrated in go-gitea#31726 (comment), an horizontal scrollbar can appears while dragging a card to a column from the right side, as the ghost card is animated to fit in. Force hidding the scrollbars using overflow:clip.
@SimonPistache
Copy link
Contributor Author

With the fix:

Enregistrement.de.l.ecran.2024-08-06.a.09.20.21.mov

@SimonPistache SimonPistache marked this pull request as ready for review August 6, 2024 07:21
A vertical scrollbar can appears while dragging a card-out, when the column height is higher than the heght-viewport and the board is being reduced (quicker than its contents). Force hidding the scrollbars using overflow:clip.
@SimonPistache SimonPistache changed the title WIP: feat(#31666): Set the columns height to hug all its contents feat(#31666): Set the columns height to hug all its contents Aug 6, 2024
@SimonPistache
Copy link
Contributor Author

I improved the columns behaviours when there is no cards in it. Now, the columns either takes all available height in the viewport, except if it's too small, defaulting to 300px height (and forcing a viewport scrollbar). This makes a newly created Project board attractive to start with.

Boards already having cards are not affected by this (Columns takes all available height from the viewport, except if it's too small then it "hug" by its contents.)

Enregistrement.de.l.ecran.2024-08-06.a.09.54.37.mov

@SimonPistache
Copy link
Contributor Author

SimonPistache commented Aug 13, 2024

There is an issue with this solution: The horizontal scrollbar is way down the board when there is more columns than the viewport can display at once.

Idea:
Using 2 divs to manage scrollbar individually:

<div id="project_board">
  <div class="class="board sortable"">

  </div>
</div>
#project_board {
    overflow-x: auto;
    overflow-y: hidden;
}

#project_board > .board {
    overflow-y: auto;
    display: inline-block;
    height: 100vh;
    white-space: normal;
}

This is going back as the idea of the board only overflowing a sub-rectangle of the viewport instead. And that this parent div must have some management of its (own) height.

@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Aug 14, 2024
@lunny lunny added this to the 1.23.0 milestone Aug 14, 2024
@techknowlogick techknowlogick added the type/enhancement An improvement of existing functionality label Sep 12, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 12, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 16, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 16, 2024
@lunny lunny enabled auto-merge (squash) September 16, 2024 20:37
@lunny lunny merged commit 859be09 into go-gitea:main Sep 16, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 16, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 18, 2024
* giteaofficial/main:
  Add missing comment reply handling (go-gitea#32050)
  Fix CI (go-gitea#32062)
  Lazy load avatar images (go-gitea#32051)
  Included tag search capabilities (go-gitea#32045)
  Do not escape relative path in RPM primary index (go-gitea#32038)
  feat(go-gitea#31666): Set the columns height to hug all its contents (go-gitea#31726)
  [skip ci] Updated translations via Crowdin
  [skip ci] Updated translations via Crowdin
  Use a common message template instead of a special one (go-gitea#31878)
  Check if the `due_date` is nil when editing issues (go-gitea#32035)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants