Giter Club home page Giter Club logo

axiscontribution's People

Contributors

alfredcc avatar arturolee avatar jasudev avatar moophis avatar yuntan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

axiscontribution's Issues

Full week of cells is shown in the current week (regression)

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.

Bug: Code in the main branch doesn't show today's data

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()
    }
}

This is the result:
image

How to use Color extension

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)
}

Days of the Week Always Visible (Improvement)

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.