Skip to content

Conversation

@silverwind
Copy link
Member

  1. Set a fixed height on the element, preventing the content after the element from shifting on page load. This uses CSS container query length units as I saw no other way because of the non-linear scaling of the element.
  2. Move the "total-contributions" text into the existing vue slot, eliminating the need for absolute positioning.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 6, 2025
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if that CSS shorthand is already widely supported

@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 Nov 6, 2025
@silverwind
Copy link
Member Author

silverwind commented Nov 6, 2025

It's using min-height now so it can gracefully degrade in browsers that don't support cqw units, (like PaleMoon).

Edit: actually it will probably fail to parse @container making the whole rule invalid, so I will revert. This means the element will "pop in" in unsupporting browsers.

@silverwind
Copy link
Member Author

I've added a fallback for browsers without support for container queries and tested it in Palemoon.

@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 Nov 6, 2025
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 6, 2025

Please address #35876 (comment) before merging.

I don't want to keep cleaning up various pollution and style conflicts in the future.

@wxiaoguang wxiaoguang marked this pull request as draft November 6, 2025 06:11
@silverwind
Copy link
Member Author

silverwind commented Nov 6, 2025

That's impossible to address as outlined above. The container is set on the closest possible parent nodes.

@silverwind
Copy link
Member Author

silverwind commented Nov 6, 2025

The only thing that may be possible is to change the user page to use flex-container layout, eliminating one container-type, but that will be more involved to change.

@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Nov 6, 2025
@wxiaoguang wxiaoguang marked this pull request as ready for review November 6, 2025 06:25
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 6, 2025

Hmm, found something new, there is already a container<div id="user-heatmap"> in heatmap.tmpl and it already has width: 100%; .

I think I can try to make some changes to reuse it

@wxiaoguang wxiaoguang marked this pull request as draft November 6, 2025 06:32
@silverwind
Copy link
Member Author

Dedicated container added. width: 100% is unnecessary on it because block elements have that as their default.

@silverwind
Copy link
Member Author

You can do your changes now.

@silverwind
Copy link
Member Author

I would not do aspect-ratio unconditionally, it's only for unsupporting browsers.

@wxiaoguang
Copy link
Contributor

I would not do aspect-ratio unconditionally, it's only for unsupporting browsers.

That's just a debug step (you can pretend that not seeing it 🤣 ), I have correctly applied your approach.

@wxiaoguang wxiaoguang marked this pull request as ready for review November 6, 2025 06:55
@silverwind
Copy link
Member Author

Changes look good. Let's also backport this as a minor enhancement.

@silverwind silverwind merged commit eef9406 into go-gitea:main Nov 6, 2025
25 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Nov 6, 2025
@silverwind silverwind deleted the heatmapscale branch November 6, 2025 08:23
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Nov 6, 2025
1. Set a fixed height on the element, preventing the content after the
element from shifting on page load. This uses CSS [container query
length
units](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries#container_query_length_units)
as I saw no other way because of the non-linear scaling of the element.
2. Move the "total-contributions" text into the existing vue slot,
eliminating the need for absolute positioning.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Nov 6, 2025
silverwind added a commit that referenced this pull request Nov 6, 2025
Backport #35876 by @silverwind

1. Set a fixed height on the element, preventing the content after the
element from shifting on page load. This uses CSS [container query
length
units](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries#container_query_length_units)
as I saw no other way because of the non-linear scaling of the element.
2. Move the "total-contributions" text into the existing vue slot,
eliminating the need for absolute positioning.

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 10, 2025
* giteaofficial/main:
  Allow to display embed images/pdfs when SERVE_DIRECT was enabled on MinIO storage (go-gitea#35882)
  Add proper page title for project pages (go-gitea#35773)
  Use correct form field for allowed force push users in branch protection API (go-gitea#35894)
  Fix team member access check (go-gitea#35899)
  Add ability for local makefile with personal customizations that wouldnt affect remote repo (go-gitea#35836)
  Add toolchain directive to go.mod (go-gitea#35901)
  Display source code downloads last for release attachments (go-gitea#35897)
  Fix conda null depend issue (go-gitea#35900)
  Fix avatar upload error handling (go-gitea#35887)
  Move `gitea-vet` to use `go tool` (go-gitea#35878)
  Contribution heatmap improvements (go-gitea#35876)
  Update to go 1.25.4 (go-gitea#35877)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/v1.25 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants