Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Remove the use of jQuery - #838

Merged
maxbrunsfeld merged 64 commits into
masterfrom
mb-remove-jquery
Mar 2, 2017
Merged

maxbrunsfeld merged 64 commits into
masterfrom
mb-remove-jquery

Conversation

@maxbrunsfeld

@maxbrunsfeld maxbrunsfeld commented Jan 6, 2017 •

Copy link
Copy Markdown
Contributor
  • Stop using jQuery explicitly in specs
  • Convert specs to JS
  • Convert specs to use async/await instead of waitsForPromise/runs
  • Convert implementation to JS
  • Convert views to perform initial render w/ etch instead of space pen
  • Use CSS animation for wrap icon
  • Use editor font when displaying matches

Refs atom/atom#13254

@maxbrunsfeld
maxbrunsfeld force-pushed the mb-remove-jquery branch 3 times, most recently from a641594 to 1d3fc59 Compare January 30, 2017 22:40
Comment thread lib/find-view.js
return (
etch.dom.div({tabIndex: -1, className: 'find-and-replace'},
etch.dom.header({className: 'header'},
etch.dom.span({ref: 'descriptionLabel', className: 'header-item description'},

@Alhadis Alhadis Feb 23, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Currently breaking here:

Uncaught TypeError: etch.dom.span is not a function @ find-view.js:33
	render @ find-view.js:33
	initialize @ component-helpers.js:60
	FindView @ find-view.js:16
	createViews @ find.coffee [sm]:141
	(anonymous function) @ find.coffee [sm]:42
	module.exports.CommandRegistry.handleCommandEvent @ command-registry.coffee:255
	(anonymous function) @ command-registry.coffee:1
	module.exports.KeymapManager.dispatchCommandEvent @ keymap-manager.js:599
	module.exports.KeymapManager.handleKeyboardEvent @ keymap-manager.js:390
	module.exports.WindowEventHandler.handleDocumentKeyEvent @ window-event-handler.coffee:76
	(anonymous function) @ window-event-handler.coffee:1

I have [email protected] installed locally in the package's dev-linked directory, if that helps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, thanks for giving this a spin @Alhadis - it depends on a new etch API introduced on this branch: https://github.com/atom/etch/tree/custom-virtual-dom

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, sorry. Should I have symlinked that branch to a local copy of the etch repo?

@maxbrunsfeld maxbrunsfeld Feb 23, 2017 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We realized that we needed to make some changes to this branch after @Ben3eeE's comment. It's almost ready to go again, but we still need to publish a new version of etch and fix up some tests. We'll probably be done with that soon, but if you're interested in testing before that, you could link etch and checkout that branch. Thanks!

@maxbrunsfeld

maxbrunsfeld commented Feb 28, 2017 •

Copy link
Copy Markdown
Contributor Author

@Ben3eeE @ungb I believe this is once again ready to test.

@Ben3eeE I think we've addressed the great points you made after your first round of testing:

  • Incorrect message after clearing/switching your search
  • Incorrect focus when clicking on results
  • Memory usage of project search results view. There should now be a nice performance improvement to scrolling through the search results, relative to master.

@Ben3eeE

Ben3eeE commented Feb 28, 2017 •

Copy link
Copy Markdown
Contributor

@maxbrunsfeld I can confirm that all things I found earlier and more are addressed. The search is ⚡️ fast ⚡️ 💯! I found some minor things only:

Edit: I say I compare to master below but I compare to the version that shipped with beta not with master...

Issues introduced by this PR:

  • If you select a result in some file and press Collapse All the selected element does not move to the file and stays on the search result. On master the selected element moves to the file when you collapse with a search result in that file selected. So navigating with the keyboard after collapse is not working correctly.

  • Using atom-material-ui the files in the Project Find Results are not highlighted for me. They are highlighted on master with atom-material-ui.

Also an issue on master:

  • If you do a search for p -> a search for nothing -> close the Project Find Results -> a search for p the Project Find Results displays No results found for 'p' instead of searching for p.

  • If you edit a file during an ongoing search the Collapse/Expand All buttons become visible.

@maxbrunsfeld

Copy link
Copy Markdown
Contributor Author

@Ben3eeE Thanks for catching that regression with atom-material-ui. I opened a PR on that theme to use a more flexible selector in one place. There may be more issues like this, but I don't think we can avoid changing the markup in this case, so we're just going to have to be ready to help people when breakage occurs.

@Alhadis

Alhadis commented Mar 1, 2017 •

Copy link
Copy Markdown
Contributor

Shit. I better run File-Icons' tests again...

EDIT: Whew, good. Still green. 💚

@Ben3eeE

Ben3eeE commented Mar 1, 2017

Copy link
Copy Markdown
Contributor

@maxbrunsfeld

Issue select a result and Collapse All

  • Now if you select a result in a file and Collapse All the highlight moves to the file but I am unable to expand it with right arrow key unless I first move to another file.

New issues found

  • Collapse/Expand state is remembered between searches. So if you collapse the first file and search for something else the first file is collapsed in the next search result. Even if that is for a different file.
  • In my dev tools console I see the following warning: C:\Users\lineri\Desktop\issues\atom master\find-and-replace\lib\project\results-view.js:33 IntersectionObserver.observe(target): target element is not a descendant of root.. This happens when I close the Project Find Results before performing a new search.

@ungb

ungb commented Mar 1, 2017

Copy link
Copy Markdown

Thanks @Ben3eeE for all the thorough testing! I went through some ad-hoc testing and tried some of the scenarios you mentioned above and didn't see any issues. LGTM!

@Ben3eeE

Ben3eeE commented Mar 2, 2017

Copy link
Copy Markdown
Contributor

@maxbrunsfeld @as-cii Really great work 💯 I can't find any other issues that were introduced by this PR 🚢

@maxbrunsfeld
maxbrunsfeld merged commit b60c273 into master Mar 2, 2017
@maxbrunsfeld
maxbrunsfeld deleted the mb-remove-jquery branch March 2, 2017 17:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants