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

prevent-pr-merge-panel-opening doesn't work properly #7280

Open
jackbentley opened this issue Mar 4, 2024 · 4 comments
Open

prevent-pr-merge-panel-opening doesn't work properly #7280

jackbentley opened this issue Mar 4, 2024 · 4 comments
Labels

Comments

@jackbentley
Copy link

jackbentley commented Mar 4, 2024

Description

The feature doesn't do what it says: it doesn't keep the PR merge panel closed after page reload

It also adds a bug where some PRs will have the merge panel opened even though it's never been opened before. Clicking cancel should but doesn't stop it from being opened on page reload.

How to replicate the issue + URL

Obviously this is going to be dependant on if you have maintainer access or not. So, I can't give any URLs. This should be present on any PR. I can't work out what causes the panel to open when it's never been opened before, though.

Extension version

24.2.8

Browser(s) used

Chrome

@jackbentley jackbentley added the bug label Mar 4, 2024
@fregante fregante changed the title prevent-pr-merge-panel-opening doesn't work properly prevent-pr-merge-panel-opening doesn't work properly Mar 31, 2024
@fregante
Copy link
Member

The feature doesn't do what it says

Read the name: PREVENT opening.

some PRs will have the merge panel opened even though it's never been opened before

This is the GitHub bug that this feature tries to fix

@jackbentley
Copy link
Author

Read the name: PREVENT opening.

Absolutely no need to be snarky. I appreciate I made a typo in the description but you could've been polite at least. I reported that it doesn't do what it says: It doesn't prevent it opening. I said it also actively opens it unnecessarily.

The feature doesn't do what it says: it doesn't keep the PR merge panel open closed after page reload

This is the GitHub bug that this feature tries to fix

No, what this apparently fixes (according to the description) is "after it’s been opened once". I was reporting a case where it's never been opened before which this will actively open it unnecessarily.


Regardless, I've tried again with this feature both enabled and disabled. It seems I can no longer reproduce this. It also seems the feature no longer does anything for me. The panel seems to always remains closed after a page reload regardless. Either it's related to me updating chrome, something has changed in GitHub, or this is an intermittent issue.

@fregante
Copy link
Member

fregante commented Apr 2, 2024

Sorry I wasn't trying to be snarky, I was just terse. The feature shouldn't cause the issue, it's a GitHub bug/behavior that is amplified by the other features that touch the PR title/description if I remember correctly.

GitHub's logic is:

  1. save any user input in sessionStorage
  2. if the page is reloaded and no new commits are in, restore the previous user input

Separately, there's another native feature of GitHub like:

  1. on user input, open the panel

Since our other features alter the contents of the panel, it's sometimes treated as user input, which triggers GitHub's own bug/behavior

In short, if the panel still opens, then prevent-pr-merge-panel-opening is simply broken.

@jackbentley
Copy link
Author

Sorry I wasn't trying to be snarky, I was just terse.

Not to worry.

When I opened the issue I was very certain it was this which was causing the panel to open on every PR page. Even ones which I had never visited prior.

I used the "Identify Feature" feature to find and disable it. I tested with it enabled and disabled and it seemed very definite it was causing the panel to open unnecessarily. However, as mentioned, I can't seem to replicate it any longer.

Thanks for the info on how the feature gets activated. I can confirm it's working as expected currently. Editing the textbox causes the mentioned behaviour and the feature does indeed fix it. I'll re-enable and keep my eye on it to see if the bug I reported of it opening unnecessarily happens again. Feel free to close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants