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

Revert "Make pull request button a link" #275

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

cribeiro84
Copy link
Owner

Reverts #262 due the issue it has created that's now opening the PR details on both new window and same tab.

@cribeiro84 cribeiro84 merged commit e450f7d into main Apr 2, 2024
1 check passed
@cribeiro84 cribeiro84 deleted the revert-262-pull-request-button-link branch April 2, 2024 01:46
Copy link

sonarqubecloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@cribeiro84
Copy link
Owner Author

@kimsey0 - I had to revert the change due the impact it caused on the behavior of the extension. Currently, the extension supports a preference settings to open on the same or new tab. Let me know what exactly you want to solve so we can come up with a different approach.

@kimsey0
Copy link
Contributor

kimsey0 commented Jun 24, 2024

Sorry for the delay in coming back to you.

I want to be able to middle-mouse (scroll wheel) and control click links to have them open in a background tab, specifically for when I'm reviewing multiple pull request. With the current (button, not link) behavior, I have to click a pull request to open it in a new, active tab, then go back to the pull request manager hub tab, and repeat the process for each pull request I want to review. That's slow.

We can probably get the behavior you want with the preference settings by removing the onClick handler completely and just setting target="_blank" when the preference is set to open in a new tab. Does that sound agreeable @cribeiro84?

@cribeiro84
Copy link
Owner Author

No problem. My suggestion is to install the local dev version on an account you have so you can test it locally with debugger and everything else. Then you can simulate the clicks and check if the behavior was affected or not.
You can try to check which button was clicked on the click event method:
onClick={onClickPullRequestTitleHandler}

It's required to ensure the behavior won't affect other uses that prefer to keep the existing process. Perhaps you can add a new user preference flag that can be changed based on each preference of the user.

@kimsey0
Copy link
Contributor

kimsey0 commented Jun 24, 2024

I believe we can keep the existing behavior for all users without JavaScript at all. Let me try to code it up and test locally. :-)

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