Skip to content

Commit 30979cb

Browse files
committed
Merge branch 'master' into text-completer-mod
2 parents 2450d72 + 31bbd6a commit 30979cb

27 files changed

+229
-121
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: "🌐 Add a project to the list of project using Ace on its website."
3+
description: Add a project to the list of projects using Ace, displayed on the website.
4+
title: "Add project (project name) to the list of projects using Ace on its website"
5+
labels: [website, needs-triage]
6+
assignees: []
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
The fastest way to get your project to be displayed on the website is to create a PR.
12+
Examples: https://github.com/ajaxorg/ace/pull/5014, https://github.com/ajaxorg/ace/pull/5222.
13+
If for any reason creating a PR is not an option for you, please proceed with filling out this issue. Thanks!
14+
- type: input
15+
id: name
16+
attributes:
17+
label: Project name
18+
description: A name of the project to be used on Ace website.
19+
validations:
20+
required: true
21+
- type: input
22+
id: project-link
23+
attributes:
24+
label: Project link
25+
description: A link to the project's website.
26+
validations:
27+
required: true
28+
- type: input
29+
id: logo-link
30+
attributes:
31+
label: Logo link
32+
description: |
33+
A link to the logo image to be used on the website for the project. If not provided, only the name of the project will be displayed.
34+
35+
By submitting this link, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
36+
validations:
37+
required: false
38+
- type: textarea
39+
id: info
40+
attributes:
41+
label: Additional information
42+
description: Any additional information you would like to share.
43+
validations:
44+
required: false
45+
- type: checkboxes
46+
id: ack
47+
attributes:
48+
label: Acknowledgements
49+
options:
50+
- label: I may be able to implement this request.
51+
required: false

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.23.4](https://github.com/ajaxorg/ace/compare/v1.23.3...v1.23.4) (2023-07-12)
6+
7+
8+
### Bug Fixes
9+
10+
* filterText triggered selection range removal when completions range was present ([#5249](https://github.com/ajaxorg/ace/issues/5249)) ([b586e4d](https://github.com/ajaxorg/ace/commit/b586e4d574bf780fc38f1ac0d034276272b36ad3))
11+
12+
### [1.23.3](https://github.com/ajaxorg/ace/compare/v1.23.2...v1.23.3) (2023-07-10)
13+
14+
15+
### Bug Fixes
16+
17+
* android bug when deleting multiple lines ([#5248](https://github.com/ajaxorg/ace/issues/5248)) ([bd066ff](https://github.com/ajaxorg/ace/commit/bd066ffef88ca74f5ac32349d3e868cfa875a47b)), closes [#5087](https://github.com/ajaxorg/ace/issues/5087)
18+
* update jshint version to 2.13.6; change esversion to target ECMAScript 11 ([#5243](https://github.com/ajaxorg/ace/issues/5243)) ([301aee9](https://github.com/ajaxorg/ace/commit/301aee91b5974d9fb31d646466ed301c5c3b8249))
19+
20+
### [1.23.2](https://github.com/ajaxorg/ace/compare/v1.23.1...v1.23.2) (2023-07-07)
21+
22+
23+
### Bug Fixes
24+
25+
* **autocomplete:** fix a11y violations ([#5241](https://github.com/ajaxorg/ace/issues/5241)) ([decb615](https://github.com/ajaxorg/ace/commit/decb6154198105289170303b7434c524eaf9fda8))
26+
* bug in guttertooltip when `tooltipsFollowsMouse` set to false ([#5217](https://github.com/ajaxorg/ace/issues/5217)) ([67d318e](https://github.com/ajaxorg/ace/commit/67d318ed25d5b45789462850e6b96aac2931591f))
27+
* typo in function name ([#5229](https://github.com/ajaxorg/ace/issues/5229)) ([6e99055](https://github.com/ajaxorg/ace/commit/6e99055c46f443271161e40fe15372d1d8ae9f42))
28+
29+
### [1.23.1](https://github.com/ajaxorg/ace/compare/v1.23.0...v1.23.1) (2023-06-27)
30+
531
## [1.23.0](https://github.com/ajaxorg/ace/compare/v1.22.1...v1.23.0) (2023-06-21)
632

733

Makefile.dryice.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ function buildTypes() {
190190

191191
var pathModules = [
192192
"declare module 'ace-builds/webpack-resolver';",
193+
"declare module 'ace-builds/esm-resolver';",
193194
"declare module 'ace-builds/src-noconflict/ace';"
194195
].concat(paths.map(function(path) {
195196
if (moduleNameRegex.test(path)) {
@@ -294,7 +295,7 @@ function jsFileList(path, filter) {
294295
filter = /_test/;
295296

296297
return fs.readdirSync(path).map(function(x) {
297-
if (x.slice(-3) == ".js" && !filter.test(x) && !/\s|BASE|(\b|_)dummy(\b|_)|\.css\.js$/.test(x))
298+
if (x.slice(-3) == ".js" && !filter.test(x) && !/\s|BASE|(\b|_)dummy(\b|_)|[\-\.]css\.js$/.test(x))
298299
return x.slice(0, -3);
299300
}).filter(Boolean);
300301
}

build

Submodule build updated 272 files

index.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,20 +1135,28 @@ <h1>Projects Using Ace</h1>
11351135
<div class="text-logo">trinket</div>
11361136
<a href="https://trinket.io/">trinket</a>
11371137
</li>
1138-
<li>
1138+
<li>
11391139
<a href="https://goonlinetools.com/">GoOnlineTools</a>
11401140
</li>
1141-
<li>
1141+
<li>
11421142
<img lazy-src="https://sqlize.online/favicons/sqlize/android-chrome-192x192.png" style="width: 72px; left: 15px; top: 0px;">
11431143
<a href="https://sqlize.online/">SQLize.online</a>
11441144
</li>
1145-
<li>
1145+
<li>
11461146
<img lazy-src="https://phpize.online/favicons/phpize/android-chrome-192x192.png" style="width: 72px; left: 15px; top: 0px;">
11471147
<a href="https://phpize.online/">PHPize.online</a>
11481148
</li>
1149+
<li>
1150+
<div class="text-logo">Domoticz</div>
1151+
<a href="https://www.domoticz.com/">Domoticz</a>
1152+
</li>
1153+
<li>
1154+
<img lazy-src="https://nixx.dev/static/hotlink-ok/logo-alt.png" style="width: 72px; left: 15px; top: 0px;">
1155+
<a href="https://nixx.dev">Nixx Web Tools</a>
1156+
</li>
11491157
<li id="add_your_site">
11501158
<p>+</p>
1151-
<a href="mailto:[email protected]?subject=Put%20me%20on%20the%20Ace%20site!&body=Please include a link to a logo hosted on your site!">Your Site Here</a>
1159+
<a href="https://github.com/ajaxorg/ace/issues/new?assignees=&labels=website%2Cneeds-triage&projects=&template=add-to-website.yml&title=Add+project+%28project+name%29+to+the+list+of+projects+using+Ace+on+its+website">Your Site Here</a>
11521160
</li>
11531161
</ul>
11541162
</div>

lib/ace/loader_build.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var global = (function() {
1717

1818
module.exports = function(ace) {
1919
config.init = init;
20+
config.$require = require;
2021

2122
/**
2223
* Provides access to require in packed noconflict mode

lib/ace/mode/javascript/jshint.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,13 +2392,13 @@ module.exports = slice;
23922392
exports.noConflict = function () { global._ = current; return exports; };
23932393
}()));
23942394
}(this, (function () {
2395-
// Underscore.js 1.13.4
2395+
// Underscore.js 1.13.6
23962396
// https://underscorejs.org
23972397
// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
23982398
// Underscore may be freely distributed under the MIT license.
23992399

24002400
// Current version.
2401-
var VERSION = '1.13.4';
2401+
var VERSION = '1.13.6';
24022402

24032403
// Establish the root object, `window` (`self`) in the browser, `global`
24042404
// on the server, or `this` in some virtual machines. We use `self`
@@ -4461,7 +4461,7 @@ module.exports = slice;
44614461
/*exported console */
44624462

44634463
var _ = _dereq_("underscore");
4464-
_.clone = _dereq_("lodash.clone");
4464+
_.clone = _dereq_("lodash.clone");
44654465
var events = _dereq_("events");
44664466
var vars = _dereq_("./vars.js");
44674467
var messages = _dereq_("./messages.js");
@@ -8930,7 +8930,7 @@ var JSHINT = (function() {
89308930
var id = state.tokens.prev;
89318931
value = expression(context, 10);
89328932
if (value) {
8933-
if (value.identifier && value.value === "undefined") {
8933+
if (!isConst && value.identifier && value.value === "undefined") {
89348934
warning("W080", id, id.value);
89358935
}
89368936
if (!lone) {
@@ -13527,7 +13527,7 @@ var errors = {
1352713527

1352813528
// Constants
1352913529
E011: "'{a}' has already been declared.",
13530-
E012: "const '{a}' is initialized to 'undefined'.",
13530+
E012: "Missing initializer for constant '{a}'.",
1353113531
E013: "Attempting to override '{a}' which is a constant.",
1353213532

1353313533
// Regular expressions
@@ -15122,7 +15122,7 @@ exports.regexpDot = /(^|[^\\])(\\\\)*\./;
1512215122
*/
1512315123

1512415124
var _ = _dereq_("underscore");
15125-
_.slice = _dereq_("lodash.slice");
15125+
_.slice = _dereq_("lodash.slice");
1512615126
var events = _dereq_("events");
1512715127

1512815128
// Used to denote membership in lookup tables (a primitive value such as `true`

lib/ace/mode/javascript_worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ oop.inherits(JavaScriptWorker, Mirror);
7979
this.options = options || {
8080
// undef: true,
8181
// unused: true,
82-
esnext: true,
82+
esversion: 11,
8383
moz: true,
8484
devel: true,
8585
browser: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ace-code",
33
"description": "Ajax.org Code Editor is a full featured source code highlighting editor that powers the Cloud9 IDE",
4-
"version": "1.23.0",
4+
"version": "1.23.4",
55
"homepage": "http://github.com/ajaxorg/ace",
66
"engines": {
77
"node": ">= 0.6.0"

src/autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ class CompletionProvider {
611611
// TODO add support for options.deleteSuffix
612612
if (!this.completions)
613613
return false;
614-
if (this.completions.filterText) {
614+
if (this.completions.filterText && !data.range) {
615615
var ranges;
616616
if (editor.selection.getAllRanges) {
617617
ranges = editor.selection.getAllRanges();

src/autocomplete/popup.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ class AcePopup {
5050
popup.renderer.setStyle("ace_autocomplete");
5151

5252
// Set aria attributes for the popup
53-
popup.renderer.container.setAttribute("role", "listbox");
54-
popup.renderer.container.setAttribute("aria-label", nls("Autocomplete suggestions"));
53+
popup.renderer.$textLayer.element.setAttribute("role", "listbox");
54+
popup.renderer.$textLayer.element.setAttribute("aria-label", nls("Autocomplete suggestions"));
55+
popup.renderer.textarea.setAttribute("aria-hidden", "true");
5556

5657
popup.setOption("displayIndentGuides", false);
5758
popup.setOption("dragDelay", 150);
@@ -133,12 +134,12 @@ class AcePopup {
133134
dom.addCssClass(selected, "ace_selected");
134135
var ariaId = getAriaId(row);
135136
selected.id = ariaId;
136-
popup.renderer.container.setAttribute("aria-activedescendant", ariaId);
137+
t.element.setAttribute("aria-activedescendant", ariaId);
137138
el.setAttribute("aria-activedescendant", ariaId);
138139
selected.setAttribute("role", "option");
139140
selected.setAttribute("aria-label", popup.getData(row).value);
140141
selected.setAttribute("aria-setsize", popup.data.length);
141-
selected.setAttribute("aria-posinset", row);
142+
selected.setAttribute("aria-posinset", row+1);
142143
selected.setAttribute("aria-describedby", "doc-tooltip");
143144
}
144145
});

src/autocomplete_test.js

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ function initEditor(value) {
3232
return editor;
3333
}
3434

35+
function afterRenderCheck(popup, callback) {
36+
popup.renderer.on("afterRender", function wait() {
37+
popup.renderer.off("afterRender", wait);
38+
callback();
39+
});
40+
}
41+
3542
module.exports = {
3643
tearDown: function() {
3744
if (editor) {
@@ -48,16 +55,16 @@ module.exports = {
4855
assert.ok(!editor.container.querySelector("style"));
4956

5057
sendKey("a");
51-
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="2" aria-posinset="0" aria-describedby="doc-tooltip"><s "ace_completion-highlight">a</s><s "ace_">rraysort</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d><d "ace_line"><s "ace_completion-highlight">a</s><s "ace_">looooooooooooooooooooooooooooong_word</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
58+
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="2" aria-posinset="1" aria-describedby="doc-tooltip"><s "ace_completion-highlight">a</s><s "ace_">rraysort</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d><d "ace_line"><s "ace_completion-highlight">a</s><s "ace_">looooooooooooooooooooooooooooong_word</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
5259
sendKey("rr");
53-
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="1" aria-posinset="0" aria-describedby="doc-tooltip"><s "ace_completion-highlight">arr</s><s "ace_">aysort</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
60+
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="1" aria-posinset="1" aria-describedby="doc-tooltip"><s "ace_completion-highlight">arr</s><s "ace_">aysort</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
5461
sendKey("r");
55-
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="1" aria-posinset="0" aria-describedby="doc-tooltip"><s "ace_completion-highlight">arr</s><s "ace_">ayso</s><s "ace_completion-highlight">r</s><s "ace_">t</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
62+
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="arraysort" aria-setsize="1" aria-posinset="1" aria-describedby="doc-tooltip"><s "ace_completion-highlight">arr</s><s "ace_">ayso</s><s "ace_completion-highlight">r</s><s "ace_">t</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
5663

5764
sendKey("Return");
5865
assert.equal(editor.getValue(), "arraysort\narraysort alooooooooooooooooooooooooooooong_word");
5966
editor.execCommand("insertstring", " looooooooooooooooooooooooooooong_");
60-
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="alooooooooooooooooooooooooooooong_word" aria-setsize="1" aria-posinset="0" aria-describedby="doc-tooltip"><s "ace_">a</s><s "ace_completion-highlight">looooooooooooooooooooooooooooong_</s><s "ace_">word</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
67+
checkInnerHTML('<d "ace_line ace_selected" id="suggest-aria-id:0" role="option" aria-label="alooooooooooooooooooooooooooooong_word" aria-setsize="1" aria-posinset="1" aria-describedby="doc-tooltip"><s "ace_">a</s><s "ace_completion-highlight">looooooooooooooooooooooooooooong_</s><s "ace_">word</s><s "ace_completion-spacer"> </s><s "ace_completion-meta">local</s></d>', function() {
6168
sendKey("Return");
6269
editor.destroy();
6370
editor.container.remove();
@@ -95,7 +102,7 @@ module.exports = {
95102
snippet: "will: $1",
96103
meta: "snippet",
97104
command: "startAutocomplete",
98-
range: new Range(0, 4, 0, 6)
105+
range: new Range(0, 4, 0, 7)
99106
}, {
100107
caption: "here",
101108
value: "-here",
@@ -110,27 +117,50 @@ module.exports = {
110117
editor.moveCursorTo(0, 6);
111118
sendKey("w");
112119
var popup = editor.completer.popup;
113-
check(function () {
120+
afterRenderCheck(popup, function () {
114121
assert.equal(popup.data.length, 1);
115122
editor.onCommandKey(null, 0, 13);
116123
assert.equal(popup.data.length, 2);
117124
assert.equal(editor.getValue(), "goodwill: ");
118-
check(function () {
125+
afterRenderCheck(popup, function () {
119126
editor.onCommandKey(null, 0, 13);
120127
assert.equal(editor.getValue(), "goodwill-here");
121128
editor.destroy();
122129
editor.container.remove();
123130
done();
124131
});
125132
});
126-
127-
function check(callback) {
128-
popup = editor.completer.popup;
129-
popup.renderer.on("afterRender", function wait() {
130-
popup.renderer.off("afterRender", wait);
131-
callback();
132-
});
133-
}
133+
},
134+
"test: filterText does not trigger selection range removal when completions range is present": function (done) {
135+
var editor = initEditor("{}");
136+
editor.completers = [
137+
{
138+
getCompletions: function (editor, session, pos, prefix, callback) {
139+
var completions = [
140+
{
141+
caption: "apple",
142+
snippet: "apple: $1",
143+
meta: "snippet",
144+
range: new Range(0, 1, 0, 2)
145+
}, {
146+
caption: "pineapple",
147+
value: "pineapple",
148+
range: new Range(0, 1, 0, 2)
149+
}
150+
];
151+
callback(null, completions);
152+
}
153+
}
154+
];
155+
editor.moveCursorTo(0, 1);
156+
sendKey("a");
157+
var popup = editor.completer.popup;
158+
afterRenderCheck(popup, function () {
159+
assert.equal(popup.data.length, 2);
160+
editor.onCommandKey(null, 0, 13);
161+
assert.equal(editor.getValue(), "{apple: }");
162+
done();
163+
});
134164
},
135165
"test: different completers tooltips": function (done) {
136166
var editor = initEditor("");

0 commit comments

Comments
 (0)