Fix Bug 1422079 - sections context menu #3987
Conversation
59dde7a
to
51bd5d3
|
@csadilek want to take a look at this PR too? specifically the Section related changes. |
51bd5d3
to
034b51d
|
@aaronrbenson @bryanbell Should all the menu options be actions, e.g., "Learn More" vs "About Pocket" and "View Privacy Notice" vs "Privacy Notice"? Also, we don't call the top stories section "Pocket" right now… It's "Recommended by Pocket", so should the menu actions be "Manage Recommended by Pocket"? |
| @@ -135,12 +51,10 @@ export class _CollapsibleSection extends React.PureComponent { | |||
| constructor(props) { | |||
| super(props); | |||
| this.onBodyMount = this.onBodyMount.bind(this); | |||
| this.onInfoEnter = this.onInfoEnter.bind(this); | |||
| this.onInfoLeave = this.onInfoLeave.bind(this); | |||
Mardak
Feb 21, 2018
Member
Were these not actually used by CollapsibleSection? Looks like it was added twice but only needed in Info?
Were these not actually used by CollapsibleSection? Looks like it was added twice but only needed in Info?
rlr
Feb 21, 2018
Author
Contributor
oh weird I didnt even notice that! I guess it was some copy/pasta fail when creating <Disclaimer/>
oh weird I didnt even notice that! I guess it was some copy/pasta fail when creating <Disclaimer/>
rlr
Feb 21, 2018
Author
Contributor
oh, I guess this isn't <Disclaimer/>. I fail at reading diffs. Yeah, this must've been a fail when I broke <Info/> into it's own component or something.
oh, I guess this isn't <Disclaimer/>. I fail at reading diffs. Yeah, this must've been a fail when I broke <Info/> into it's own component or something.
| @@ -193,3 +198,15 @@ error_fallback_default_info=Oops, something went wrong loading this content. | |||
| # that failed to render, and suggests the likely way to deal with the failure: | |||
| # reloading the page. | |||
| error_fallback_default_refresh_suggestion=Refresh page to try again. | |||
|
|
|||
Mardak
Feb 21, 2018
Member
The previous commit removing info stuff should have a commit message indicating which section_info, etc strings are unused and reference bug 1433209, e.g., https://bugzilla.mozilla.org/show_bug.cgi?id=1433209#c1
The previous commit removing info stuff should have a commit message indicating which section_info, etc strings are unused and reference bug 1433209, e.g., https://bugzilla.mozilla.org/show_bug.cgi?id=1433209#c1
| menu_action_expand_section=Expand Section | ||
| menu_action_manage_section=Manage {section} | ||
| menu_action_add_topsite=Add Top Site | ||
| menu_action_about_pocket=About Pocket |
Mardak
Feb 21, 2018
Member
We probably want this to be "About {section}" for web extension support depending on if we should be triggering this based on the existence of a learn-more type link in the section object? @csadilek ?
We probably want this to be "About {section}" for web extension support depending on if we should be triggering this based on the existence of a learn-more type link in the section object? @csadilek ?
Mardak
Feb 21, 2018
Member
Also, we want a localization note about the {section} usage.
Also, we want a localization note about the {section} usage.
csadilek
Feb 21, 2018
Collaborator
@Mardak yes, agreed on keeping this generic, if possible. menu_action_about_section = About {section}.
@Mardak yes, agreed on keeping this generic, if possible. menu_action_about_section = About {section}.
Mardak
Feb 21, 2018
Member
Design feedback is that this is specifically the privacy notice link, so just make it "Privacy Notice" and point to the appropriate url from the option.
Design feedback is that this is specifically the privacy notice link, so just make it "Privacy Notice" and point to the appropriate url from the option.
| @@ -193,3 +198,15 @@ error_fallback_default_info=Oops, something went wrong loading this content. | |||
| # that failed to render, and suggests the likely way to deal with the failure: | |||
| # reloading the page. | |||
| error_fallback_default_refresh_suggestion=Refresh page to try again. | |||
|
|
|||
| # LOCALIZATION NOTE (menu_action_*). These strings are displayed in the section | |||
| # context menu and are meant as a call to action for the given section. | |||
Mardak
Feb 21, 2018
Member
There's already menu_action_* for card context menu stuff. Not sure if we should name these section_menu_* e.g., section_menu_remove_section @flodolo ?
There's already menu_action_* for card context menu stuff. Not sure if we should name these section_menu_* e.g., section_menu_remove_section @flodolo ?
flodolo
Feb 21, 2018
Collaborator
section_menu_* sounds good
section_menu_* sounds good
| menu_action_about_pocket=About Pocket | ||
| menu_action_move_up=Move Up | ||
| menu_action_move_down=Move Down | ||
| menu_action_privacy_notice=Privacy Notice |
Mardak
Feb 21, 2018
Member
We already have this as section_info_privacy_notice=Privacy Notice although it's used as a link instead of a menu option. @flodolo ? (The "section_info_*" will be unused with this change..)
We already have this as section_info_privacy_notice=Privacy Notice although it's used as a link instead of a menu option. @flodolo ? (The "section_info_*" will be unused with this change..)
flodolo
Feb 21, 2018
Collaborator
Since you plan to remove the other one, it wouldn't hurt to have this string added.
Since you plan to remove the other one, it wouldn't hurt to have this string added.
| @@ -16,6 +19,50 @@ | |||
|
|
|||
| .section-top-bar { | |||
| position: relative; | |||
|
|
|||
| .context-menu-button { | |||
| background: url('chrome://browser/skin/page-action.svg') no-repeat right center; | |||
Mardak
Feb 21, 2018
Member
Can we share some of this into _icons.scss with the other context menu button?
Can we share some of this into _icons.scss with the other context menu button?
| <CollapsibleSection className="section" icon={icon} title={getFormattedMessage(title)} | ||
| <CollapsibleSection className="section" icon={icon} | ||
| title={this.getFormattedMessage(title)} | ||
| name={id === "topstories" ? "Pocket" : this.getFormattedMessage(title)} |
Mardak
Feb 21, 2018
Member
We should have the provider_name somewhere as we were using it for "Recommended by {provider}"... I guess it's part of the title object?
We should have the provider_name somewhere as we were using it for "Recommended by {provider}"... I guess it's part of the title object?
| @@ -30,6 +26,10 @@ export class Section extends React.PureComponent { | |||
| } | |||
| } | |||
|
|
|||
| getFormattedMessage(message) { | |||
| return typeof message === "string" ? <span>{message}</span> : this.props.intl.formatMessage({id: message.id}, message.values); | |||
Mardak
Feb 21, 2018
Member
This doesn't look quite right. If we pass in a "string", we get html/jsx, but if it's an "object," we get a string? Maybe it should always return a string?
This doesn't look quite right. If we pass in a "string", we get html/jsx, but if it's an "object," we get a string? Maybe it should always return a string?
rlr
Feb 21, 2018
Author
Contributor
I can undo these changes now that we will just have the link be "Manage Section".
I can undo these changes now that we will just have the link be "Manage Section".
| </button> | ||
| <SectionMenu | ||
| options={menuOptions} | ||
| name={name} |
Mardak
Feb 21, 2018
Member
Maybe instead of CollapsibleSection prop name there's an optional shortName where if there is no shortName, title is used. E.g., sectionName={shortName || title} ? (And have SectionMenu prop name renamed to sectionName)
Maybe instead of CollapsibleSection prop name there's an optional shortName where if there is no shortName, title is used. E.g., sectionName={shortName || title} ? (And have SectionMenu prop name renamed to sectionName)
| AboutPocket: section => ({ | ||
| id: "menu_action_about_pocket", | ||
| icon: "about", | ||
| redirectUrl: "https://getpocket.cdn.mozilla.net/firefox/new_tab_learn_more", |
Mardak
Feb 21, 2018
Member
We should pass in the disclaimer_link as part of the section to use here.
We should pass in the disclaimer_link as part of the section to use here.
csadilek
Feb 21, 2018
Collaborator
Could we change this to AboutSection instead? Section could hold an object that further describes this i.e. section.about? SectionManager can provide this about object based on topstories.options.
Could we change this to AboutSection instead? Section could hold an object that further describes this i.e. section.about? SectionManager can provide this about object based on topstories.options.
Mardak
Feb 21, 2018
Member
This just in from the design meeting. This should be "Privacy Notice" and link to https://www.mozilla.org/en-US/privacy/firefox/#suggest-relevant-content which is info_link but needs the #anchor updated.
This just in from the design meeting. This should be "Privacy Notice" and link to https://www.mozilla.org/en-US/privacy/firefox/#suggest-relevant-content which is info_link but needs the #anchor updated.
rlr
Feb 21, 2018
Author
Contributor
cool. So we'll have a PrivacyNotice option and no About* section and just conditionally show it based on if it has the url in the section options.
cool. So we'll have a PrivacyNotice option and no About* section and just conditionally show it based on if it has the url in the section options.
| @@ -41,7 +41,8 @@ const BUILT_IN_SECTIONS = { | |||
| button: {id: options.disclaimer_buttontext || "section_disclaimer_topstories_buttontext"} | |||
| }, | |||
| maxRows: 1, | |||
| availableContextMenuOptions: ["CheckBookmark", "SaveToPocket", "Separator", "OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl"], | |||
| sectionMenuOptions: ["RemoveSection", "CheckCollapsed", "Separator", "AboutPocket", "ManageSection"], | |||
Mardak
Feb 21, 2018
Member
I wonder if we want to have a common list where "About" gets added in dynamically?
I wonder if we want to have a common list where "About" gets added in dynamically?
rlr
Feb 21, 2018
Author
Contributor
I guess we could have a "CheckAbout". I'll try that.
I guess we could have a "CheckAbout". I'll try that.
| # LOCALIZATION NOTE(section_context_menu_button_sr): This is for screen readers when | ||
| # the section edit context menu button is focused/active. Title is the name of | ||
| # the section (Top Sites, Highlights, etc). | ||
| section_context_menu_button_sr=Open context menu for {title} section |
flodolo
Feb 21, 2018
Collaborator
This might not work with all languages, because you're reusing a stand-alone string (title) in the middle of another one. Not sure if there's a better way to do it, besides removing the {title} completely.
This might not work with all languages, because you're reusing a stand-alone string (title) in the middle of another one. Not sure if there's a better way to do it, besides removing the {title} completely.
| @@ -193,3 +198,15 @@ error_fallback_default_info=Oops, something went wrong loading this content. | |||
| # that failed to render, and suggests the likely way to deal with the failure: | |||
| # reloading the page. | |||
| error_fallback_default_refresh_suggestion=Refresh page to try again. | |||
|
|
|||
| # LOCALIZATION NOTE (menu_action_*). These strings are displayed in the section | |||
| # context menu and are meant as a call to action for the given section. | |||
flodolo
Feb 21, 2018
Collaborator
section_menu_* sounds good
section_menu_* sounds good
| menu_action_remove_section=Remove Section | ||
| menu_action_collapse_section=Collapse Section | ||
| menu_action_expand_section=Expand Section | ||
| menu_action_manage_section=Manage {section} |
flodolo
Feb 21, 2018
Collaborator
Same note about {section}, you'd be using a string (name of section) in the middle of a sentence, with potential problems (case, grammatical case and declension). Does it need to be there?
Same note about {section}, you'd be using a string (name of section) in the middle of a sentence, with potential problems (case, grammatical case and declension). Does it need to be there?
Mardak
Feb 21, 2018
Member
Design feedback was to just switch to "Manage Section"
Design feedback was to just switch to "Manage Section"
rlr
Feb 21, 2018
Author
Contributor
I like 👍 😄
I like
| menu_action_about_pocket=About Pocket | ||
| menu_action_move_up=Move Up | ||
| menu_action_move_down=Move Down | ||
| menu_action_privacy_notice=Privacy Notice |
flodolo
Feb 21, 2018
Collaborator
Since you plan to remove the other one, it wouldn't hurt to have this string added.
Since you plan to remove the other one, it wouldn't hurt to have this string added.
| header: {id: options.provider_header || "pocket_feedback_header"}, | ||
| body: {id: options.provider_description || "pocket_feedback_body"}, | ||
| link: {href: options.info_link, id: "section_info_privacy_notice"} | ||
| }, |
csadilek
Feb 21, 2018
Collaborator
Here's where I thought we could configure the "about object" based on topstories.options, which we could then access in section-menu-options.js.
Here's where I thought we could configure the "about object" based on topstories.options, which we could then access in section-menu-options.js.
|
@rlr @Mardak looks good to me. 2 minor things:
Latest update: Seems info_link from topstories.options will still be used with updated anchor. |
61966d1
to
a417c9a
|
I think I addressed all the feedback so far. Icons still pending... |
|
Mainly questions about simplifying |
| @@ -40,13 +40,10 @@ const BUILT_IN_SECTIONS = { | |||
| }, | |||
| button: {id: options.disclaimer_buttontext || "section_disclaimer_topstories_buttontext"} | |||
| }, | |||
| privacyNoticeURL: "https://www.mozilla.org/en-US/privacy/firefox/#suggest-relevant-content", | |||
Mardak
Feb 22, 2018
Member
Hah sorry. https://www.mozilla.org/privacy/firefox/#suggest-relevant-content (let the server decide locale)
Hah sorry. https://www.mozilla.org/privacy/firefox/#suggest-relevant-content (let the server decide locale)
Mardak
Feb 22, 2018
Member
Also, I would have expected this to be in ActivityStream.jsm replacing the pref json entry for info_link? @csadilek mentioned a "topstories.options" in a previous comment.
(I believe the reasoning for the json pref instead of hardcoded in SectionManager is that if there were a different story provider, it wouldn't necessarily share the same values as Pocket……… although in this case, I suppose a generic Privacy Notice for any "suggested content" might be common for any top stories… ???)
Also, I would have expected this to be in ActivityStream.jsm replacing the pref json entry for info_link? @csadilek mentioned a "topstories.options" in a previous comment.
(I believe the reasoning for the json pref instead of hardcoded in SectionManager is that if there were a different story provider, it wouldn't necessarily share the same values as Pocket……… although in this case, I suppose a generic Privacy Notice for any "suggested content" might be common for any top stories… ???)
csadilek
Feb 22, 2018
Collaborator
If you prefer not having to configure this link we can add:
options.privacy_link || "https://www.mozilla.org/en-US/privacy/firefox/#suggest-relevant-content"
This way we can override in case we ever need to, but it will work by default.
If you prefer not having to configure this link we can add:
options.privacy_link || "https://www.mozilla.org/en-US/privacy/firefox/#suggest-relevant-content"
This way we can override in case we ever need to, but it will work by default.
rlr
Feb 22, 2018
Author
Contributor
makes sense. will fix. thanks!
makes sense. will fix. thanks!
| getOptions() { | ||
| const {props} = this; | ||
|
|
||
| const propOptions = props.options || DEFAULT_SECTION_MENU_OPTIONS; |
Mardak
Feb 22, 2018
Member
What are your thoughts on having a mostly common base options that don't need to even be passed? E.g.,
const propOptions = Array.from(DEFAULT_SECTION_MENU_OPTIONS);
// Prepend custom options and a separator
if (extraOptions) {
propOptions.splice(0, 0, ...extraOptions, "Separator");
}
// Insert privacy notice before the last option ("ManageSection")
if (props.privacyNoticeUrl) {
propOptions.splice(-1, 0, "PrivacyNotice");
}
Where only top sites passes in extraOptions and stories passes in the url.
What are your thoughts on having a mostly common base options that don't need to even be passed? E.g.,
const propOptions = Array.from(DEFAULT_SECTION_MENU_OPTIONS);
// Prepend custom options and a separator
if (extraOptions) {
propOptions.splice(0, 0, ...extraOptions, "Separator");
}
// Insert privacy notice before the last option ("ManageSection")
if (props.privacyNoticeUrl) {
propOptions.splice(-1, 0, "PrivacyNotice");
}Where only top sites passes in extraOptions and stories passes in the url.
rlr
Feb 22, 2018
Author
Contributor
I could go either way with this one. 🤔 👍 👎 ? coin toss?
I could go either way with this one.
Mardak
Feb 22, 2018
Member
I think the main thing is that DEFAULT_SECTION_MENU_OPTIONS is basically duplicated in 5 places right now, so avoiding bugs when accidentally changing a subset of them
I think the main thing is that DEFAULT_SECTION_MENU_OPTIONS is basically duplicated in 5 places right now, so avoiding bugs when accidentally changing a subset of them
rlr
Feb 22, 2018
Author
Contributor
That's a good reason 😄
That's a good reason
| })); | ||
| } | ||
| if (redirectUrl) { | ||
| document.location = redirectUrl; |
Mardak
Feb 22, 2018
Member
The action check and this custom redirectUrl aren't necessary as there's an OPEN_LINK action to navigate.
The action check and this custom redirectUrl aren't necessary as there's an OPEN_LINK action to navigate.
|
|
||
| const propOptions = props.options || DEFAULT_SECTION_MENU_OPTIONS; | ||
|
|
||
| const options = propOptions.map(o => SectionMenuOptions[o](props)).map(option => { |
Mardak
Feb 22, 2018
Member
This would seem like it could be shared with LinkMenu.jsx's functionality as higher order function probably from a shared content-src/lib/menu-options, e.g., makeOptions(propOptions, SectionMenuOptions)? @sarracini
Although now I realize React is probably rerendering this component like crazy because there's all these dynamic function bindings for onClick even though it probably could just be defined once and refer to this to get at options?
I guess all of this HOF and more cleanup should be a separate bug. Would be interesting to see if this is actually has performance impacts given how many context menus we have now… ~25 menus * ~10 options -> 250 ContextMenuItem being rendered every time a prop updates?
This would seem like it could be shared with LinkMenu.jsx's functionality as higher order function probably from a shared content-src/lib/menu-options, e.g., makeOptions(propOptions, SectionMenuOptions)? @sarracini
Although now I realize React is probably rerendering this component like crazy because there's all these dynamic function bindings for onClick even though it probably could just be defined once and refer to this to get at options?
I guess all of this HOF and more cleanup should be a separate bug. Would be interesting to see if this is actually has performance impacts given how many context menus we have now… ~25 menus * ~10 options -> 250 ContextMenuItem being rendered every time a prop updates?
sarracini
Feb 22, 2018
Contributor
Yeah this little chunk here could be refactored to a more general "menu options" instead of a link menu and a sections menu. But I think you're right @Mardak, we should evaluate the performance and do it as a follow up
Yeah this little chunk here could be refactored to a more general "menu options" instead of a link menu and a sections menu. But I think you're right @Mardak, we should evaluate the performance and do it as a follow up
rlr
Feb 22, 2018
Author
Contributor
One thing we can easily do is instead of having:
render() {
return (<ContextMenu
visible={this.props.visible}
onUpdate={this.props.onUpdate}
options={this.getOptions()} />);
}
we should have:
render() {
return this.props.visible && (<ContextMenu
visible={this.props.visible}
onUpdate={this.props.onUpdate}
options={this.getOptions()} />);
}
That we we render on demand. Should save all the cpu cycles and kittens
One thing we can easily do is instead of having:
render() {
return (<ContextMenu
visible={this.props.visible}
onUpdate={this.props.onUpdate}
options={this.getOptions()} />);
}
we should have:
render() {
return this.props.visible && (<ContextMenu
visible={this.props.visible}
onUpdate={this.props.onUpdate}
options={this.getOptions()} />);
}
That we we render on demand. Should save all the cpu cycles and kittens
rlr
Feb 22, 2018
Author
Contributor
I think the "react way" is something like this anyway:
{this.props.visible &&
<Component />
}
I think the "react way" is something like this anyway:
{this.props.visible &&
<Component />
}
rlr
Feb 22, 2018
Author
Contributor
Yeah. I played with it but it requires changes in <ContextMenu/> because it currently assumes that it will be mounted initially with visible=false. But should be easyish fix. Just need to do LinkMenu and SectionMenu changes together, so I'd rather do as followup instead of piling on unrelated LinkMenu changes here.
Yeah. I played with it but it requires changes in <ContextMenu/> because it currently assumes that it will be mounted initially with visible=false. But should be easyish fix. Just need to do LinkMenu and SectionMenu changes together, so I'd rather do as followup instead of piling on unrelated LinkMenu changes here.
| availableContextMenuOptions: ["CheckBookmark", "SaveToPocket", "Separator", "OpenInNewWindow", "OpenInPrivateWindow", "Separator", "BlockUrl"], | ||
| infoOption: { | ||
| header: {id: options.provider_header || "pocket_feedback_header"}, | ||
| body: {id: options.provider_description || "pocket_feedback_body"}, |
Mardak
Feb 22, 2018
Member
These strings are now unused I believe (so add to the commit comment). Although _body is already missing… ???
These strings are now unused I believe (so add to the commit comment). Although _body is already missing… ???
rlr
Feb 22, 2018
Author
Contributor
I think I saw them used in the Preferences panel. I’ll double check.
I think I saw them used in the Preferences panel. I’ll double check.
rlr
Feb 22, 2018
Author
Contributor
I think "pocket_feedback_body" was a bug there. Probably was meant to be "pocket_description"? We use that in preferences. I'll fix it in SectionManager.jsx. But the pocket_feedback_header can die.
I think "pocket_feedback_body" was a bug there. Probably was meant to be "pocket_description"? We use that in preferences. I'll fix it in SectionManager.jsx. But the pocket_feedback_header can die.
|
Oh, I thought I commented about this earlier but maybe I forgot… Do we need to support the "open to the right" vs "open to the left when there's not enough space on the right"? |
a417c9a
to
7e2b8f9
|
@Mardak Everything should be addressed except for #3987 (comment) and the unnecessary rendering of all the context menus on every page load. Icons are coming. I might start hacking on the perf/rendering issue and keep the changes separate. |
|
@Mardak done ^^. One think I am not excited about is a bunch of props are passed to |
|
I believe the way to avoid pass-through props is having |
|
Almost working except |
| PrivacyNotice: section => ({ | ||
| id: "section_menu_action_privacy_notice", | ||
| icon: "privacy", | ||
| action: {type: at.OPEN_LINK, data: {url: section.privacyNoticeURL}}, |
Mardak
Feb 22, 2018
Member
This wants an OnlyToMain (right now it sends only to itself/content, so it does nothing.)
This wants an OnlyToMain (right now it sends only to itself/content, so it does nothing.)
rlr
Feb 22, 2018
Author
Contributor
oops. guess I didn't test that 🤦♂️
oops. guess I didn't test that
| if (!type && id) { | ||
| option.label = props.intl.formatMessage({id}); | ||
| option.onClick = () => { | ||
| if (action) { |
Mardak
Feb 22, 2018
Member
All options have actions, so this check isn't necessary.
All options have actions, so this check isn't necessary.
| </button> | ||
| <SectionMenu | ||
| options={menuOptions} | ||
| name={name} |
Mardak
Feb 22, 2018
Member
name is unused here too.
name is unused here too.
Mardak
Feb 22, 2018
Member
Oh odd. This is indeed outdated. I wonder what view github was showing me earlier…
Oh odd. This is indeed outdated. I wonder what view github was showing me earlier…
| className="top-sites" | ||
| icon="topsites" | ||
| title={props.intl.formatMessage({id: "header_top_sites"})} | ||
| name={props.intl.formatMessage({id: "header_top_sites"})} |
Mardak
Feb 22, 2018
Member
name is unused here too.
name is unused here too.
|
Oh, and this adds to the |
The following strings can be removed after Firefox 60: * section_info_option * section_info_privacy_notice * pocket_feedback_header (Ping Bug 1433209)
dd2d9b1
to
abe782c
|
I squashed into two commits. Just waiting on the icons now (cough @bryanbell cough) |
|
We could probably land without icons for now to get strings exported sooner |
|
Here are the icons needed for this menu. |
|
Same icon for collapse and expand? |
|
There's an existing |
|
YAY! @bryanbell gave me an expand icon too. Also confirmed that we should use the new -information icon. |
144910a
to
dddbb23
| @@ -0,0 +1 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z"/><path d="M8 7a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0V8a1 1 0 0 0-1-1z"/><circle cx="8" cy="5" r="1.188"/></svg> | |||
Mardak
Feb 23, 2018
Member
If the old one isn't used, let's just replace glyph-info-16.svg
If the old one isn't used, let's just replace glyph-info-16.svg
| @@ -1 +0,0 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path fill="context-fill" d="M6 0a6 6 0 1 0 6 6 6 6 0 0 0-6-6zm.7 10.26a1.13 1.13 0 0 1-.78.28 1.13 1.13 0 0 1-.78-.28 1 1 0 0 1 0-1.42 1.13 1.13 0 0 1 .78-.28 1.13 1.13 0 0 1 .78.28 1 1 0 0 1 0 1.42zM8.55 5a3 3 0 0 1-.62.81l-.67.63a1.58 1.58 0 0 0-.4.57 2.24 2.24 0 0 0-.12.74H5.06a3.82 3.82 0 0 1 .19-1.35 2.11 2.11 0 0 1 .63-.86 4.17 4.17 0 0 0 .66-.67 1.09 1.09 0 0 0 .23-.67.73.73 0 0 0-.77-.86.71.71 0 0 0-.57.26 1.1 1.1 0 0 0-.23.7h-2A2.36 2.36 0 0 1 4 2.47a2.94 2.94 0 0 1 2-.65 3.06 3.06 0 0 1 2 .6 2.12 2.12 0 0 1 .72 1.72 2 2 0 0 1-.17.86z"/></svg> | |||
Mardak
Feb 23, 2018
Member
Looks like all the existing icons have viewBox instead of width/height:
svgo --multipass --disable=removeViewBox --enable={removeDimensions,removeStyleElement,sortAttrs} *.svg
Looks like all the existing icons have viewBox instead of width/height:
svgo --multipass --disable=removeViewBox --enable={removeDimensions,removeStyleElement,sortAttrs} *.svg
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z"/><path d="M8 7a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0V8a1 1 0 0 0-1-1z"/><circle cx="8" cy="5" r="1.188"/></svg> |
Mardak
Feb 23, 2018
Member
Oh I forgot to mention this, but it's easier to tell now via this diff. It's missing fill="context-fill"
Oh I forgot to mention this, but it's easier to tell now via this diff. It's missing fill="context-fill"
rlr
Feb 23, 2018
Author
Contributor
ah, and only that one.
ah, and only that one.
| <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="context-fill" d="M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z"/><path d="M8 7a1 1 0 0 0-1 1v3a1 1 0 0 0 2 0V8a1 1 0 0 0-1-1z"/><circle cx="8" cy="5" r="1.188"/></svg> |
| <div className="add-topsites-button"> | ||
| <button | ||
| className="add" | ||
| title={this.props.intl.formatMessage({id: "edit_topsites_add_button_tooltip"})} |
Mardak
Feb 23, 2018
Member
I guess that was short lived. string already unused!
I guess that was short lived. string already unused!
Mardak
Feb 23, 2018
Member
Actually, this was only added in this 60 cycle? It should be safe to just remove now as we don't need to keep it longer for beta
Actually, this was only added in this 60 cycle? It should be safe to just remove now as we don't need to keep it longer for beta
rlr
Feb 23, 2018
Author
Contributor
oh right. that was at the work week which was 60 already. nice
oh right. that was at the work week which was 60 already. nice
rlr
Feb 23, 2018
Author
Contributor
and I guess "edit_topsites_add_button" can be removed in a few releases too
and I guess "edit_topsites_add_button" can be removed in a few releases too
e132009
to
e939451
| margin-left: 7px; | ||
| } | ||
| @media (max-width: $break-point-widest + $card-width * 1.5) { | ||
| @include context-menu-open-left; |
rlr
Feb 23, 2018
Author
Contributor
this isn't specific enough and is causing link menus to open to the left too.
this isn't specific enough and is causing link menus to open to the left too.
|
The context API is changing in some upcoming version of React. It might make sense to wait for this to solve the "prop-drilling" problem. |







Most of the +green+ is offset by -red- due to the removal of the infoOption
<Info/>component stuff. yay<Info/>component and related tests, styles, etc.<SectionMenu/>component which is aContextMenuspecific for sections.** It is missing the "Move Up" and "Move Down" options until we implement reordering
** Some icons are still being manufactured @bryanbell
Screenshots:
