-
-
Notifications
You must be signed in to change notification settings - Fork 30
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: Post a highlight #101
Conversation
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 user experience is not great. We should change this to the following.
- The social card is not needed since the user is already on GitHub.
- We should populate the title (using the existing titles from the PR) and description (using the pr description generation endpoint)
On submit should use the AI.
Sure, I will remove the social cards, as for the generation, I will be waiting an answer from anush or divyansh to implement it. |
We can conditionally render the "Post On Highlights" button in the extension drop-down page when the user visits a GitHub PR page authored by them and can have the title, PR URL pre-filled in the highlight creation form with a button to generate the description. I can add these once the we are good to go with your highlight creation form. |
Thank you anush, I was stuck at the URL thingy, but unblocked right now. |
@Anush008 A user should be able to post highlights not authored by them. i.e. a feature they opened an issue on will be an option. Also, a maintainer or co-author is another scenario. |
We have a check right now that prevents the "Add to highlights" button from being added to PRs not authored by the signed-in user. We'll have to remove that too. |
Hey @a0m0rajab. About 33eb47d, the message passing between content-scripts and the extension is prone to |
Thank you for that, I did not finish it yet, just committed to record my process and not lose it. |
Here is a video of the extension: 2023-05-25_00-56-44.mp4Is there feedback about it right now? In the next iteration, I will add the needed checks for the post to insights button to conditionally disable it. Why not render it? Cause I think if the user sees the button will get curios about how to use it, which will be explained in the button text/ |
As for the
I think it's not enabled right now, will have to check that later. |
@Anush008 I got stuck with the AI endpoint logic. I tried to follow a logic similar to the one you used, but it did not give me any output. |
Looks good, but I think it feels a little bland rn, maybe use opensauced orange for the submit button. |
This will need a rebase from beta for a lint and merge conflict fix. |
Side note: an option to have multiple shot prompts or even change the prompt to make it more feasible for social media would be great. |
Making this a minimally viable product is the goal.
|
@bdougie are you on the latest commit? It's working locally for me. One thing that might need to be done is to refresh the page (CTRL+SHIFT+R) hard since the connection between content-scripts and popups might not work. If the issue is still after hard refresh can you share the output from the console in the extension and the GitHub page? @diivi nope, this is a warning it keeps generating a warning when you solve it. There is a conflict in the lint options there. 2023-05-27_22-38-07.mp4 |
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.
The copy needs updates to give the user more context
@a0m0rajab I updated all the copy to be more descriptive for the user. @diivi or @Anush008 can you give this a code review? We can iterate on this after this is merged, but for basic functionaly, it works. |
This PR uses message passing between the GH content-script and the pop-up page to get info from the GH webpage. Which as we previously experienced is prone to |
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.
π
Let's merge this now as is and continue to iterate and improve this. This will definitely need usage docs in docs.opensauced.pizza |
@bdougie thank you for that.
which I used at this line: |
## [1.3.1-beta.4](v1.3.1-beta.3...v1.3.1-beta.4) (2023-05-29) ### π Bug Fixes * Post a highlight ([#101](#101)) ([e3b7051](e3b7051))
π This PR is included in version 1.3.1-beta.4 π The release is available on GitHub release Your semantic-release bot π¦π |
Sometimes the message listener in the content-script unmounts and the sender(pop-up page) gets the |
Our previous encounter with |
## [1.4.0](v1.3.0...v1.4.0) (2023-06-03) ### β Tests * add tests for checkAuth.ts ([#149](#149)) ([3a79fac](3a79fac)) * add tests for utils/urlMatchers.ts ([#143](#143)) ([26702e6](26702e6)) ### π Bug Fixes * Post a highlight ([#101](#101)) ([e3b7051](e3b7051)) * remove auto-take message from triage.yml ([258a828](258a828)) * rename triage.yml ([3b9a14b](3b9a14b)) * undefined config during build ([#158](#158)) ([c986086](c986086)) ### π Features * latest highlights ([#154](#154)) ([0ccd0e7](0ccd0e7)) * uses username on highlight instead of full name ([#162](#162)) ([801fe5a](801fe5a))
π This PR is included in version 1.4.0 π The release is available on GitHub release Your semantic-release bot π¦π |
## [1.3.1-beta.4](open-sauced/ai@v1.3.1-beta.3...v1.3.1-beta.4) (2023-05-29) ### π Bug Fixes * Post a highlight ([#101](open-sauced/ai#101)) ([e3b7051](open-sauced/ai@e3b7051))
## [1.4.0](open-sauced/ai@v1.3.0...v1.4.0) (2023-06-03) ### β Tests * add tests for checkAuth.ts ([#149](open-sauced/ai#149)) ([3a79fac](open-sauced/ai@3a79fac)) * add tests for utils/urlMatchers.ts ([#143](open-sauced/ai#143)) ([26702e6](open-sauced/ai@26702e6)) ### π Bug Fixes * Post a highlight ([#101](open-sauced/ai#101)) ([e3b7051](open-sauced/ai@e3b7051)) * remove auto-take message from triage.yml ([258a828](open-sauced/ai@258a828)) * rename triage.yml ([3b9a14b](open-sauced/ai@3b9a14b)) * undefined config during build ([#158](open-sauced/ai#158)) ([c986086](open-sauced/ai@c986086)) ### π Features * latest highlights ([#154](open-sauced/ai#154)) ([0ccd0e7](open-sauced/ai@0ccd0e7)) * uses username on highlight instead of full name ([#162](open-sauced/ai#162)) ([801fe5a](open-sauced/ai@801fe5a))
What type of PR is this? (check all applicable)
Description
This adds "post on highlights" button to the extension for users.
fixes #88
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?