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

feat: insert below and replace in smart-edit highlights text #2107

Merged
merged 26 commits into from
May 3, 2023
Merged

feat: insert below and replace in smart-edit highlights text #2107

merged 26 commits into from
May 3, 2023

Conversation

squidrye
Copy link
Contributor

Using open-ai to replace or insert a summary or spelling-fix from selected text was not highlighted due to which user had a hard time locating it in between large paragraphs. This PR adds this feature to highlight replacement text.

AwesomeScreenshot-3_25_2023.3.14.06PM.mp4

fixes #2059
requires #2100 to avoid inconsistencies

@squidrye squidrye marked this pull request as draft March 25, 2023 09:55
@squidrye squidrye marked this pull request as ready for review March 28, 2023 12:26
@squidrye squidrye marked this pull request as draft March 29, 2023 12:13
@squidrye
Copy link
Contributor Author

squidrye commented Mar 29, 2023

This was my first time working with integration tests got to learn a lot from it, did a hard reset to remove garbage commits which were failing integration tests. Mocks and tests written should be helpful in future for increasing test coverage if more work on ai-tools is done.

realized refactoring integration tests into multiple files is not a thing by default in flutter, so did a work-around for running multiple tests by creating a common test function and calling other test components in group of this main function, @a-wallen ran into similar issues in #2106, commits there seem to modify some scripts to run integration tests, so I'll be waiting on his pr to be merged, since commits here will be causing merge conflicts.

Also do suggest improvements in other files or tests.

@a-wallen
Copy link
Contributor

a-wallen commented Apr 4, 2023

@squidrye, thank you for your patience. Although #2106 was closed, the changes landed in #2083, please look at the docstring in board.dart to see how you can upload a workspace for an integration test, or feel free to use one of the existing workspaces.

@squidrye squidrye closed this Apr 4, 2023
@squidrye squidrye reopened this Apr 4, 2023
@squidrye
Copy link
Contributor Author

squidrye commented Apr 4, 2023

Hello @a-wallen, I have run into new set of problems here, recent commits have changed the dependency of appflowy_editor so now it is being fetched as a hosted package. So changes made in #2100 which are necessary for this feature to work, would be redundant now as appflowy_editor form path is not being used. What should we do about this, should I open a similar issue as #2100 in appflowy_editor repo? Also isn't it redundant to keep appflowy_editor under packages in root if it is being fetched as a hosted package.

Similarly commit eeacd87 made in this pr (that is a small issue in editor) would also be redundant.

@a-wallen
Copy link
Contributor

a-wallen commented Apr 6, 2023

You might want to merge/rebase off of upstream/main because of #2203 and #2212 if you haven't already.

@squidrye
Copy link
Contributor Author

squidrye commented Apr 6, 2023

Will do.

Edit: feature and tests are in place, once PR on appyflowy_editor is merged hopefully integration tests should pass and this issue would be closed.

@a-wallen
Copy link
Contributor

@squidrye, any plans for this?

@squidrye
Copy link
Contributor Author

Hi @a-wallen, all the tests and features are in place for this issue, some github tasks were failing due to other changes in appflowy_editor, I was busy with work recently so couldn't check up on if those were resolved. If all the tests pass here, I'll do a quick local test as well and mark this ready for review.

@annieappflowy annieappflowy added AI features built on top of artificial intelligence technology new feature New feature or request labels Apr 28, 2023
@annieappflowy annieappflowy added this to the v0.1.4 milestone Apr 28, 2023
@squidrye squidrye marked this pull request as ready for review April 28, 2023 12:43
@squidrye
Copy link
Contributor Author

I have tested this out locally, please review for merge.

Copy link
Contributor

@a-wallen a-wallen left a comment

Choose a reason for hiding this comment

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

Congrats on getting this completed! It looks solid.

I think you're the first user to load a preset workspace for an integration test. Could you let me know how your experience was and if there's anything we can do to improve the experience?

@LucasXu0 LucasXu0 merged commit 39b1ff0 into AppFlowy-IO:main May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI features built on top of artificial intelligence technology new feature New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FR] Insert below should highlight the summary
5 participants