blade-sensei / learning

Roadmap for software engineer, sandbox, algorithms training, it also contains my daily task dashboard
9 stars 2 forks source link

roadtoninja web site: create activity page. Better visibility on github activity #65

Closed blade-sensei closed 4 years ago

blade-sensei commented 4 years ago

draft sketch

notes about architecture pros cons

blade-sensei commented 4 years ago

archicture

blade-sensei commented 4 years ago

need to start mockups

blade-sensei commented 4 years ago

I was thinking about, what i really need and how. I need a overview of a progress in a day OR days. So i need to see clearly what are the comments of all REPOS/Projects in a same page (github doesnt prive a global overview dashboard).. Github provides an activity page "in profil" but there no details and you need to open PAGES and PAGES to see specific issus or comment... I need a page where i can see ALL. Groupy by projects and comments.

To allow a review and see a progress during x1 time to x20. I need that this page allows me to set a period time.

So: a repo while get a board. in this board we put issues. That we will comment.

Activity will fetch all the COMMENTS. ISSUES for each REPO. GRoup by repo of a specific TIME (today) or (from 2March to 2 April) example. !!!

I iwll create comments in a issue called "daily". This will allow me to organize my "tomorrow" todo list in a "reminder app" samsung.

blade-sensei commented 4 years ago

Mock

New Wireframe 1

blade-sensei commented 4 years ago
query {

  viewer {
  issues(
    first: 5
    orderBy: { field: UPDATED_AT, direction: ASC},
    filterBy: { since: "2020-04-18T00:00:00Z"}
  ) {
      edges {
        node {
          repository {
            name
          }
          labels(first: 4) {
            edges {
              node {
                name
              }
            }
          }
          title,
          createdAt,
          updatedAt
          state
          comments(first:10) {
            edges {
              node {
                body
                createdAt,
                updatedAt
              }
            }
          }
        }
      }
    }
  }
}
blade-sensei commented 4 years ago

 const client = new HttpLink({
  uri: 'https://api.github.com/graphql',
  request: (operation) => {
    operation.setContext({
      headers: {
        authorization: `Bearer ${token}`
      }
    })
  }
});
`
``
blade-sensei commented 4 years ago

using apollo to get graphql data -> error wrap root element i tried to wrap the root with ApolloProvier but i didn't work.. i found another solution in this repo:

https://github.com/codebushi/gatsby-global-state

Create a global state to pass a client apollo instance.

blade-sensei commented 4 years ago

Then i can get issues information like labels/name/number/state (without need extra request as like using rest API)

I can access comments directly, i assume that i will not comment more than 10 times an issue. so i set limit to first 10 comments per issue.

20/04 I can call GraphQL API Github with Apollo I pass client apollo instance. Works in browser

Now i need to refactor components

Next: Primary

blade-sensei commented 4 years ago

Next steps

blade-sensei commented 4 years ago

Samsung internet (browser) doesnt handle input type date very well