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

⬆️ ace-builds #26

Closed
wants to merge 2 commits into from
Closed

⬆️ ace-builds #26

wants to merge 2 commits into from

Conversation

amyrlam
Copy link

@amyrlam amyrlam commented Aug 8, 2018

With this update, we will get the innerHTML fix from: ajaxorg/ace#3609

Relates to:
#3 @jamesarosen @gschorkopf
ajaxorg/ace#3260

//

I am going to work on a fix for CSS CSP issues, perhaps creating a new theme that is hosted on the web.

@amyrlam
Copy link
Author

amyrlam commented Aug 8, 2018

Whoops, sorry should have run this locally first. I'll take a look at the autocomplete test failures...

@dfreeman
Copy link
Owner

dfreeman commented Aug 8, 2018

Thanks for the PR, @amyrlam — I've done a round of ember-cli-update-ing on master that should have Travis happy again. Could you try rebasing on that and seeing if improves things here?

@amyrlam
Copy link
Author

amyrlam commented Aug 8, 2018

@dfreeman Thanks! Rebased, but seems like there are other changes upstream to autocomplete. (Tried going to 1.3.3 but same test failures.)

Been doing some debugging and noticed in autocomplete.js

export const suggestion = {
  selected: is('.ace_selected'), // no class for selected anymore?

  caption: {
    isDescriptor: true,
    get() {
      return this.text.slice(0, -this.meta.length);
    }
  },

  meta: text('.ace_completion-meta'), // prior class no longer there
};

@@ -7,7 +7,8 @@ import { text, collection, is, isVisible } from 'ember-cli-page-object';
* and metadata on the right.
*/
export const suggestion = {
selected: is('.ace_selected'),
// selected: is('.ace_selected'),
selected: is('.ace_active-line'),

Choose a reason for hiding this comment

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

The test is failing because .ace_active-line isn't a modifier that gets added to the currently selected .ace_line. It's a completely separate element in a completely separate part of the DOM that happens to have the same X/Y coordinates. I can't think of a good way to express that as a jQuery selector like is('.ace_selected').

@@ -167,11 +167,13 @@ module('Integration | Component | ember ace', function(hooks) {
const { autocomplete } = this.component;

await autocomplete.trigger();
assert.deepEqual(autocomplete.suggestions().mapBy('caption'), ['lhs', 'lhs2']);
assert.deepEqual(autocomplete.suggestions().mapBy('meta'), ['rhs', 'rhs2']);
assert.deepEqual(autocomplete.suggestions().mapBy('caption'), ['lhs2', 'lhs']); // in opposite order now, ok?

Choose a reason for hiding this comment

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

When we were running this locally, it looked like ACE's autocomplete might be putting them in the opposite order and using top to visually change the order. Just one more way ACE is anti-accessibility.

@amyrlam
Copy link
Author

amyrlam commented Aug 14, 2018

closing, solved by #28, thank you so much for your help! 🌟

@amyrlam amyrlam closed this Aug 14, 2018
@amyrlam amyrlam deleted the amy/update-ace branch August 14, 2018 22:27
@dfreeman
Copy link
Owner

Thanks for your work getting this started, @amyrlam and @jamesarosen!

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.

3 participants