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

Refactor suggestions #211

Open
alexeyinkin opened this issue Apr 11, 2023 · 1 comment · May be fixed by #225
Open

Refactor suggestions #211

alexeyinkin opened this issue Apr 11, 2023 · 1 comment · May be fixed by #225
Assignees
Labels

Comments

@alexeyinkin
Copy link
Contributor

alexeyinkin commented Apr 11, 2023

The current problems with suggestions:

  • They cannot be disabled, Allow autocomplete to be disabled #206
  • CodeController is aware of them by owning PopupController and commanding it.
  • They are generally poorly designed because we did not clean them up when got ownership.
  • The widget cannot be customized.
  • Cannot be closed by Escape, Please make the code completion popup closable with ESC #219
  • Box is flipped if in the bottom there's not enough space for max suggestion box height not the actual needed height.
  • Positioning is not covered by tests.
@alexeyinkin
Copy link
Contributor Author

The idea is to have CodeFieldOverlay widget that has:

  • CodeController controller
  • CodeField child (or maybe we can allow CodeField anywhere in the tree below).

CodeFieldOverlay listens to controller and can show and hide the popup.

To disable suggestions, CodeField should be created without CodeFieldOverlay.

To customize the suggestion box, one can copy our CodeFieldOverlay and make it show any other box.

Later we can add overlay builders to CodeFieldOverlay to simplify customization further.

@alexeyinkin alexeyinkin added the P2 label Apr 11, 2023
@yescorp yescorp self-assigned this Apr 17, 2023
@yescorp yescorp linked a pull request Apr 18, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants