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

Fix #568: loading the tabs module failed #675

Merged
merged 1 commit into from
Jan 31, 2017

Conversation

ma8ma
Copy link
Contributor

@ma8ma ma8ma commented Jan 29, 2017

This PR makes to fix #568 loading the tabs module (see also the candidate).

  • Replace legacy generator with ES2015 generator for almost places.
  • Replace non-standard Array comprehension with Array methods in muttator/content/mail.js.

Several legacy generators still keep because they have been handled by legacy iterators.

  • iter() in common/content/base.js
  • callbacks of addPageInfoSection() in common/content/buffer.js
  • evaluateXPath() in common/content/util.js
  • range() in common/content/util.js
  • itervalues() in common/content/util.js
  • iteritems() in common/content/util.js

return [row._folder for ([row] in this.getAllFolderRowMap(true,true)) if (row._folder.flags & flag)]
return Array.from(this.getAllFolderRowMap(true, true), ([row]) => row)
.filter(row => row._folder.flags & flag)
.map(row => row._folder);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

more short method chains: Array.from(<generator>, ([row]) => row._folder).filter(folder => folder.flags & flag)

@ma8ma ma8ma force-pushed the update-generator-function branch from 5d417ea to 4a763f2 Compare January 29, 2017 04:31
@iGEL
Copy link

iGEL commented Jan 29, 2017

I'm not qualified to review this, but I want to thank @ma8ma for the work and hope to see a release with this soon ❤️ 😁

for (let [, row] in Iterator(children)) {
let folder = row._folder;
let folderString = prefix + "/" +
(row.useServerNameOnly ? folder.server.prettyName : folder.abbreviatedName);
yield [row, folderString];
if (row.children.length > 0)
for (let child in walkChildren(row.children, folderString))
for (let child of walkChildren(row.children, folderString))
yield child;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unnecessary for of loop, can delegate using yield* walkChildren(...);

@ma8ma ma8ma force-pushed the update-generator-function branch from 4a763f2 to 35e51c5 Compare January 29, 2017 17:51
completer: function (context) [[s.key, s.serverURI] for ([, s] in Iterator(mail.smtpServers))],
completer: function (context) {
return Array.from((function* () {
for (let [, s] in Iterator(mail.smtpServers))

Choose a reason for hiding this comment

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

Why keep the old in Iterator(...)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, smtpServers property is Array type, therefore, can simplify to replace with return mail.smtpServers.map(s => [s.key, s.serverURI]);

* in the current window.
*/
get browsers() {
browsers: function* () {

Choose a reason for hiding this comment

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

Could have kept the getter by returning the result of an additional generator function. I am not sure which way is best.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. browsers can create generator within property to keep getter, I'm going to try.

* Replace legacy generator with ES2015 generator for almost places.
* Replace non-standard Array comprehension with Array methods
  in muttator/content/mail.js.

Several legacy generators still keep because they have been handled
by legacy iterators:
* iter() in common/content/base.js
* callbacks of addPageInfoSection() in common/content/buffer.js
* evaluateXPath() in common/content/util.js
* range() in common/content/util.js
* itervalues() in common/content/util.js
* iteritems() in common/content/util.js
@ma8ma ma8ma force-pushed the update-generator-function branch from 35e51c5 to c76a292 Compare January 30, 2017 16:56
@timss timss merged commit eabb291 into vimperator:master Jan 31, 2017
@timss
Copy link
Member

timss commented Jan 31, 2017

Thank you so much for this patch.

Sorry for the delay, but I wasn't able to test this myself until now. I'd also like to reiterate for anyone reading this that Vimperator is (and has been for some time) in need for contributors. This specific issue has been known since Firefox 51 was nightly (August 2016). Looking at all the (breaking) changes Mozilla keeps pushing, this certainly will not be the last time. Please see the following links for more information:

Until a new release has been made, submitted to AMO and finally approved by Mozilla, users will have to build their own versions. Either go for an unbranded release of Firefox (which allows xpinstall.signatures.required=false), or sign the addon yourself with a personal AMO API key.

@brianpeiris
Copy link

@timss First of all, my thanks to you and @gkatsev for keeping Vimperator alive. Despite the complaints, I'm grateful that the maintainers do respond and update AMO when needed, even if it's not always timely.

I'd also like to reiterate for anyone reading this that Vimperator is (and has been for some time) in need for contributors.

Wouldn't it help if this was made more obvious with a notice on vimperator.org and in the README here?

@gkatsev
Copy link
Member

gkatsev commented Jan 31, 2017

@brianpeiris thanks. I'll make sure to make a note on the AMO page about wanting contributors.

@maxauthority would you be able to update the website?

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.

Tabs module doesn't work in Firefox 51 (not e10s)
7 participants