pd4d10 / git-touch

An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Apache License 2.0
1.56k stars 137 forks source link

Add Organizations of a user #58

Closed shreyas1599 closed 4 years ago

shreyas1599 commented 4 years ago

Currently, the organizations a user belongs to is not displayed. Also, if a repo belongs to an organization instead of an individual as is the case with this repo, the link of the organization won't work.

So we need an organization screen and on the profile page, the list of organizations the user is a part of. Where do you think we could place it? (It'd just be a row(s) of profile pictures)

image

Below the yellow line or above the contributions graph or anywhere else?

pd4d10 commented 4 years ago

I'm not sure. Seems both would be OK?

shreyas1599 commented 4 years ago

@pd4d10 I need some help. I'm trying to add the organization connection in gh_user.graphql. Under repositoryOwner and inside ... on User is where I'm trying to place it. But for some reason it affects the results of ... on Organization in gh_user.dart. Am I doing anything wrong?

pd4d10 commented 4 years ago

It seems an issue of the artemis lib: https://github.com/comigor/artemis/issues/18

I tried to upgrade its version before but got another problem: https://github.com/comigor/artemis/issues/63#issuecomment-590172267

shreyas1599 commented 4 years ago

Alright. Also in the org_repo screen some organizations have to enable permission for us to be able to fetch details. For example, I'm able to view the Google organization but not the git touch organization (it is stuck on loading forever). Do you think if would be good to add a timeout option and tell display a pop-up telling the user about this? But as far as I know you are already displaying an error message if an error occurs. Still no error message pops up. Maybe because we should add a timeout feature?

pd4d10 commented 4 years ago

I'm not sure if the permission you mentioned is related to this:

https://github.com/git-touch/git-touch/blob/805f065def16e008d65d5fc230eb1a212df93319/lib/screens/gh_org_repos.dart#L10-L15

We have changed it from GraphQL to RESTful API to avoid the access restriction.

pd4d10 commented 4 years ago

. Maybe because we should add a timeout feature?

Agreed. We could have one.

shreyas1599 commented 4 years ago

I'm not sure if the permission you mentioned is related to this:

https://github.com/git-touch/git-touch/blob/805f065def16e008d65d5fc230eb1a212df93319/lib/screens/gh_org_repos.dart#L10-L15

We have changed it from GraphQL to RESTful API to avoid the access restriction.

Yeah, I saw this but for some reason it still doesn't load even though the organization is public( I'm talking about git-touch). Timeout sounds like a hacky fix for now. Doesn't point to the underlying problem.