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: Added Editor API to set the ghost text #5036

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

andrewnester
Copy link
Contributor

Description of changes:

Added new Editor methods set/removeGhostText to work with the ghost text.

"Ghost" text is a kind of a preview text inside the editor which can be used to preview some code inline in the editor such as, for example, code completions.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Base: 86.11% // Head: 86.13% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (1866514) compared to base (ab4f788).
Patch coverage: 92.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5036      +/-   ##
==========================================
+ Coverage   86.11%   86.13%   +0.02%     
==========================================
  Files         546      546              
  Lines       41627    41677      +50     
  Branches     6555     6563       +8     
==========================================
+ Hits        35847    35899      +52     
+ Misses       5780     5778       -2     
Flag Coverage Δ
unittests 86.13% <92.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/css/editor.css.js 100.00% <ø> (ø)
src/editor.js 82.71% <77.77%> (-0.11%) ⬇️
src/virtual_renderer.js 79.81% <88.88%> (+0.16%) ⬆️
src/line_widgets.js 73.01% <100.00%> (+2.57%) ⬆️
src/virtual_renderer_test.js 99.14% <100.00%> (+0.07%) ⬆️
src/edit_session.js 85.84% <0.00%> (+0.08%) ⬆️
src/layer/text.js 91.73% <0.00%> (+0.20%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.


.ace_ghost_text {
opacity: 0.5;
font-style: italic;
Copy link
Member

Choose a reason for hiding this comment

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

Chrome console doesn't use italic, which makes it look more like the part of the typed word. I think it is better but maybe it's just a matter of getting used to.

@andrewnester andrewnester merged commit 958d573 into ajaxorg:master Jan 24, 2023
@andrewnester andrewnester deleted the feat-ghost-text branch January 24, 2023 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants