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

Added setting to hide/show left sidebar github buttons #396

Merged
merged 12 commits into from
Feb 11, 2021

Conversation

jatinkksharma
Copy link
Contributor

Mattermost github plugin issue - #384

@mattermod
Copy link
Contributor

Hello @jatinjtg,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@jatinkksharma jatinkksharma changed the title Added setting to hide/show left github sidebar actions Added setting to hide/show left sidebar github actions Oct 20, 2020
@jatinkksharma jatinkksharma changed the title Added setting to hide/show left sidebar github actions Added setting to hide/show left sidebar github buttons Oct 20, 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.

Thanks for your contribution @jatinjtg ! Some small text description changes, because many people don't know what the "LHS" of Left Hand Sidebar. I added text to explain what the feature is doing.

plugin.json Outdated Show resolved Hide resolved
server/plugin/manifest.go Outdated Show resolved Hide resolved
server/plugin/manifest.go Outdated Show resolved Hide resolved
plugin.json Outdated Show resolved Hide resolved
webapp/src/manifest.ts Outdated Show resolved Hide resolved
webapp/src/manifest.ts Outdated Show resolved Hide resolved
jatinkksharma and others added 3 commits October 20, 2020 17:07
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
@jasonblais jasonblais added 2: Dev Review Requires review by a core committer 3: QA Review Requires review by a QA tester labels Oct 20, 2020
jatinkksharma and others added 3 commits October 20, 2020 17:08
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
Co-authored-by: Aaron Rothschild <aaron.rothschild@gmail.com>
@hanzei hanzei linked an issue Oct 20, 2020 that may be closed by this pull request
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.

Thanks for the contribution. Just 2 comments.

server/plugin/api.go Outdated Show resolved Hide resolved
webapp/src/index.js Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 20, 2020

Codecov Report

Merging #396 (920dc70) into master (4b4bc21) will increase coverage by 0.00%.
The diff coverage is 25.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #396   +/-   ##
=======================================
  Coverage   19.34%   19.35%           
=======================================
  Files          11       11           
  Lines        2766     2770    +4     
=======================================
+ Hits          535      536    +1     
- Misses       2193     2196    +3     
  Partials       38       38           
Impacted Files Coverage Δ
server/plugin/configuration.go 28.12% <ø> (ø)
server/plugin/manifest.go 100.00% <ø> (ø)
server/plugin/api.go 7.54% <25.00%> (+0.08%) ⬆️

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 4b4bc21...920dc70. Read the comment docs.

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.

LGTM. A few comments on ordering

@@ -130,6 +134,7 @@ func (p *Plugin) initializeAPI() {

apiRouter.HandleFunc("/config", checkPluginRequest(p.getConfig)).Methods(http.MethodGet)
apiRouter.HandleFunc("/token", checkPluginRequest(p.getToken)).Methods(http.MethodGet)
apiRouter.HandleFunc("/settings", p.getSettings).Methods(http.MethodGet)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please move this after apiRouter.HandleFunc("/connected", p.getConnected).Methods(http.MethodGet) to keep the list sorted by middle ware type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like that change wasn't pushed. Could you please double check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry @hanzei for late reply. I have fixed the ordering.

plugin.json Outdated Show resolved Hide resolved
server/plugin/configuration.go Outdated Show resolved Hide resolved
@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

@jfrerich
Copy link
Contributor

Thanks for the PR, @jatinjtg! Do you need any assistance regarding the PR feedback?

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.

Nice work, LGTM 👍

@hanzei hanzei removed the 2: Dev Review Requires review by a core committer label Jan 14, 2021
@hanzei hanzei requested review from DHaussermann and removed request for aaronrothschild January 14, 2021 16:00
@hanzei hanzei added the Docs/Not Needed Does not require documentation label Jan 14, 2021
@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/cc @jasonblais @jfrerich @emilyacook

@jfrerich
Copy link
Contributor

@DHaussermann, gentle ping for review~

@DHaussermann
Copy link

/update-branch

@mattermod
Copy link
Contributor

We don't have permissions to update this PR, please contact the submitter to apply the update.

@DHaussermann
Copy link

@jfrerich - Not sure if there are many changes since the initial submission. Are you able to merge master in?

@jfrerich
Copy link
Contributor

jfrerich commented Feb 1, 2021

I don't have the ability to merge master into the author's repo. I created a branch in the mattermost repo that includes merged master into this branch. You can test this if you'd like.. https://github.com/mattermost/mattermost-plugin-github/commits/left_sidebar

These are the steps I took. to create the testable branch of this PR, with the latest master merged

From inside mattermost/mattermost-plugin-github

  • git checkout master
  • git pull
  • hub pr checkout 396
  • git merge master

@hanzei
Copy link
Contributor

hanzei commented Feb 8, 2021

@DHaussermann You can just test this PR as it is. There is to eminent need to sync it.

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 working as expected.

  • Options show and hide as expected
  • Works for one team with horizontal bar on LHS and for team sidebar
  • Work for octocat icon when user is not connected
  • New flag to show options default to true for seamless upgrade

Thanks @jamiehurewitz for this PR!

Not blocking for this change but @aaronrothschild, as described in this task, the flag hides the LHS and team sidebar items. We would need a separate PR if the goal is to hide all UI elements.

@DHaussermann DHaussermann added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester Lifecycle/1:stale labels Feb 10, 2021
@hanzei hanzei added this to the v2.1.0 milestone Feb 11, 2021
@hanzei hanzei self-assigned this Feb 11, 2021
@hanzei
Copy link
Contributor

hanzei commented Feb 11, 2021

/update-branch

@mattermod
Copy link
Contributor

We don't have permissions to update this PR, please contact the submitter to apply the update.

@hanzei hanzei merged commit f46f8f4 into mattermost:master Feb 11, 2021
@hanzei
Copy link
Contributor

hanzei commented Feb 11, 2021

Thanks @jatinjtg for the contribution!

@hanzei hanzei removed their assignment Feb 11, 2021
@aaronrothschild
Copy link
Contributor

@chetanyakan Can you verify for me that you just wanted the LHS to be hidden by a system level setting? In Jira, we hide all webapp components (including the post-action message to log a Jira ticket in the drop down menu).

Is hiding the LHS notifications sufficient for your request or do we need another ticket to cover "hiding the post-action menu item to create New/Attach GitHub issues"

@chetanyakan
Copy link
Contributor

@aaronrothschild Thanks for confirming. Another ticket for further changes is not required at the moment.

The changes from this PR are enough to satisfy my requirements for the time being, since having multiple plugins that register an LHS component is not as obtrusive anymore.

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 Docs/Not Needed Does not require documentation Hacktoberfest hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal - Add a system console setting to allow disabling UI components
10 participants