-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix push buttons and remove Push to Github flow #5720
base: main
Are you sure you want to change the base?
Conversation
@@ -27,7 +32,7 @@ export function ActionSuggestions({ | |||
onClose={handleDownloadClose} | |||
isOpen={isDownloading} | |||
/> | |||
{gitHubToken ? ( | |||
{gitHubToken && selectedRepository ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change that fixes the push buttons
@@ -34,26 +30,6 @@ export function ProjectMenuCard({ | |||
setContextMenuIsOpen((prev) => !prev); | |||
}; | |||
|
|||
const handlePushToGitHub = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the "Push to Github" button which was not necessary I don't think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would show up after you already pushed and created a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't believe so but not 100% sure. Originally this only showed up on local setup only...And it seems unnecessary. I'll wait for Stephan to comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is found in the bottom right project card, after clicking the three dots. The options are "push to github" or "download zip"
It makes sense to remove it if we already display it in the chat interface
@@ -31,11 +29,6 @@ export function ProjectMenuCardContextMenu({ | |||
{t(I18nKey.PROJECT_MENU_CARD_CONTEXT_MENU$CONNECT_TO_GITHUB_LABEL)} | |||
</ContextMenuListItem> | |||
)} | |||
{isConnectedToGitHub && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the "Push to github" button.
@@ -51,7 +47,6 @@ export const useWSStatusChange = () => { | |||
let additionalInfo = ""; | |||
|
|||
if (gitHubToken && selectedRepository) { | |||
dispatch(clearSelectedRepository()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here was clearing the selected repository. That's why the bottom right it was not showing the repository correctly. Is removing this okay? I tested it but don't know all the impacts.
I also needed to remove this because otherwise "selectedRepository" would be null and so the "Push" buttons would not show up correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugh I was just hitting this too!
@@ -34,26 +30,6 @@ export function ProjectMenuCard({ | |||
setContextMenuIsOpen((prev) => !prev); | |||
}; | |||
|
|||
const handlePushToGitHub = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is found in the bottom right project card, after clicking the three dots. The options are "push to github" or "download zip"
It makes sense to remove it if we already display it in the chat interface
End-user friendly description of the problem this fixes or functionality that this introduces
Fix push buttons and remove Push to Github flow
Give a summary of what the PR does, explaining any non-trivial design decisions
This fixes two bugs:
Push to Branch
andPush & Create PRs
will only show up if you have connected to github and have a repository selectedThis also removes:
Push to Github
button which was just an additional workflow but not necessary?I'm not a react expert but I did test these scenarios:
Link of any specific issues this addresses
#5112