jasudev / axiscontribution Goto Github PK
View Code? Open in Web Editor NEWA library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.
License: MIT License
A library that expresses a github contribution calendar through an array of dates. Supports iOS and macOS.
License: MIT License
After updating from 0.5.0 to main, I noticed a difference in the way the current week is displayed.
Previously, the cells in the week would only be visible up to and including the current day (say, Tuesday), with Wednesday - Saturday being the background color.
Now, all cells of the current week are visible, and are gray if they have no data.
It feels like this is a regression, because in theory, days in the future shouldn't have any data, so they shouldn't be displayed at all. It also helps the user visualize where they are in the current week.
When there's data like Date(): ACData(date: Date(), count: 5)
, It's blank for today's grid.
Also, the first week doesn't show correctly. While today is Tuesday, it shouldn't show the complete week with 7 days. There should be only 3 grids instead of 7, under the situation that Sunday is the first weekday.
Reproduce:
When the preview code is like this:
struct ACGridStack_Previews: PreviewProvider {
static var previews: some View {
AxisContribution(
constant: .init(),
source: [
Date(): ACData(date: Date(), count: 5)
]
)
.padding()
}
}
Following code does not work due to Color(hex: 0xF0F0F0)
is not accessible from outside of package.
AxisContribution(constant: .init(), source: [Date(), Date()]) { indexSet, data in
Image(systemName: "heart.fill")
.foregroundColor(Color(hex: colorScheme == .dark ? 0x171B21 : 0xF0F0F0)) // compile error
.font(.system(size: rowSize))
.frame(width: rowSize, height: rowSize)
} foreground: { indexSet, data in
Image(systemName: "heart.fill")
.foregroundColor(Color(hex: 0x6CD164)) // compile error
.font(.system(size: rowSize))
.frame(width: rowSize, height: rowSize)
}
Could we have the Days of the Week always be visible? This would make it easier to understand for a first time user. I would suggest having it overlayed. I tried doing it myself but I don't have enough experience with custom layouts and calendars.
This lib is so cool, but when I tried it in Widget, I got following error, it just me?
Thread 3: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB)
Xcode Version 14.2 (14C18)
When create object from ACData
, xcode throws error like title describe. And after adding public
for init
the error was gone.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.