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

Merge FEATURE-create-issue-modal into master #239

Merged
merged 36 commits into from
May 18, 2020
Merged

Conversation

jfrerich
Copy link
Contributor

Summary

This PR is a request to merge the FEATURE-create-issue-modal into the master branch.

NOTE TO PR REVIEWERS:

All of the code has been approved in previous PRs that were incrementally merged into the feature branch. Please review with this in mind (ie. you've likely already given in-depth reviews)

QA: To expedite the turnaround time to Feature Complete, we omitted QA from the incremental PRs, once I took over the code from the original author. @DHaussermann, you should see fixes for all items you found in the original PR for this feature.

Here is the comment from that original PR. #123 (comment)

dhadiseputro and others added 6 commits March 20, 2020 13:08
* Implemented modal to create GitHub issue through the posts' dropdown options

* Implemented some feedback from the PR

* api.go
  - add missing bracket and remove getting repositories from inside err block
  - replace hard coded 410 with http.StatusGone
gitub_repo_selector.jsx
  - remove unused isValid() function
create_issue.jsx
  - remove assignment for close variable because using this.props.close directly
create_issue.jsx
  - use GitHubIcon component in place of fa* class

* remove pre-declare for githubClient

* isolate errors in create_issue modal to it's own component and don't
pass to github_repo_selector component and have it handle it's parents
errors

Co-authored-by: Lev <1187448+levb@users.noreply.github.com>
Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* GitHubRepoSelector component
  - now uses ReactSelectSetting component
  - made into its own component so it can be shared with the attach
    comment to issue modal, which needs a repo selector
  - uses the new validator component for validation in the
    ReactSelectSetting component
  - getReps()
    - called only once when componentDidMount is called
    - performs the client call to get the repos
  - pulled this.state variables initialization into its own initialState
    variable

CreateIssueModal component
  - holds selected repo state
  - calls validator component

ReactSelectSetting component
  - handles validation
  - handles reducing values when typing text in the search box
  - handles multiple select types automatically

Setting component
  - simple component to render the select and validation components in
    ReactSelectSetting

Validator component
  - contains addComponent function to attach an "isvalid" function to
    a ReactSelectSetting components. Passed down from parent
    CreateIssueModal
  - contains validate() function for computing if all registers
    componsents are valid

* Fix a couple of PR change requests

* Add action getRepos
Add yourRepos Prop

* Review feedback fixes
@jfrerich jfrerich added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Apr 14, 2020
@jfrerich jfrerich self-assigned this Apr 14, 2020
@codecov-io
Copy link

codecov-io commented Apr 14, 2020

Codecov Report

Merging #239 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #239   +/-   ##
=======================================
  Coverage   18.72%   18.72%           
=======================================
  Files          10       10           
  Lines        2302     2302           
=======================================
  Hits          431      431           
  Misses       1847     1847           
  Partials       24       24           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef63090...ef63090. Read the comment docs.

hanzei
hanzei previously requested changes Apr 16, 2020
Copy link
Contributor

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

Thanks for adding this great feature 👍

server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
webapp/src/components/modals/create_issue/create_issue.jsx Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
Copy link
Contributor

@larkox larkox left a comment

Choose a reason for hiding this comment

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

LGTM. Mostly nitpicks and questions.

server/api.go Show resolved Hide resolved
webapp/src/components/react_select_setting.jsx Outdated Show resolved Hide resolved
webapp/src/components/modals/create_issue/index.js Outdated Show resolved Hide resolved
server/api.go Outdated Show resolved Hide resolved
@hanzei hanzei added this to the v1.0.0 milestone Apr 25, 2020
@hanzei hanzei requested a review from mickmister May 9, 2020 00:10
@hanzei
Copy link
Contributor

hanzei commented May 9, 2020

@jfrerich I did deffer some of the webapp comments towards you given that I don't understand the code well.

@mickmister Please let me know which of the webapp comments are blocking.

@mickmister
Copy link
Member

@hanzei After looking through my requested changes, there are none that are blocking. I'm making a ticket for the option.label vs option.value situation, and investigating why we need to do the checkAndHandleNotConnected call.

@mickmister mickmister removed the 2: Dev Review Requires review by a core committer label May 9, 2020
@DHaussermann
Copy link

DHaussermann commented May 14, 2020

There is a bit of an issue remaining with create functionality. The business logic is not consistent between Create and Attach when the plugin is not locked to any Organization.

Attach will allow attaching to any public repo where you're able to add an issue comment.

Create will allow you to create an issue in any repo where you are a member or contributor. Public repos that allow any users to create an issue are not returned in seaach

@aaronrothschild - I don't feel too strongly that the attach functionality is more correct (it's a bit awkward to use). It's not necessarily an issue that I can do something from the Web UI but not via the plugin. But, having inconsistent business logic between the 2 features is more of an issue. I would suggest that the logic of which repos you can create in match the Attach functionality Thoughts?

All other issues (listed in the linked item by Jason) have been resolved!

@DHaussermann DHaussermann added the 1: PM Review Requires review by a product manager label May 14, 2020
@mickmister
Copy link
Member

Attach will allow attaching to any public repo where you're able to add an issue comment.

@DHaussermann I always thought this was a bit overkill. My opinion is to change the attach functionality to match create, and only include repos that you are a member/contributor of. If I want to create an issue or comment on a repo that I am not a member of, I wouldn't think this plugin would help me do that. It should be a more tailored experience for the user imo.

@DHaussermann
Copy link

My opinion is to change the attach functionality to match create, and only include repos that you are a member/contributor of.

I'm inclined to agree with @mickmister I don't think being able to comment in any public repo adds too much value and it makes the usability worse. One thing to conciser is that we already have attach out in production. We would need to clearly release note that we're making this change.

@mickmister
Copy link
Member

It seems to me that this is ready to merge. I've created a ticket to change the "Attach to Issue" functionality as it seems obvious that the UX should be tailored to the user. I'd like to get this merged so we can address the remaining issues in separate PRs.

@DHaussermann I think we can merge once we have your blessing on this. Regarding the followup change for "Attach to Issue", I agree with "We would need to clearly release note that we're making this change."

@hanzei
Copy link
Contributor

hanzei commented May 16, 2020

👍 for continuing the discussion about "Attach to Issue" in #273

@aaronrothschild aaronrothschild removed the 1: PM Review Requires review by a product manager label May 18, 2020
Copy link
Contributor

@aaronrothschild aaronrothschild left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@DHaussermann DHaussermann left a comment

Choose a reason for hiding this comment

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

Tested and passed

  • Functional testing completed
  • All issues identified previously with create functionality have been resolved.
  • Follow-up issue created to make the business logic consistent for the pre-exiting attach functionality

LGTM!

Updated release testing to cover this feature.

@DHaussermann DHaussermann added 4: Reviews Complete All reviewers have approved the pull request QA Review Done PR has been approved by QA and removed 3: QA Review Requires review by a QA tester labels May 18, 2020
@hanzei hanzei merged commit f3ed305 into master May 18, 2020
@hanzei hanzei deleted the FEATURE-create-issue-modal branch May 18, 2020 17:19
@hanzei hanzei added this to Submitted in Integrations Team via automation May 18, 2020
@hanzei hanzei moved this from Submitted to Done in Integrations Team May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request QA Review Done PR has been approved by QA
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Feature Branch - Create Issue Modal] - Add GitHubRepoSelector component to the Attach Comment Modal
9 participants