0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-07 05:09:30 -05:00

Contribution heatmap improvements (#35876)

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>
This commit is contained in:
silverwind
2025-11-06 09:23:48 +01:00
committed by GitHub
parent aaa8033ee9
commit eef9406c6b
3 changed files with 34 additions and 34 deletions

View File

@@ -53,9 +53,6 @@ function handleDayClick(e: Event & {date: Date}) {
}
</script>
<template>
<div class="total-contributions">
{{ locale.textTotalContributions }}
</div>
<calendar-heatmap
:locale="locale.heatMapLocale"
:no-data-text="locale.noDataText"
@@ -65,5 +62,7 @@ function handleDayClick(e: Event & {date: Date}) {
:range-color="colorRange"
@day-click="handleDayClick($event)"
:tippy-props="{theme: 'tooltip'}"
/>
>
<template #vch__legend-left>{{ locale.textTotalContributions }}</template>
</calendar-heatmap>
</template>