Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repository): Show issues only when is enable #328

Conversation

jouderianjr
Copy link
Member

Closes #296

Before After

@@ -353,20 +358,25 @@ class Repository extends Component {
</SectionList>

{!repository.fork &&
repository.has_issues && (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, that is the only real change, all other changes were made by the pre-commit hook.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep no worries, we're using prettier (https://prettier.io/) and attached it as a precommit step :)

Not sure this is the solution to the issue however. As a user, I still want to be able ot add a new issue when there are no issues present and removing the section entirely won't help that. I think the issue was referring to removing the New Issue button only if adding new issues aren't enabled rather than the entire SectionList (and I'm not sure the has_issues attribute is for this). Does that make sense mate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, so I didn't destroy anything 😄

So I've tested in one repository and on the github site the whole section is removed when we disable the issue option, So I thought that could be better just remove the section in the app as well.

Ps. This has_issue field is a flag to describe if the repository has issue feature or not.

https://developer.github.com/v3/repos/

screen shot 2017-09-12 at 23 24 18

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oooooh my apologies you're right, and here I thought it meant if was a boolean that that returned based on issues.length :P

Thanks my man, this is awesome thank you for this 👏

@housseindjirdeh housseindjirdeh merged commit e4ee75f into gitpoint:master Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants