-
Notifications
You must be signed in to change notification settings - Fork 975
Add extensionsTab to preferences page #8065
Conversation
@cezaraugusto Rebase, please? :) |
Perhaps about:extensions should redirect to about:preferences#extensions with this change? |
I don't feel too great about including these extensions images in the browser itself. I feel as though we should get those from the extension store instead. Otherwise, we'll have to do extra work each time we support a new extension. |
rebased. Added more tests. |
@jonathansampson I agree with you regarding extensions images but at this moment there's no way of having their data unless it's installed by default. Ideally they would have their store with name, description, and image, even when they're not installed by default (built-in). At that moment we can also remove dummyContent I included, and process of adding new extensions would be easier |
@cezaraugusto Good point. Can't show an extension's image if the image hasn't yet been loaded with the extension. We may need to have a bigger-vision discussion about this. Current approach is clearly necessary, but won't scale. My apologies :) Can you add an image for Honey? |
l10nSyncDesc= | ||
l10nWebtorrent= Torrent Viewer | ||
l10nWebtorrentDesc= | ||
l10nVimium= Vimium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll be shipping Honey soon (perhaps in 0.14.2). Can we include it?
https://chrome.google.com/webstore/detail/honey/bmnlcjabgnpnenekpadlanbbkooimhnj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure which is going to land first but will include once Honey lands
app/renderer/components/settings.js
Outdated
// switch back password to unmanaged (null) | ||
e.target.value | ||
? aboutActions.changeSetting(settings.ACTIVE_PASSWORD_MANAGER, this.props.prefKey) | ||
: aboutActions.changeSetting(settings.ACTIVE_PASSWORD_MANAGER, null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar pattern in extensionsTab.js. There false
was used; here null
is being used. Can we go with one or the other, so there isn't any confusion about whether or not the two behave differently?
+ isPasswordManager(extensionId)
+ ? aboutActions.changeSetting(settings.ACTIVE_PASSWORD_MANAGER, extensionId)
+ : aboutActions.changeSetting(getExtensionSetting(extensionId), false)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I'll update, thanks for noticing
const pocket = config.PocketExtensionId | ||
const sync = config.syncExtensionId | ||
const webtorrent = config.torrentExtensionId | ||
const vimium = config.vimiumExtensionId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Honey :)
description: 'l10nPocketDesc', | ||
icon: 'img/extensions/pocket-128.png' | ||
} | ||
// { id: 'vimium' // TBD } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Honey.
case vimium: | ||
extensionSetting = settings.VIMIUM_ENABLED | ||
break | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Honey.
@@ -1339,7 +1339,7 @@ class Main extends ImmutableComponent { | |||
.includes(siteTags.BOOKMARK)) || emptyMap | |||
: null} | |||
history={this.bindHistory(frame)} | |||
extensions={frame.get('location') === 'about:extensions' | |||
extensions={['about:extensions', 'about:preferences'].includes(getBaseUrl(frame.get('location'))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we continue to support about:extensions
after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a handful of single comments here and there. Really great PR. Primary theme is forthcoming support for Honey.
@cezaraugusto pls rebase this one when you get a chance. Thanks! |
ok rebased 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the header style didn't match, I created a follow up issue. We can revisit updating all the styles to this new orange color / style 😄 #8165
app/common/state/extensionState.js
Outdated
// so we add a prop called 'excluded' and use it to hide extension on UI | ||
if (extension) { | ||
return state.setIn(['extensions', extensionId], extension.set('excluded', true)) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of an else, this could be cleaner to just return state (no else) 😄
@@ -3,3 +3,29 @@ extensions=Extensions | |||
extensionIdLabel=ID: | |||
extensionPathLabel=Path: | |||
extensionPermissionsLabel=Permissions: | |||
notifyNewExtensionsAdded=Notifiy me when new extensions are added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misspelling here; s/Notifiy/Notify
app/renderer/lib/extensionsUtil.js
Outdated
* @param {String} extensionId - The current extension ID | ||
* @returns {String} The given setting option | ||
*/ | ||
module.exports.getExtensionSetting = (extensionId) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method name isn't entirely accurate, since it's getting the key used to do the lookup in the settings... maybe we can change the name to something like getExtensionKey?
url: 'some_url', | ||
path: 'some/path', | ||
version: '1.0', | ||
description: 'epic game about an android dragon dinossaur', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐲 🤖
- Auditors: @bsclifton, @bbondy - Closes #6530
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes work (and look) great! 😄 Nice job on the tests too
We'll need a follow-up for Honey once it's merged also
@cezaraugusto does this close #6794 as well? |
@luixxiul it sure does! 😄 I'll go ahead and close that out |
git rebase -i
to squash commits (if needed).Add extensionsTab to preferences page
Auditors: @bsclifton, @bbondy
Closes #6530, #6794
Test plan:
extension state
extensionsReducer
extensionsTab
QA Steps: