feat: improve commit-history list on mobile #2
No reviewers
Labels
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
codefloe/forgejo-codefloe!2
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mobile-commit-view"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Screenshot
Time Abbreviation Feature
Overview
This feature adds abbreviated time display functionality to Forgejo's commit list interface, providing a more compact representation of timestamps while maintaining full tooltip information.
Implementation
Backend Changes
A new function
TimeSinceAbbreviatedhas been added to theDateUtilstemplate utility inmodules/templates/util_date.go:TimeSinceAbbreviated(time any) template.HTMLTemplate Changes
Updated
templates/repo/commits_list.tmplto:DateUtils.TimeSinceAbbreviatedinstead ofDateUtils.TimeSinceUI Layout Changes
Author Column:
Date/Actions Column:
Time Abbreviation Format
The feature converts standard relative time strings to abbreviated versions:
s30s agom5m agoh3h agod2d agomo1mo agoy1y agoin Xsin 5mFeatures
Testing
Comprehensive tests added in
modules/templates/util_date_test.gocovering:Files Modified
modules/templates/util_date.go- Added TimeSinceAbbreviated functiontemplates/repo/commits_list.tmpl- Updated to use abbreviated time display and flexible column widthmodules/templates/util_date_test.go- Added comprehensive testsweb_src/css/repo.css- Added CSS rules for auto-sizing date columnbfef3ae495to7c2fd083117c2fd08311to327c1c1227327c1c1227to2a89fece892a89fece89tob60e1a50a3b60e1a50a3to6d15b878c86d15b878c8toaa8d0b139daa8d0b139dtoa649eebb34feat: improved mobile-commit historyto feat: improve commit-history list on mobile